SAP MD_PROJECT_REPORT Function Module for Display all Dependent Materials for a Projecct
MD_PROJECT_REPORT is a standard md project report SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Display all Dependent Materials for a Projecct processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for md project report FM, simply by entering the name MD_PROJECT_REPORT into the relevant SAP transaction such as SE37 or SE38.
Function Group: M61N
Program Name: SAPLM61N
Main Program: SAPLM61N
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MD_PROJECT_REPORT pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'MD_PROJECT_REPORT'"Display all Dependent Materials for a Projecct.
EXPORTING
* PROJN = 00000000 "Project number
* NODISP = ' ' "New Input Values
* I_IGNORE_MTOLD = ' ' "
* I_PROFID = ' ' "Profile for Order Report
* IS_PROFILE = "
* NO_COMMIT_WORK = ' ' "
* PSPNR = 00000000 "Number of a WBS element
* I_WERKS = "Plant
* IT_MATNR = "Material Numbers
* WITH_HIERARCHY = ' ' "Flag: with dependent WBS elements
* AVAILABILITY_CHECK = ' ' "Type of availability calculation (ATP,...)
* NO_SAVETY_STOCK = ' ' "Safety stock taken into account
* DATA_IN_MEMORY = ' ' "
* MEMORY_ID = 'PLHS' "
IMPORTING
ET_MLDELAY = "Requirement Receipt Element with Multilevel Delay
ET_RTREE_SEL = "Table for Selected Elements for Order Tree
TABLES
* IIOELX = "
EXCEPTIONS
ERROR = 1
IMPORTING Parameters details for MD_PROJECT_REPORT
PROJN - Project number
Data type: PROJ-PSPNRDefault: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
NODISP - New Input Values
Data type: XFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_IGNORE_MTOLD -
Data type: XFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PROFID - Profile for Order Report
Data type: RM61O-PROFIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IS_PROFILE -
Data type: T464Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_COMMIT_WORK -
Data type: XFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PSPNR - Number of a WBS element
Data type: PRPS-PSPNRDefault: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_WERKS - Plant
Data type: WERKS_DOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_MATNR - Material Numbers
Data type: MD_T_MATNROptional: Yes
Call by Reference: No ( called with pass by value option)
WITH_HIERARCHY - Flag: with dependent WBS elements
Data type: RCWBS-SEL01Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
AVAILABILITY_CHECK - Type of availability calculation (ATP,...)
Data type: RM61M-DSELKDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_SAVETY_STOCK - Safety stock taken into account
Data type: RM61M-DSELKDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATA_IN_MEMORY -
Data type: RM61M-BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MEMORY_ID -
Data type: MEMID4Default: 'PLHS'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MD_PROJECT_REPORT
ET_MLDELAY - Requirement Receipt Element with Multilevel Delay
Data type: MD_T_MLDELAYOptional: No
Call by Reference: Yes
ET_RTREE_SEL - Table for Selected Elements for Order Tree
Data type: MD_RTREE_SELOptional: No
Call by Reference: Yes
TABLES Parameters details for MD_PROJECT_REPORT
IIOELX -
Data type: IOELOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
ERROR - Error reading the data
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MD_PROJECT_REPORT Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_error | TYPE STRING, " | |||
| lv_projn | TYPE PROJ-PSPNR, " 00000000 | |||
| lt_iioelx | TYPE STANDARD TABLE OF IOEL, " | |||
| lv_et_mldelay | TYPE MD_T_MLDELAY, " | |||
| lv_nodisp | TYPE XFLAG, " SPACE | |||
| lv_i_ignore_mtold | TYPE XFLAG, " SPACE | |||
| lv_i_profid | TYPE RM61O-PROFID, " SPACE | |||
| lv_is_profile | TYPE T464, " | |||
| lv_no_commit_work | TYPE XFLAG, " SPACE | |||
| lv_pspnr | TYPE PRPS-PSPNR, " 00000000 | |||
| lv_et_rtree_sel | TYPE MD_RTREE_SEL, " | |||
| lv_i_werks | TYPE WERKS_D, " | |||
| lv_it_matnr | TYPE MD_T_MATNR, " | |||
| lv_with_hierarchy | TYPE RCWBS-SEL01, " SPACE | |||
| lv_availability_check | TYPE RM61M-DSELK, " SPACE | |||
| lv_no_savety_stock | TYPE RM61M-DSELK, " SPACE | |||
| lv_data_in_memory | TYPE RM61M-BOOLEAN, " SPACE | |||
| lv_memory_id | TYPE MEMID4. " 'PLHS' |
|   CALL FUNCTION 'MD_PROJECT_REPORT' "Display all Dependent Materials for a Projecct |
| EXPORTING | ||
| PROJN | = lv_projn | |
| NODISP | = lv_nodisp | |
| I_IGNORE_MTOLD | = lv_i_ignore_mtold | |
| I_PROFID | = lv_i_profid | |
| IS_PROFILE | = lv_is_profile | |
| NO_COMMIT_WORK | = lv_no_commit_work | |
| PSPNR | = lv_pspnr | |
| I_WERKS | = lv_i_werks | |
| IT_MATNR | = lv_it_matnr | |
| WITH_HIERARCHY | = lv_with_hierarchy | |
| AVAILABILITY_CHECK | = lv_availability_check | |
| NO_SAVETY_STOCK | = lv_no_savety_stock | |
| DATA_IN_MEMORY | = lv_data_in_memory | |
| MEMORY_ID | = lv_memory_id | |
| IMPORTING | ||
| ET_MLDELAY | = lv_et_mldelay | |
| ET_RTREE_SEL | = lv_et_rtree_sel | |
| TABLES | ||
| IIOELX | = lt_iioelx | |
| EXCEPTIONS | ||
| ERROR = 1 | ||
| . " MD_PROJECT_REPORT | ||
ABAP code using 7.40 inline data declarations to call FM MD_PROJECT_REPORT
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single PSPNR FROM PROJ INTO @DATA(ld_projn). | ||||
| DATA(ld_projn) | = 00000000. | |||
| DATA(ld_nodisp) | = ' '. | |||
| DATA(ld_i_ignore_mtold) | = ' '. | |||
| "SELECT single PROFID FROM RM61O INTO @DATA(ld_i_profid). | ||||
| DATA(ld_i_profid) | = ' '. | |||
| DATA(ld_no_commit_work) | = ' '. | |||
| "SELECT single PSPNR FROM PRPS INTO @DATA(ld_pspnr). | ||||
| DATA(ld_pspnr) | = 00000000. | |||
| "SELECT single SEL01 FROM RCWBS INTO @DATA(ld_with_hierarchy). | ||||
| DATA(ld_with_hierarchy) | = ' '. | |||
| "SELECT single DSELK FROM RM61M INTO @DATA(ld_availability_check). | ||||
| DATA(ld_availability_check) | = ' '. | |||
| "SELECT single DSELK FROM RM61M INTO @DATA(ld_no_savety_stock). | ||||
| DATA(ld_no_savety_stock) | = ' '. | |||
| "SELECT single BOOLEAN FROM RM61M INTO @DATA(ld_data_in_memory). | ||||
| DATA(ld_data_in_memory) | = ' '. | |||
| DATA(ld_memory_id) | = 'PLHS'. | |||
Search for further information about these or an SAP related objects