SAP FM_COM_ITEM_READ_HIER Function Module for









FM_COM_ITEM_READ_HIER is a standard fm com item read hier 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 fm com item read hier FM, simply by entering the name FM_COM_ITEM_READ_HIER into the relevant SAP transaction such as SE37 or SE38.

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



Function FM_COM_ITEM_READ_HIER 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 'FM_COM_ITEM_READ_HIER'"
EXPORTING
I_FIKRS = "
* I_GJAHR = 0000 "
I_VARNT = "
* I_FIPEX = "
* I_FLG_SORT = 'X' "

TABLES
E_T_FMHICI = "

EXCEPTIONS
INPUT_ERROR = 1 FIKRS_NOT_FOUND = 2 WRONG_GJAHR = 3 FIPEX_NOT_FOUND = 4 ERROR_OCCURED = 5
.



IMPORTING Parameters details for FM_COM_ITEM_READ_HIER

I_FIKRS -

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

I_GJAHR -

Data type: FMHICI-GJAHR
Default: 0000
Optional: No
Call by Reference: No ( called with pass by value option)

I_VARNT -

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

I_FIPEX -

Data type: FMHICI-FIPEX
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FLG_SORT -

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

TABLES Parameters details for FM_COM_ITEM_READ_HIER

E_T_FMHICI -

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

EXCEPTIONS details

INPUT_ERROR -

Data type:
Optional: No
Call by Reference: Yes

FIKRS_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

WRONG_GJAHR -

Data type:
Optional: No
Call by Reference: Yes

FIPEX_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

ERROR_OCCURED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for FM_COM_ITEM_READ_HIER 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_fikrs  TYPE FMHICI-FIKRS, "   
lt_e_t_fmhici  TYPE STANDARD TABLE OF FMHICI, "   
lv_input_error  TYPE FMHICI, "   
lv_i_gjahr  TYPE FMHICI-GJAHR, "   0000
lv_fikrs_not_found  TYPE FMHICI, "   
lv_i_varnt  TYPE FMHICI-VARNT, "   
lv_wrong_gjahr  TYPE FMHICI, "   
lv_i_fipex  TYPE FMHICI-FIPEX, "   
lv_fipex_not_found  TYPE FMHICI, "   
lv_i_flg_sort  TYPE FMDY-XFELD, "   'X'
lv_error_occured  TYPE FMDY. "   

  CALL FUNCTION 'FM_COM_ITEM_READ_HIER'  "
    EXPORTING
         I_FIKRS = lv_i_fikrs
         I_GJAHR = lv_i_gjahr
         I_VARNT = lv_i_varnt
         I_FIPEX = lv_i_fipex
         I_FLG_SORT = lv_i_flg_sort
    TABLES
         E_T_FMHICI = lt_e_t_fmhici
    EXCEPTIONS
        INPUT_ERROR = 1
        FIKRS_NOT_FOUND = 2
        WRONG_GJAHR = 3
        FIPEX_NOT_FOUND = 4
        ERROR_OCCURED = 5
. " FM_COM_ITEM_READ_HIER




ABAP code using 7.40 inline data declarations to call FM FM_COM_ITEM_READ_HIER

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 FMHICI INTO @DATA(ld_i_fikrs).
 
 
 
"SELECT single GJAHR FROM FMHICI INTO @DATA(ld_i_gjahr).
DATA(ld_i_gjahr) = 0000.
 
 
"SELECT single VARNT FROM FMHICI INTO @DATA(ld_i_varnt).
 
 
"SELECT single FIPEX FROM FMHICI INTO @DATA(ld_i_fipex).
 
 
"SELECT single XFELD FROM FMDY INTO @DATA(ld_i_flg_sort).
DATA(ld_i_flg_sort) = 'X'.
 
 


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!