SAP MD_APO_EXPLODE_BOM Function Module for NOTRANSL: Auflösen eines Auftrags (APO)
MD_APO_EXPLODE_BOM is a standard md apo explode bom SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Auflösen eines Auftrags (APO) 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 apo explode bom FM, simply by entering the name MD_APO_EXPLODE_BOM into the relevant SAP transaction such as SE37 or SE38.
Function Group: M61Z
Program Name: SAPLM61Z
Main Program: SAPLM61Z
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MD_APO_EXPLODE_BOM 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_APO_EXPLODE_BOM'"NOTRANSL: Auflösen eines Auftrags (APO).
EXPORTING
EMDPA = "View of planned order/dummy conponents for BOM explosion
EPLWRK = "Plant
* APO_COMPONENTS_ONLY = 'X' "Checkbox
* ORDER_SCHEDULING = 'X' "Checkbox
* BACKWARD_SCHEDULING = 'X' "Checkbox
IMPORTING
IMDPA = "View of planned order/dummy conponents for BOM explosion
TABLES
MDPM_TAB = "View of Material Components in the Planned Order
EXCEPTIONS
MISSING_INPUT = 1
IMPORTING Parameters details for MD_APO_EXPLODE_BOM
EMDPA - View of planned order/dummy conponents for BOM explosion
Data type: MDPAOptional: No
Call by Reference: Yes
EPLWRK - Plant
Data type: MT61D-WERKSOptional: No
Call by Reference: Yes
APO_COMPONENTS_ONLY - Checkbox
Data type: AF61Z-FLG01Default: 'X'
Optional: Yes
Call by Reference: Yes
ORDER_SCHEDULING - Checkbox
Data type: AF61Z-FLG01Default: 'X'
Optional: Yes
Call by Reference: Yes
BACKWARD_SCHEDULING - Checkbox
Data type: AF61Z-FLG01Default: 'X'
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for MD_APO_EXPLODE_BOM
IMDPA - View of planned order/dummy conponents for BOM explosion
Data type: MDPAOptional: No
Call by Reference: Yes
TABLES Parameters details for MD_APO_EXPLODE_BOM
MDPM_TAB - View of Material Components in the Planned Order
Data type: MDPMOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
MISSING_INPUT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MD_APO_EXPLODE_BOM 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_emdpa | TYPE MDPA, " | |||
| lv_imdpa | TYPE MDPA, " | |||
| lt_mdpm_tab | TYPE STANDARD TABLE OF MDPM, " | |||
| lv_missing_input | TYPE MDPM, " | |||
| lv_eplwrk | TYPE MT61D-WERKS, " | |||
| lv_apo_components_only | TYPE AF61Z-FLG01, " 'X' | |||
| lv_order_scheduling | TYPE AF61Z-FLG01, " 'X' | |||
| lv_backward_scheduling | TYPE AF61Z-FLG01. " 'X' |
|   CALL FUNCTION 'MD_APO_EXPLODE_BOM' "NOTRANSL: Auflösen eines Auftrags (APO) |
| EXPORTING | ||
| EMDPA | = lv_emdpa | |
| EPLWRK | = lv_eplwrk | |
| APO_COMPONENTS_ONLY | = lv_apo_components_only | |
| ORDER_SCHEDULING | = lv_order_scheduling | |
| BACKWARD_SCHEDULING | = lv_backward_scheduling | |
| IMPORTING | ||
| IMDPA | = lv_imdpa | |
| TABLES | ||
| MDPM_TAB | = lt_mdpm_tab | |
| EXCEPTIONS | ||
| MISSING_INPUT = 1 | ||
| . " MD_APO_EXPLODE_BOM | ||
ABAP code using 7.40 inline data declarations to call FM MD_APO_EXPLODE_BOM
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 WERKS FROM MT61D INTO @DATA(ld_eplwrk). | ||||
| "SELECT single FLG01 FROM AF61Z INTO @DATA(ld_apo_components_only). | ||||
| DATA(ld_apo_components_only) | = 'X'. | |||
| "SELECT single FLG01 FROM AF61Z INTO @DATA(ld_order_scheduling). | ||||
| DATA(ld_order_scheduling) | = 'X'. | |||
| "SELECT single FLG01 FROM AF61Z INTO @DATA(ld_backward_scheduling). | ||||
| DATA(ld_backward_scheduling) | = 'X'. | |||
Search for further information about these or an SAP related objects