SAP AICH_PROG_HIER_READ_OLD Function Module for









AICH_PROG_HIER_READ_OLD is a standard aich prog hier read old 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 aich prog hier read old FM, simply by entering the name AICH_PROG_HIER_READ_OLD into the relevant SAP transaction such as SE37 or SE38.

Function Group: AICH
Program Name: SAPLAICH
Main Program:
Appliation area: A
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function AICH_PROG_HIER_READ_OLD 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 'AICH_PROG_HIER_READ_OLD'"
EXPORTING
I_COMPR_VRSN = "
I_INV_PROG = "
I_APPR_YEAR = "
* I_FROM_POSID = ' ' "
* I_FROM_POSNO = '00000000' "
* I_FLG_LEAFS_ONLY = ' ' "
* I_FLG_WITH_TEXT = 'X' "
* I_LANGU = SY-LANGU "
* I_FLG_BUFFER = ' ' "

IMPORTING
ES_IMCHIE_FROM_POS = "
ET_RSTHIE = "
ETH_POSITIONS = "
ET_IMCHIE = "
ET_IMCEPPT = "

EXCEPTIONS
ENTRY_POSITION_NOT_FOUND = 1 NO_HIERARCHY_FOUND = 2
.



IMPORTING Parameters details for AICH_PROG_HIER_READ_OLD

I_COMPR_VRSN -

Data type: IMCHIE-COMPR_VRSN
Optional: No
Call by Reference: No ( called with pass by value option)

I_INV_PROG -

Data type: IMCHIE-INV_PROG
Optional: No
Call by Reference: No ( called with pass by value option)

I_APPR_YEAR -

Data type: IMCHIE-APPR_YEAR
Optional: No
Call by Reference: No ( called with pass by value option)

I_FROM_POSID -

Data type: IMCHIE-PROG_POS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FROM_POSNO -

Data type: IMCHIE-POS_NO
Default: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FLG_LEAFS_ONLY -

Data type: IMIS_TYPE_FLG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FLG_WITH_TEXT -

Data type: IMIS_TYPE_FLG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LANGU -

Data type: IMCEPPT-LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FLG_BUFFER -

Data type: IMIS_TYPE_FLG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for AICH_PROG_HIER_READ_OLD

ES_IMCHIE_FROM_POS -

Data type: IMIS_TYPE_S_IMCHIE
Optional: No
Call by Reference: No ( called with pass by value option)

ET_RSTHIE -

Data type: IMIS_TYPE_T_RSTHIE
Optional: No
Call by Reference: Yes

ETH_POSITIONS -

Data type: IMIS_TYPE_TH_POS
Optional: No
Call by Reference: Yes

ET_IMCHIE -

Data type: IMIS_TYPE_T_IMCHIE
Optional: No
Call by Reference: Yes

ET_IMCEPPT -

Data type: IMIS_TYPE_T_IMCEPPT
Optional: No
Call by Reference: Yes

EXCEPTIONS details

ENTRY_POSITION_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_HIERARCHY_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for AICH_PROG_HIER_READ_OLD 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_compr_vrsn  TYPE IMCHIE-COMPR_VRSN, "   
lv_es_imchie_from_pos  TYPE IMIS_TYPE_S_IMCHIE, "   
lv_entry_position_not_found  TYPE IMIS_TYPE_S_IMCHIE, "   
lv_et_rsthie  TYPE IMIS_TYPE_T_RSTHIE, "   
lv_i_inv_prog  TYPE IMCHIE-INV_PROG, "   
lv_no_hierarchy_found  TYPE IMCHIE, "   
lv_i_appr_year  TYPE IMCHIE-APPR_YEAR, "   
lv_eth_positions  TYPE IMIS_TYPE_TH_POS, "   
lv_et_imchie  TYPE IMIS_TYPE_T_IMCHIE, "   
lv_i_from_posid  TYPE IMCHIE-PROG_POS, "   SPACE
lv_et_imceppt  TYPE IMIS_TYPE_T_IMCEPPT, "   
lv_i_from_posno  TYPE IMCHIE-POS_NO, "   '00000000'
lv_i_flg_leafs_only  TYPE IMIS_TYPE_FLG, "   SPACE
lv_i_flg_with_text  TYPE IMIS_TYPE_FLG, "   'X'
lv_i_langu  TYPE IMCEPPT-LANGU, "   SY-LANGU
lv_i_flg_buffer  TYPE IMIS_TYPE_FLG. "   SPACE

  CALL FUNCTION 'AICH_PROG_HIER_READ_OLD'  "
    EXPORTING
         I_COMPR_VRSN = lv_i_compr_vrsn
         I_INV_PROG = lv_i_inv_prog
         I_APPR_YEAR = lv_i_appr_year
         I_FROM_POSID = lv_i_from_posid
         I_FROM_POSNO = lv_i_from_posno
         I_FLG_LEAFS_ONLY = lv_i_flg_leafs_only
         I_FLG_WITH_TEXT = lv_i_flg_with_text
         I_LANGU = lv_i_langu
         I_FLG_BUFFER = lv_i_flg_buffer
    IMPORTING
         ES_IMCHIE_FROM_POS = lv_es_imchie_from_pos
         ET_RSTHIE = lv_et_rsthie
         ETH_POSITIONS = lv_eth_positions
         ET_IMCHIE = lv_et_imchie
         ET_IMCEPPT = lv_et_imceppt
    EXCEPTIONS
        ENTRY_POSITION_NOT_FOUND = 1
        NO_HIERARCHY_FOUND = 2
. " AICH_PROG_HIER_READ_OLD




ABAP code using 7.40 inline data declarations to call FM AICH_PROG_HIER_READ_OLD

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 COMPR_VRSN FROM IMCHIE INTO @DATA(ld_i_compr_vrsn).
 
 
 
 
"SELECT single INV_PROG FROM IMCHIE INTO @DATA(ld_i_inv_prog).
 
 
"SELECT single APPR_YEAR FROM IMCHIE INTO @DATA(ld_i_appr_year).
 
 
 
"SELECT single PROG_POS FROM IMCHIE INTO @DATA(ld_i_from_posid).
DATA(ld_i_from_posid) = ' '.
 
 
"SELECT single POS_NO FROM IMCHIE INTO @DATA(ld_i_from_posno).
DATA(ld_i_from_posno) = '00000000'.
 
DATA(ld_i_flg_leafs_only) = ' '.
 
DATA(ld_i_flg_with_text) = 'X'.
 
"SELECT single LANGU FROM IMCEPPT INTO @DATA(ld_i_langu).
DATA(ld_i_langu) = SY-LANGU.
 
DATA(ld_i_flg_buffer) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!