SAP PM_HIERARCHY_CALL_BOM_MARA Function Module for NOTRANSL: Aufruf der Darstellung der Materialstückliste
PM_HIERARCHY_CALL_BOM_MARA is a standard pm hierarchy call bom mara 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: Aufruf der Darstellung der Materialstückliste 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 pm hierarchy call bom mara FM, simply by entering the name PM_HIERARCHY_CALL_BOM_MARA into the relevant SAP transaction such as SE37 or SE38.
Function Group: IHIE
Program Name: SAPLIHIE
Main Program: SAPLIHIE
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function PM_HIERARCHY_CALL_BOM_MARA 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 'PM_HIERARCHY_CALL_BOM_MARA'"NOTRANSL: Aufruf der Darstellung der Materialstückliste.
EXPORTING
* DATUM = SY-DATUM "Validity date
* EMENG = 0 "
* AUTHORITY_CHECK = 'X' "Authorization Check for Active Objects (X)/Inactive ( )
* GRAFICS = ' ' "
* LEVDO = '01' "
* MATNR = ' ' "
* SANIN = 'X' "
* SELMOD = 0 "
* STKKZ = ' ' "
* WERKS = ' ' "
* CAPID = ' ' "BOM Application
TABLES
STPO_TAB = "Table of Selected Objects
EXCEPTIONS
NO_HIERARCHY = 1 NO_SELECTION = 2 NO_VALID_MATNR = 3 NO_VALID_SELMOD = 4 NO_OBJECT_DEFINED = 5
IMPORTING Parameters details for PM_HIERARCHY_CALL_BOM_MARA
DATUM - Validity date
Data type: EQUZ-DATABDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
EMENG -
Data type: STKO-BMENGOptional: Yes
Call by Reference: No ( called with pass by value option)
AUTHORITY_CHECK - Authorization Check for Active Objects (X)/Inactive ( )
Data type: RIHEA-AUTHCDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
GRAFICS -
Data type: RIHEA-GRAFCDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
LEVDO -
Data type: RIHEA-LEVDODefault: '01'
Optional: Yes
Call by Reference: No ( called with pass by value option)
MATNR -
Data type: MARA-MATNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SANIN -
Data type: RIHEA-IHRELDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELMOD -
Data type: RIHEA-SELMOOptional: Yes
Call by Reference: No ( called with pass by value option)
STKKZ -
Data type: RIHEA-IHBGRDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
WERKS -
Data type: MAST-WERKSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CAPID - BOM Application
Data type: RC29L-CAPIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for PM_HIERARCHY_CALL_BOM_MARA
STPO_TAB - Table of Selected Objects
Data type: RIHSTPXOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_HIERARCHY - Functional location is not part of a hierarchy
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SELECTION - No location was selected
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID_MATNR - No valid material number
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID_SELMOD - The selection session is invalid
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_OBJECT_DEFINED - No valid object
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PM_HIERARCHY_CALL_BOM_MARA 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_datum | TYPE EQUZ-DATAB, " SY-DATUM | |||
lt_stpo_tab | TYPE STANDARD TABLE OF RIHSTPX, " | |||
lv_no_hierarchy | TYPE RIHSTPX, " | |||
lv_emeng | TYPE STKO-BMENG, " 0 | |||
lv_authority_check | TYPE RIHEA-AUTHC, " 'X' | |||
lv_grafics | TYPE RIHEA-GRAFC, " ' ' | |||
lv_no_selection | TYPE RIHEA, " | |||
lv_levdo | TYPE RIHEA-LEVDO, " '01' | |||
lv_no_valid_matnr | TYPE RIHEA, " | |||
lv_matnr | TYPE MARA-MATNR, " SPACE | |||
lv_no_valid_selmod | TYPE MARA, " | |||
lv_sanin | TYPE RIHEA-IHREL, " 'X' | |||
lv_no_object_defined | TYPE RIHEA, " | |||
lv_selmod | TYPE RIHEA-SELMO, " 0 | |||
lv_stkkz | TYPE RIHEA-IHBGR, " ' ' | |||
lv_werks | TYPE MAST-WERKS, " SPACE | |||
lv_capid | TYPE RC29L-CAPID. " SPACE |
  CALL FUNCTION 'PM_HIERARCHY_CALL_BOM_MARA' "NOTRANSL: Aufruf der Darstellung der Materialstückliste |
EXPORTING | ||
DATUM | = lv_datum | |
EMENG | = lv_emeng | |
AUTHORITY_CHECK | = lv_authority_check | |
GRAFICS | = lv_grafics | |
LEVDO | = lv_levdo | |
MATNR | = lv_matnr | |
SANIN | = lv_sanin | |
SELMOD | = lv_selmod | |
STKKZ | = lv_stkkz | |
WERKS | = lv_werks | |
CAPID | = lv_capid | |
TABLES | ||
STPO_TAB | = lt_stpo_tab | |
EXCEPTIONS | ||
NO_HIERARCHY = 1 | ||
NO_SELECTION = 2 | ||
NO_VALID_MATNR = 3 | ||
NO_VALID_SELMOD = 4 | ||
NO_OBJECT_DEFINED = 5 | ||
. " PM_HIERARCHY_CALL_BOM_MARA |
ABAP code using 7.40 inline data declarations to call FM PM_HIERARCHY_CALL_BOM_MARA
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 DATAB FROM EQUZ INTO @DATA(ld_datum). | ||||
DATA(ld_datum) | = SY-DATUM. | |||
"SELECT single BMENG FROM STKO INTO @DATA(ld_emeng). | ||||
"SELECT single AUTHC FROM RIHEA INTO @DATA(ld_authority_check). | ||||
DATA(ld_authority_check) | = 'X'. | |||
"SELECT single GRAFC FROM RIHEA INTO @DATA(ld_grafics). | ||||
DATA(ld_grafics) | = ' '. | |||
"SELECT single LEVDO FROM RIHEA INTO @DATA(ld_levdo). | ||||
DATA(ld_levdo) | = '01'. | |||
"SELECT single MATNR FROM MARA INTO @DATA(ld_matnr). | ||||
DATA(ld_matnr) | = ' '. | |||
"SELECT single IHREL FROM RIHEA INTO @DATA(ld_sanin). | ||||
DATA(ld_sanin) | = 'X'. | |||
"SELECT single SELMO FROM RIHEA INTO @DATA(ld_selmod). | ||||
"SELECT single IHBGR FROM RIHEA INTO @DATA(ld_stkkz). | ||||
DATA(ld_stkkz) | = ' '. | |||
"SELECT single WERKS FROM MAST INTO @DATA(ld_werks). | ||||
DATA(ld_werks) | = ' '. | |||
"SELECT single CAPID FROM RC29L INTO @DATA(ld_capid). | ||||
DATA(ld_capid) | = ' '. | |||
Search for further information about these or an SAP related objects