SAP RM_BOM_EXPLOSION Function Module for BOM Explosion
RM_BOM_EXPLOSION is a standard rm bom explosion SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for BOM Explosion 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 rm bom explosion FM, simply by entering the name RM_BOM_EXPLOSION into the relevant SAP transaction such as SE37 or SE38.
Function Group: BARM
Program Name: SAPLBARM
Main Program: SAPLBARM
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RM_BOM_EXPLOSION 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 'RM_BOM_EXPLOSION'"BOM Explosion.
CHANGING
I_AM61B = "
I_STLAL = "
I_CUOBJ = "
* I_SGTPS = ' ' "
I_T437S = "
I_T399D = "
I_T438M = "
* I_TPRRU = "
I_MT61D = "
I_MDPA = "
I_PLAF = "
I_STLAN = "
TABLES
I_MDPMX = "
* I_MDSBX = "
EXCEPTIONS
BOM_EXPL_ERROR = 1 OT_ERROR = 2
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLBARM_001 Customer Exit: RM_BACKFLUSH_CHECK
EXIT_SAPLBARM_002 Customer Exit: RM_BACKFLUSH_GO
EXIT_SAPLBARM_003 Customer Exit: RM_CANCEL_BACKFLUSH_CHECK
EXIT_SAPLBARM_004 Customer Exit: RM_CANCEL_BACKFLUSH_GO
CHANGING Parameters details for RM_BOM_EXPLOSION
I_AM61B -
Data type: BARM_TYPE_AM61BOptional: No
Call by Reference: No ( called with pass by value option)
I_STLAL -
Data type: SAFK-STLALOptional: No
Call by Reference: No ( called with pass by value option)
I_CUOBJ -
Data type: MT61D-CUOBJOptional: No
Call by Reference: No ( called with pass by value option)
I_SGTPS -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_T437S -
Data type: T437SOptional: No
Call by Reference: No ( called with pass by value option)
I_T399D -
Data type: T399DOptional: No
Call by Reference: No ( called with pass by value option)
I_T438M -
Data type: T438MOptional: No
Call by Reference: No ( called with pass by value option)
I_TPRRU -
Data type: TPRRUOptional: Yes
Call by Reference: No ( called with pass by value option)
I_MT61D -
Data type: MT61DOptional: No
Call by Reference: No ( called with pass by value option)
I_MDPA -
Data type: MDPAOptional: No
Call by Reference: No ( called with pass by value option)
I_PLAF -
Data type: PLAFOptional: No
Call by Reference: No ( called with pass by value option)
I_STLAN -
Data type: SAFK-STLANOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RM_BOM_EXPLOSION
I_MDPMX -
Data type: MDPMOptional: No
Call by Reference: No ( called with pass by value option)
I_MDSBX -
Data type: MDSBOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
BOM_EXPL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OT_ERROR - Other errors
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RM_BOM_EXPLOSION 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_am61b | TYPE BARM_TYPE_AM61B, " | |||
| lt_i_mdpmx | TYPE STANDARD TABLE OF MDPM, " | |||
| lv_bom_expl_error | TYPE MDPM, " | |||
| lv_i_stlal | TYPE SAFK-STLAL, " | |||
| lv_i_cuobj | TYPE MT61D-CUOBJ, " | |||
| lv_i_sgtps | TYPE C, " SPACE | |||
| lt_i_mdsbx | TYPE STANDARD TABLE OF MDSB, " | |||
| lv_i_t437s | TYPE T437S, " | |||
| lv_ot_error | TYPE T437S, " | |||
| lv_i_t399d | TYPE T399D, " | |||
| lv_i_t438m | TYPE T438M, " | |||
| lv_i_tprru | TYPE TPRRU, " | |||
| lv_i_mt61d | TYPE MT61D, " | |||
| lv_i_mdpa | TYPE MDPA, " | |||
| lv_i_plaf | TYPE PLAF, " | |||
| lv_i_stlan | TYPE SAFK-STLAN. " |
|   CALL FUNCTION 'RM_BOM_EXPLOSION' "BOM Explosion |
| CHANGING | ||
| I_AM61B | = lv_i_am61b | |
| I_STLAL | = lv_i_stlal | |
| I_CUOBJ | = lv_i_cuobj | |
| I_SGTPS | = lv_i_sgtps | |
| I_T437S | = lv_i_t437s | |
| I_T399D | = lv_i_t399d | |
| I_T438M | = lv_i_t438m | |
| I_TPRRU | = lv_i_tprru | |
| I_MT61D | = lv_i_mt61d | |
| I_MDPA | = lv_i_mdpa | |
| I_PLAF | = lv_i_plaf | |
| I_STLAN | = lv_i_stlan | |
| TABLES | ||
| I_MDPMX | = lt_i_mdpmx | |
| I_MDSBX | = lt_i_mdsbx | |
| EXCEPTIONS | ||
| BOM_EXPL_ERROR = 1 | ||
| OT_ERROR = 2 | ||
| . " RM_BOM_EXPLOSION | ||
ABAP code using 7.40 inline data declarations to call FM RM_BOM_EXPLOSION
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 STLAL FROM SAFK INTO @DATA(ld_i_stlal). | ||||
| "SELECT single CUOBJ FROM MT61D INTO @DATA(ld_i_cuobj). | ||||
| DATA(ld_i_sgtps) | = ' '. | |||
| "SELECT single STLAN FROM SAFK INTO @DATA(ld_i_stlan). | ||||
Search for further information about these or an SAP related objects