SAP PM_HIERARCHY_CALL Function Module for NOTRANSL: Åufruf der Strukturdarstellung allgemein
PM_HIERARCHY_CALL is a standard pm hierarchy call 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: Åufruf der Strukturdarstellung allgemein 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 FM, simply by entering the name PM_HIERARCHY_CALL into the relevant SAP transaction such as SE37 or SE38.
Function Group: IHIE
Program Name: SAPLIHIE
Main Program: SAPLIHIE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function PM_HIERARCHY_CALL 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'"NOTRANSL: Åufruf der Strukturdarstellung allgemein.
EXPORTING
* DATUM = SY-DATUM "Date
* SELECT_IFLO = 'X' "FunctLocations can be sel.
* SELECT_STPO = ' ' "Material can be selected
* SELMOD = 0 "Selection mode
* STKKZ = ' ' "Only PM assemblies
* TECHV = ' ' "Technical Status
* TPLNR = ' ' "Functional location
* WERKS = ' ' "Plant
* WITH_EQUI = ' ' "With built-in pieces of equipment
* WITH_EQUI_HIER = ' ' "With equipment hierarchies
* WITH_IFLO_HIER = ' ' "With location hierarchies
* EQUNR = ' ' "Equipment number
* WITH_BTYP = 'X' "Structure Explosion with Construction Type
* WITH_MARA = ' ' "With material
* WITH_IBASE_HIER = ' ' "
* CAPID = ' ' "BOM Application
* EMENG = 0 "
* ARBPL_INT = ' ' "
* AUTHORITY_CHECK = 'X' "Authorization Check for Active Objects (X)/Inactive ( )
* I_GRBOM = "Display Group BOM
* GRAFICS = ' ' "Display as hierarchy graphics
* LEVDO = '01' "Number of levels down
* LEVUP = '00' "Number of levels up
* MATNR = ' ' "Material number
* READ_NEW = ' ' "Do not read structure from buffer
* SANIN = 'X' "PM-relevant
* SELECT_EQUI = ' ' "Equipment can be selected
IMPORTING
ET_HIER = "
TABLES
* EQUI_TAB = "Table of selected pieces of equipmt
* IFLO_TAB = "Table of selected locations
* STPO_TAB = "Table of selected materials
EXCEPTIONS
NO_HIERARCHY = 1 NO_OBJECT_DEFINED = 2 NO_SELECTION = 3 NO_VALID_EQUNR = 4 NO_VALID_MATNR = 5 NO_VALID_SELMOD = 6 NO_VALID_TPLNR = 7 NO_VALID_GRBOM_WERKS = 8
IMPORTING Parameters details for PM_HIERARCHY_CALL
DATUM - Date
Data type: EQUZ-DATABDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELECT_IFLO - FunctLocations can be sel.
Data type: RIHEA-TPLSEDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELECT_STPO - Material can be selected
Data type: RIHEA-STPSEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELMOD - Selection mode
Data type: RIHEA-SELMOOptional: Yes
Call by Reference: No ( called with pass by value option)
STKKZ - Only PM assemblies
Data type: RIHEA-IHBGRDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TECHV - Technical Status
Data type: STKO-TECHVDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TPLNR - Functional location
Data type: IFLO-TPLNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WERKS - Plant
Data type: MAST-WERKSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_EQUI - With built-in pieces of equipment
Data type: RIHEA-EQUBIDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_EQUI_HIER - With equipment hierarchies
Data type: RIHEA-EQHIEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_IFLO_HIER - With location hierarchies
Data type: RIHEA-FLHIEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EQUNR - Equipment number
Data type: EQUI-EQUNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_BTYP - Structure Explosion with Construction Type
Data type: RIHEA-IHBTYDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_MARA - With material
Data type: RIHEA-BOMEXDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_IBASE_HIER -
Data type: RIHEA-IBASEEXDefault: ' '
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)
EMENG -
Data type: STKO-BMENGOptional: Yes
Call by Reference: No ( called with pass by value option)
ARBPL_INT -
Data type: FLAGDefault: ' '
Optional: 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)
I_GRBOM - Display Group BOM
Data type: GRBOMOptional: Yes
Call by Reference: Yes
GRAFICS - Display as hierarchy graphics
Data type: RIHEA-GRAFCDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
LEVDO - Number of levels down
Data type: RIHEA-LEVDODefault: '01'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LEVUP - Number of levels up
Data type: RIHEA-LEVUPDefault: '00'
Optional: Yes
Call by Reference: No ( called with pass by value option)
MATNR - Material number
Data type: MARA-MATNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
READ_NEW - Do not read structure from buffer
Data type: RIHEA-HIEREDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SANIN - PM-relevant
Data type: RIHEA-IHRELDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELECT_EQUI - Equipment can be selected
Data type: RIHEA-EQUSEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for PM_HIERARCHY_CALL
ET_HIER -
Data type: IHIE_T_HIEROptional: No
Call by Reference: Yes
TABLES Parameters details for PM_HIERARCHY_CALL
EQUI_TAB - Table of selected pieces of equipmt
Data type: RIHEQUIOptional: Yes
Call by Reference: Yes
IFLO_TAB - Table of selected locations
Data type: RIHIFLOOptional: Yes
Call by Reference: Yes
STPO_TAB - Table of selected materials
Data type: RIHSTPXOptional: Yes
Call by Reference: Yes
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_OBJECT_DEFINED - Transfer neither functional location, nor equipment, nor material
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_EQUNR - The specified equipment number is invalid
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID_MATNR - The specified material number is invalid
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_VALID_TPLNR - The specified location number is invalid
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID_GRBOM_WERKS -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for PM_HIERARCHY_CALL 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 | |||
| lv_et_hier | TYPE IHIE_T_HIER, " | |||
| lt_equi_tab | TYPE STANDARD TABLE OF RIHEQUI, " | |||
| lv_no_hierarchy | TYPE RIHEQUI, " | |||
| lv_select_iflo | TYPE RIHEA-TPLSE, " 'X' | |||
| lv_select_stpo | TYPE RIHEA-STPSE, " ' ' | |||
| lv_selmod | TYPE RIHEA-SELMO, " 0 | |||
| lv_stkkz | TYPE RIHEA-IHBGR, " ' ' | |||
| lv_techv | TYPE STKO-TECHV, " SPACE | |||
| lv_tplnr | TYPE IFLO-TPLNR, " SPACE | |||
| lv_werks | TYPE MAST-WERKS, " SPACE | |||
| lv_with_equi | TYPE RIHEA-EQUBI, " ' ' | |||
| lv_with_equi_hier | TYPE RIHEA-EQHIE, " ' ' | |||
| lv_with_iflo_hier | TYPE RIHEA-FLHIE, " ' ' | |||
| lv_equnr | TYPE EQUI-EQUNR, " SPACE | |||
| lt_iflo_tab | TYPE STANDARD TABLE OF RIHIFLO, " | |||
| lv_no_object_defined | TYPE RIHIFLO, " | |||
| lv_with_btyp | TYPE RIHEA-IHBTY, " 'X' | |||
| lv_with_mara | TYPE RIHEA-BOMEX, " ' ' | |||
| lv_with_ibase_hier | TYPE RIHEA-IBASEEX, " ' ' | |||
| lv_capid | TYPE RC29L-CAPID, " SPACE | |||
| lv_emeng | TYPE STKO-BMENG, " 0 | |||
| lv_arbpl_int | TYPE FLAG, " ' ' | |||
| lv_authority_check | TYPE RIHEA-AUTHC, " 'X' | |||
| lv_i_grbom | TYPE GRBOM, " | |||
| lv_grafics | TYPE RIHEA-GRAFC, " ' ' | |||
| lt_stpo_tab | TYPE STANDARD TABLE OF RIHSTPX, " | |||
| lv_no_selection | TYPE RIHSTPX, " | |||
| lv_levdo | TYPE RIHEA-LEVDO, " '01' | |||
| lv_no_valid_equnr | TYPE RIHEA, " | |||
| lv_levup | TYPE RIHEA-LEVUP, " '00' | |||
| lv_no_valid_matnr | TYPE RIHEA, " | |||
| lv_matnr | TYPE MARA-MATNR, " SPACE | |||
| lv_no_valid_selmod | TYPE MARA, " | |||
| lv_read_new | TYPE RIHEA-HIERE, " ' ' | |||
| lv_no_valid_tplnr | TYPE RIHEA, " | |||
| lv_sanin | TYPE RIHEA-IHREL, " 'X' | |||
| lv_no_valid_grbom_werks | TYPE RIHEA, " | |||
| lv_select_equi | TYPE RIHEA-EQUSE. " ' ' |
|   CALL FUNCTION 'PM_HIERARCHY_CALL' "NOTRANSL: Åufruf der Strukturdarstellung allgemein |
| EXPORTING | ||
| DATUM | = lv_datum | |
| SELECT_IFLO | = lv_select_iflo | |
| SELECT_STPO | = lv_select_stpo | |
| SELMOD | = lv_selmod | |
| STKKZ | = lv_stkkz | |
| TECHV | = lv_techv | |
| TPLNR | = lv_tplnr | |
| WERKS | = lv_werks | |
| WITH_EQUI | = lv_with_equi | |
| WITH_EQUI_HIER | = lv_with_equi_hier | |
| WITH_IFLO_HIER | = lv_with_iflo_hier | |
| EQUNR | = lv_equnr | |
| WITH_BTYP | = lv_with_btyp | |
| WITH_MARA | = lv_with_mara | |
| WITH_IBASE_HIER | = lv_with_ibase_hier | |
| CAPID | = lv_capid | |
| EMENG | = lv_emeng | |
| ARBPL_INT | = lv_arbpl_int | |
| AUTHORITY_CHECK | = lv_authority_check | |
| I_GRBOM | = lv_i_grbom | |
| GRAFICS | = lv_grafics | |
| LEVDO | = lv_levdo | |
| LEVUP | = lv_levup | |
| MATNR | = lv_matnr | |
| READ_NEW | = lv_read_new | |
| SANIN | = lv_sanin | |
| SELECT_EQUI | = lv_select_equi | |
| IMPORTING | ||
| ET_HIER | = lv_et_hier | |
| TABLES | ||
| EQUI_TAB | = lt_equi_tab | |
| IFLO_TAB | = lt_iflo_tab | |
| STPO_TAB | = lt_stpo_tab | |
| EXCEPTIONS | ||
| NO_HIERARCHY = 1 | ||
| NO_OBJECT_DEFINED = 2 | ||
| NO_SELECTION = 3 | ||
| NO_VALID_EQUNR = 4 | ||
| NO_VALID_MATNR = 5 | ||
| NO_VALID_SELMOD = 6 | ||
| NO_VALID_TPLNR = 7 | ||
| NO_VALID_GRBOM_WERKS = 8 | ||
| . " PM_HIERARCHY_CALL | ||
ABAP code using 7.40 inline data declarations to call FM PM_HIERARCHY_CALL
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 TPLSE FROM RIHEA INTO @DATA(ld_select_iflo). | ||||
| DATA(ld_select_iflo) | = 'X'. | |||
| "SELECT single STPSE FROM RIHEA INTO @DATA(ld_select_stpo). | ||||
| DATA(ld_select_stpo) | = ' '. | |||
| "SELECT single SELMO FROM RIHEA INTO @DATA(ld_selmod). | ||||
| "SELECT single IHBGR FROM RIHEA INTO @DATA(ld_stkkz). | ||||
| DATA(ld_stkkz) | = ' '. | |||
| "SELECT single TECHV FROM STKO INTO @DATA(ld_techv). | ||||
| DATA(ld_techv) | = ' '. | |||
| "SELECT single TPLNR FROM IFLO INTO @DATA(ld_tplnr). | ||||
| DATA(ld_tplnr) | = ' '. | |||
| "SELECT single WERKS FROM MAST INTO @DATA(ld_werks). | ||||
| DATA(ld_werks) | = ' '. | |||
| "SELECT single EQUBI FROM RIHEA INTO @DATA(ld_with_equi). | ||||
| DATA(ld_with_equi) | = ' '. | |||
| "SELECT single EQHIE FROM RIHEA INTO @DATA(ld_with_equi_hier). | ||||
| DATA(ld_with_equi_hier) | = ' '. | |||
| "SELECT single FLHIE FROM RIHEA INTO @DATA(ld_with_iflo_hier). | ||||
| DATA(ld_with_iflo_hier) | = ' '. | |||
| "SELECT single EQUNR FROM EQUI INTO @DATA(ld_equnr). | ||||
| DATA(ld_equnr) | = ' '. | |||
| "SELECT single IHBTY FROM RIHEA INTO @DATA(ld_with_btyp). | ||||
| DATA(ld_with_btyp) | = 'X'. | |||
| "SELECT single BOMEX FROM RIHEA INTO @DATA(ld_with_mara). | ||||
| DATA(ld_with_mara) | = ' '. | |||
| "SELECT single IBASEEX FROM RIHEA INTO @DATA(ld_with_ibase_hier). | ||||
| DATA(ld_with_ibase_hier) | = ' '. | |||
| "SELECT single CAPID FROM RC29L INTO @DATA(ld_capid). | ||||
| DATA(ld_capid) | = ' '. | |||
| "SELECT single BMENG FROM STKO INTO @DATA(ld_emeng). | ||||
| DATA(ld_arbpl_int) | = ' '. | |||
| "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 LEVUP FROM RIHEA INTO @DATA(ld_levup). | ||||
| DATA(ld_levup) | = '00'. | |||
| "SELECT single MATNR FROM MARA INTO @DATA(ld_matnr). | ||||
| DATA(ld_matnr) | = ' '. | |||
| "SELECT single HIERE FROM RIHEA INTO @DATA(ld_read_new). | ||||
| DATA(ld_read_new) | = ' '. | |||
| "SELECT single IHREL FROM RIHEA INTO @DATA(ld_sanin). | ||||
| DATA(ld_sanin) | = 'X'. | |||
| "SELECT single EQUSE FROM RIHEA INTO @DATA(ld_select_equi). | ||||
| DATA(ld_select_equi) | = ' '. | |||
Search for further information about these or an SAP related objects