SAP FMHR_CTR_FROM_HIERARCHY_LEVEL Function Module for
FMHR_CTR_FROM_HIERARCHY_LEVEL is a standard fmhr ctr from hierarchy level SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 fmhr ctr from hierarchy level FM, simply by entering the name FMHR_CTR_FROM_HIERARCHY_LEVEL into the relevant SAP transaction such as SE37 or SE38.
Function Group: FMHR
Program Name: SAPLFMHR
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FMHR_CTR_FROM_HIERARCHY_LEVEL 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 'FMHR_CTR_FROM_HIERARCHY_LEVEL'".
EXPORTING
IP_FIKRS = "
* IP_PARENT_CTR = ' ' "
* IP_CTRHIVERS = 'SAP' "
* IP_FLG_GET_NODE = ' ' "
IMPORTING
OP_CNT_FOUND = "
TABLES
T_GET_FICTR = "
IMPORTING Parameters details for FMHR_CTR_FROM_HIERARCHY_LEVEL
IP_FIKRS -
Data type: FM01-FIKRSOptional: No
Call by Reference: No ( called with pass by value option)
IP_PARENT_CTR -
Data type: FMHICTR-PARENT_OBJDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_CTRHIVERS -
Data type: FMHICTR-CTRHIVERSDefault: 'SAP'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_FLG_GET_NODE -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FMHR_CTR_FROM_HIERARCHY_LEVEL
OP_CNT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FMHR_CTR_FROM_HIERARCHY_LEVEL
T_GET_FICTR -
Data type: IFMPTRNODEOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FMHR_CTR_FROM_HIERARCHY_LEVEL 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_ip_fikrs | TYPE FM01-FIKRS, " | |||
| lt_t_get_fictr | TYPE STANDARD TABLE OF IFMPTRNODE, " | |||
| lv_op_cnt_found | TYPE IFMPTRNODE, " | |||
| lv_ip_parent_ctr | TYPE FMHICTR-PARENT_OBJ, " SPACE | |||
| lv_ip_ctrhivers | TYPE FMHICTR-CTRHIVERS, " 'SAP' | |||
| lv_ip_flg_get_node | TYPE FMHICTR. " SPACE |
|   CALL FUNCTION 'FMHR_CTR_FROM_HIERARCHY_LEVEL' " |
| EXPORTING | ||
| IP_FIKRS | = lv_ip_fikrs | |
| IP_PARENT_CTR | = lv_ip_parent_ctr | |
| IP_CTRHIVERS | = lv_ip_ctrhivers | |
| IP_FLG_GET_NODE | = lv_ip_flg_get_node | |
| IMPORTING | ||
| OP_CNT_FOUND | = lv_op_cnt_found | |
| TABLES | ||
| T_GET_FICTR | = lt_t_get_fictr | |
| . " FMHR_CTR_FROM_HIERARCHY_LEVEL | ||
ABAP code using 7.40 inline data declarations to call FM FMHR_CTR_FROM_HIERARCHY_LEVEL
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 FIKRS FROM FM01 INTO @DATA(ld_ip_fikrs). | ||||
| "SELECT single PARENT_OBJ FROM FMHICTR INTO @DATA(ld_ip_parent_ctr). | ||||
| DATA(ld_ip_parent_ctr) | = ' '. | |||
| "SELECT single CTRHIVERS FROM FMHICTR INTO @DATA(ld_ip_ctrhivers). | ||||
| DATA(ld_ip_ctrhivers) | = 'SAP'. | |||
| DATA(ld_ip_flg_get_node) | = ' '. | |||
Search for further information about these or an SAP related objects