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

Function FMHIE_SET_HIEID 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 'FMHIE_SET_HIEID'"Set Hierarchy Id.
EXPORTING
IM_FM_AREA = "Financial Management Area
IM_FISCYEAR = "Fiscal Year
IM_BUDCAT = "Budget category
IM_BS = "Name of Budget Structure
* IM_HIE_ID = ' ' "Hierarchy ID
IMPORTING
E_HIE_ID = "
E_HIE_ID_TEXT = "
E_BA_DEFINITION = "Hierarchical Budget Address Definition Rule
E_PA_DEFINITION = "Hierarchical Posting Address Definition Rule
E_AUTHGRP = "Authorization Group of the Hierarchy ID
EXCEPTIONS
CANCEL = 1 INVALID_HIE_ID = 2 CREATED = 3
IMPORTING Parameters details for FMHIE_SET_HIEID
IM_FM_AREA - Financial Management Area
Data type: FMHIEIDS-FM_AREAOptional: No
Call by Reference: Yes
IM_FISCYEAR - Fiscal Year
Data type: FMHIEIDS-FISCYEAROptional: No
Call by Reference: Yes
IM_BUDCAT - Budget category
Data type: FMHIEIDS-BUDCATOptional: No
Call by Reference: Yes
IM_BS - Name of Budget Structure
Data type: FMHIEIDS-BSOptional: No
Call by Reference: Yes
IM_HIE_ID - Hierarchy ID
Data type: FMHIEIDS-HIE_IDDefault: ' '
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for FMHIE_SET_HIEID
E_HIE_ID -
Data type: FMHIEIDS-HIE_IDOptional: No
Call by Reference: Yes
E_HIE_ID_TEXT -
Data type: FMHIEIDST-TEXTOptional: No
Call by Reference: Yes
E_BA_DEFINITION - Hierarchical Budget Address Definition Rule
Data type: FMHIE_BA_DEFINITIONOptional: No
Call by Reference: Yes
E_PA_DEFINITION - Hierarchical Posting Address Definition Rule
Data type: FMHIE_PA_DEFINITIONOptional: No
Call by Reference: Yes
E_AUTHGRP - Authorization Group of the Hierarchy ID
Data type: FM_AUTHGRP_HIEIDOptional: No
Call by Reference: Yes
EXCEPTIONS details
CANCEL - Cancel
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_HIE_ID - Invalid Hierarchy ID
Data type:Optional: No
Call by Reference: Yes
CREATED - Sub-Hierarchy was created
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FMHIE_SET_HIEID 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_cancel | TYPE STRING, " | |||
| lv_e_hie_id | TYPE FMHIEIDS-HIE_ID, " | |||
| lv_im_fm_area | TYPE FMHIEIDS-FM_AREA, " | |||
| lv_im_fiscyear | TYPE FMHIEIDS-FISCYEAR, " | |||
| lv_e_hie_id_text | TYPE FMHIEIDST-TEXT, " | |||
| lv_invalid_hie_id | TYPE FMHIEIDST, " | |||
| lv_created | TYPE FMHIEIDST, " | |||
| lv_im_budcat | TYPE FMHIEIDS-BUDCAT, " | |||
| lv_e_ba_definition | TYPE FMHIE_BA_DEFINITION, " | |||
| lv_im_bs | TYPE FMHIEIDS-BS, " | |||
| lv_e_pa_definition | TYPE FMHIE_PA_DEFINITION, " | |||
| lv_e_authgrp | TYPE FM_AUTHGRP_HIEID, " | |||
| lv_im_hie_id | TYPE FMHIEIDS-HIE_ID. " ' ' |
|   CALL FUNCTION 'FMHIE_SET_HIEID' "Set Hierarchy Id |
| EXPORTING | ||
| IM_FM_AREA | = lv_im_fm_area | |
| IM_FISCYEAR | = lv_im_fiscyear | |
| IM_BUDCAT | = lv_im_budcat | |
| IM_BS | = lv_im_bs | |
| IM_HIE_ID | = lv_im_hie_id | |
| IMPORTING | ||
| E_HIE_ID | = lv_e_hie_id | |
| E_HIE_ID_TEXT | = lv_e_hie_id_text | |
| E_BA_DEFINITION | = lv_e_ba_definition | |
| E_PA_DEFINITION | = lv_e_pa_definition | |
| E_AUTHGRP | = lv_e_authgrp | |
| EXCEPTIONS | ||
| CANCEL = 1 | ||
| INVALID_HIE_ID = 2 | ||
| CREATED = 3 | ||
| . " FMHIE_SET_HIEID | ||
ABAP code using 7.40 inline data declarations to call FM FMHIE_SET_HIEID
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 HIE_ID FROM FMHIEIDS INTO @DATA(ld_e_hie_id). | ||||
| "SELECT single FM_AREA FROM FMHIEIDS INTO @DATA(ld_im_fm_area). | ||||
| "SELECT single FISCYEAR FROM FMHIEIDS INTO @DATA(ld_im_fiscyear). | ||||
| "SELECT single TEXT FROM FMHIEIDST INTO @DATA(ld_e_hie_id_text). | ||||
| "SELECT single BUDCAT FROM FMHIEIDS INTO @DATA(ld_im_budcat). | ||||
| "SELECT single BS FROM FMHIEIDS INTO @DATA(ld_im_bs). | ||||
| "SELECT single HIE_ID FROM FMHIEIDS INTO @DATA(ld_im_hie_id). | ||||
| DATA(ld_im_hie_id) | = ' '. | |||
Search for further information about these or an SAP related objects