SAP MDG_BS_MAT_MRP_CREATE_DATA Function Module for DiBe anlegen mit Daten
MDG_BS_MAT_MRP_CREATE_DATA is a standard mdg bs mat mrp create data SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for DiBe anlegen mit Daten 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 mdg bs mat mrp create data FM, simply by entering the name MDG_BS_MAT_MRP_CREATE_DATA into the relevant SAP transaction such as SE37 or SE38.
Function Group: MDG_BS_MAT_MD_MGD1
Program Name: SAPLMDG_BS_MAT_MD_MGD1
Main Program: SAPLMDG_BS_MAT_MD_MGD1
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MDG_BS_MAT_MRP_CREATE_DATA 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 'MDG_BS_MAT_MRP_CREATE_DATA'"DiBe anlegen mit Daten.
EXPORTING
I_MATNR = "Material Number
I_WERK = "Plant
I_MRP_AREA = "MRP Area
I_SELFIELDS = "Selection Fields
I_MDMA = "
* I_TESTMODE = 'X' "Checkbox
IMPORTING
E_ERROR_RETURN = "Defect structure
IMPORTING Parameters details for MDG_BS_MAT_MRP_CREATE_DATA
I_MATNR - Material Number
Data type: MDMA-MATNROptional: No
Call by Reference: Yes
I_WERK - Plant
Data type: MDMA-WERKSOptional: No
Call by Reference: Yes
I_MRP_AREA - MRP Area
Data type: MDMA-BERIDOptional: No
Call by Reference: Yes
I_SELFIELDS - Selection Fields
Data type: SDIBE_MASSFIELDSOptional: No
Call by Reference: Yes
I_MDMA -
Data type: MDMAOptional: No
Call by Reference: Yes
I_TESTMODE - Checkbox
Data type: XFELDDefault: 'X'
Optional: No
Call by Reference: Yes
EXPORTING Parameters details for MDG_BS_MAT_MRP_CREATE_DATA
E_ERROR_RETURN - Defect structure
Data type: BAPIRETURN1Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for MDG_BS_MAT_MRP_CREATE_DATA 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_i_matnr | TYPE MDMA-MATNR, " | |||
| lv_e_error_return | TYPE BAPIRETURN1, " | |||
| lv_i_werk | TYPE MDMA-WERKS, " | |||
| lv_i_mrp_area | TYPE MDMA-BERID, " | |||
| lv_i_selfields | TYPE SDIBE_MASSFIELDS, " | |||
| lv_i_mdma | TYPE MDMA, " | |||
| lv_i_testmode | TYPE XFELD. " 'X' |
|   CALL FUNCTION 'MDG_BS_MAT_MRP_CREATE_DATA' "DiBe anlegen mit Daten |
| EXPORTING | ||
| I_MATNR | = lv_i_matnr | |
| I_WERK | = lv_i_werk | |
| I_MRP_AREA | = lv_i_mrp_area | |
| I_SELFIELDS | = lv_i_selfields | |
| I_MDMA | = lv_i_mdma | |
| I_TESTMODE | = lv_i_testmode | |
| IMPORTING | ||
| E_ERROR_RETURN | = lv_e_error_return | |
| . " MDG_BS_MAT_MRP_CREATE_DATA | ||
ABAP code using 7.40 inline data declarations to call FM MDG_BS_MAT_MRP_CREATE_DATA
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 MATNR FROM MDMA INTO @DATA(ld_i_matnr). | ||||
| "SELECT single WERKS FROM MDMA INTO @DATA(ld_i_werk). | ||||
| "SELECT single BERID FROM MDMA INTO @DATA(ld_i_mrp_area). | ||||
| DATA(ld_i_testmode) | = 'X'. | |||
Search for further information about these or an SAP related objects