SAP BAPI_MATERIAL_MRP_LIST Function Module for Material - MRP List
BAPI_MATERIAL_MRP_LIST is a standard bapi material mrp list SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Material - MRP List 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 bapi material mrp list FM, simply by entering the name BAPI_MATERIAL_MRP_LIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: MRP1001
Program Name: SAPLMRP1001
Main Program: SAPLMRP1001
Appliation area:
Release date: 13-Feb-2004
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function BAPI_MATERIAL_MRP_LIST 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 'BAPI_MATERIAL_MRP_LIST'"Material - MRP List.
EXPORTING
MATERIAL = "Material Number
* GET_IND_LINES = 'X' "Indicator: Determination of Single-Line Display
* GET_TOTAL_LINES = "Indicator: Determination of Period Totals Display
* MATERIAL_EVG = "
* PLANT = "Plant
* MRP_AREA = "MRP Area
* PLAN_SCENARIO = "Planning Scenario of Long-Term Planning
* DISPLAY_FILTER = "Name of Display Filter
* PERIOD_INDICATOR = "Internal Period Indicator
* VENDOR_NO = "Vendor Key
* DISPLAY_TO = "Period After Today's Date
* GET_ITEM_DETAILS = "Indicator: Determination of Detail Display for MRP Elements
IMPORTING
MRP_LIST = "MRP: MRP List
RETURN = "Return Parameters
TABLES
* MRP_ITEMS = "MRP: MRP Document Item
* MRP_IND_LINES = "MRP: Single Lines of MRP Elements
* MRP_TOTAL_LINES = "MRP: Totals Line MRP Elements
* EXTENSIONOUT = "Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
IMPORTING Parameters details for BAPI_MATERIAL_MRP_LIST
MATERIAL - Material Number
Data type: BAPI_MRP_MAT_PARAM-MATERIALOptional: No
Call by Reference: No ( called with pass by value option)
GET_IND_LINES - Indicator: Determination of Single-Line Display
Data type: BAPI_MRP_LIST_PARAM-GET_IND_LINESDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
GET_TOTAL_LINES - Indicator: Determination of Period Totals Display
Data type: BAPI_MRP_LIST_PARAM-GET_TOTAL_LINESOptional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL_EVG -
Data type: BAPIMGVMATNROptional: Yes
Call by Reference: No ( called with pass by value option)
PLANT - Plant
Data type: BAPI_MRP_MAT_PARAM-PLANTOptional: Yes
Call by Reference: No ( called with pass by value option)
MRP_AREA - MRP Area
Data type: BAPI_MRP_MAT_PARAM-MRP_AREAOptional: Yes
Call by Reference: No ( called with pass by value option)
PLAN_SCENARIO - Planning Scenario of Long-Term Planning
Data type: BAPI_MRP_MAT_PARAM-PLAN_SCENARIOOptional: Yes
Call by Reference: No ( called with pass by value option)
DISPLAY_FILTER - Name of Display Filter
Data type: BAPI_MRP_LIST_PARAM-DISPLAY_FILTEROptional: Yes
Call by Reference: No ( called with pass by value option)
PERIOD_INDICATOR - Internal Period Indicator
Data type: BAPI_MRP_LIST_PARAM-PERIOD_INDICATOROptional: Yes
Call by Reference: No ( called with pass by value option)
VENDOR_NO - Vendor Key
Data type: BAPI_MRP_LIST_PARAM-VENDOR_NOOptional: Yes
Call by Reference: No ( called with pass by value option)
DISPLAY_TO - Period After Today's Date
Data type: BAPI_MRP_LIST_PARAM-DISPLAY_TOOptional: Yes
Call by Reference: No ( called with pass by value option)
GET_ITEM_DETAILS - Indicator: Determination of Detail Display for MRP Elements
Data type: BAPI_MRP_LIST_PARAM-GET_ITEM_DETAILSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_MATERIAL_MRP_LIST
MRP_LIST - MRP: MRP List
Data type: BAPI_MRP_LISTOptional: No
Call by Reference: No ( called with pass by value option)
RETURN - Return Parameters
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_MATERIAL_MRP_LIST
MRP_ITEMS - MRP: MRP Document Item
Data type: BAPI_MRP_ITEMSOptional: Yes
Call by Reference: Yes
MRP_IND_LINES - MRP: Single Lines of MRP Elements
Data type: BAPI_MRP_IND_LINESOptional: Yes
Call by Reference: Yes
MRP_TOTAL_LINES - MRP: Totals Line MRP Elements
Data type: BAPI_MRP_TOTAL_LINESOptional: Yes
Call by Reference: Yes
EXTENSIONOUT - Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_MATERIAL_MRP_LIST 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_material | TYPE BAPI_MRP_MAT_PARAM-MATERIAL, " | |||
lv_mrp_list | TYPE BAPI_MRP_LIST, " | |||
lt_mrp_items | TYPE STANDARD TABLE OF BAPI_MRP_ITEMS, " | |||
lv_get_ind_lines | TYPE BAPI_MRP_LIST_PARAM-GET_IND_LINES, " 'X' | |||
lv_get_total_lines | TYPE BAPI_MRP_LIST_PARAM-GET_TOTAL_LINES, " | |||
lv_material_evg | TYPE BAPIMGVMATNR, " | |||
lv_plant | TYPE BAPI_MRP_MAT_PARAM-PLANT, " | |||
lv_return | TYPE BAPIRET2, " | |||
lt_mrp_ind_lines | TYPE STANDARD TABLE OF BAPI_MRP_IND_LINES, " | |||
lv_mrp_area | TYPE BAPI_MRP_MAT_PARAM-MRP_AREA, " | |||
lt_mrp_total_lines | TYPE STANDARD TABLE OF BAPI_MRP_TOTAL_LINES, " | |||
lt_extensionout | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
lv_plan_scenario | TYPE BAPI_MRP_MAT_PARAM-PLAN_SCENARIO, " | |||
lv_display_filter | TYPE BAPI_MRP_LIST_PARAM-DISPLAY_FILTER, " | |||
lv_period_indicator | TYPE BAPI_MRP_LIST_PARAM-PERIOD_INDICATOR, " | |||
lv_vendor_no | TYPE BAPI_MRP_LIST_PARAM-VENDOR_NO, " | |||
lv_display_to | TYPE BAPI_MRP_LIST_PARAM-DISPLAY_TO, " | |||
lv_get_item_details | TYPE BAPI_MRP_LIST_PARAM-GET_ITEM_DETAILS. " |
  CALL FUNCTION 'BAPI_MATERIAL_MRP_LIST' "Material - MRP List |
EXPORTING | ||
MATERIAL | = lv_material | |
GET_IND_LINES | = lv_get_ind_lines | |
GET_TOTAL_LINES | = lv_get_total_lines | |
MATERIAL_EVG | = lv_material_evg | |
PLANT | = lv_plant | |
MRP_AREA | = lv_mrp_area | |
PLAN_SCENARIO | = lv_plan_scenario | |
DISPLAY_FILTER | = lv_display_filter | |
PERIOD_INDICATOR | = lv_period_indicator | |
VENDOR_NO | = lv_vendor_no | |
DISPLAY_TO | = lv_display_to | |
GET_ITEM_DETAILS | = lv_get_item_details | |
IMPORTING | ||
MRP_LIST | = lv_mrp_list | |
RETURN | = lv_return | |
TABLES | ||
MRP_ITEMS | = lt_mrp_items | |
MRP_IND_LINES | = lt_mrp_ind_lines | |
MRP_TOTAL_LINES | = lt_mrp_total_lines | |
EXTENSIONOUT | = lt_extensionout | |
. " BAPI_MATERIAL_MRP_LIST |
ABAP code using 7.40 inline data declarations to call FM BAPI_MATERIAL_MRP_LIST
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 MATERIAL FROM BAPI_MRP_MAT_PARAM INTO @DATA(ld_material). | ||||
"SELECT single GET_IND_LINES FROM BAPI_MRP_LIST_PARAM INTO @DATA(ld_get_ind_lines). | ||||
DATA(ld_get_ind_lines) | = 'X'. | |||
"SELECT single GET_TOTAL_LINES FROM BAPI_MRP_LIST_PARAM INTO @DATA(ld_get_total_lines). | ||||
"SELECT single PLANT FROM BAPI_MRP_MAT_PARAM INTO @DATA(ld_plant). | ||||
"SELECT single MRP_AREA FROM BAPI_MRP_MAT_PARAM INTO @DATA(ld_mrp_area). | ||||
"SELECT single PLAN_SCENARIO FROM BAPI_MRP_MAT_PARAM INTO @DATA(ld_plan_scenario). | ||||
"SELECT single DISPLAY_FILTER FROM BAPI_MRP_LIST_PARAM INTO @DATA(ld_display_filter). | ||||
"SELECT single PERIOD_INDICATOR FROM BAPI_MRP_LIST_PARAM INTO @DATA(ld_period_indicator). | ||||
"SELECT single VENDOR_NO FROM BAPI_MRP_LIST_PARAM INTO @DATA(ld_vendor_no). | ||||
"SELECT single DISPLAY_TO FROM BAPI_MRP_LIST_PARAM INTO @DATA(ld_display_to). | ||||
"SELECT single GET_ITEM_DETAILS FROM BAPI_MRP_LIST_PARAM INTO @DATA(ld_get_item_details). | ||||
Search for further information about these or an SAP related objects