SAP Function Modules

GRM_GET_FATHERS_LEVEL_1 SAP Function module







GRM_GET_FATHERS_LEVEL_1 is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name GRM_GET_FATHERS_LEVEL_1 into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: GRM_UTILITIES
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM GRM_GET_FATHERS_LEVEL_1 - GRM GET FATHERS LEVEL 1





CALL FUNCTION 'GRM_GET_FATHERS_LEVEL_1' "
  EXPORTING
    col_key =                   " tv_itmname    Column Name
    tree_handle =               " cl_gui_control  Object Reference
    key_date =                  " objec-begda   Key Date
    begda =                     " objec-begda
    endda =                     " objec-endda
  TABLES
    tree_objects =              " tree_objec
    tree_structure =            " tree_struc
    column_content =            " orgnodecon
*   legend_icon_text =          " treelegend
    .  "  GRM_GET_FATHERS_LEVEL_1

ABAP code example for Function Module GRM_GET_FATHERS_LEVEL_1





The ABAP code below is a full code listing to execute function module GRM_GET_FATHERS_LEVEL_1 including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_tree_objects  TYPE STANDARD TABLE OF TREE_OBJEC,"TABLES PARAM
wa_tree_objects  LIKE LINE OF it_tree_objects ,
it_tree_structure  TYPE STANDARD TABLE OF TREE_STRUC,"TABLES PARAM
wa_tree_structure  LIKE LINE OF it_tree_structure ,
it_column_content  TYPE STANDARD TABLE OF ORGNODECON,"TABLES PARAM
wa_column_content  LIKE LINE OF it_column_content ,
it_legend_icon_text  TYPE STANDARD TABLE OF TREELEGEND,"TABLES PARAM
wa_legend_icon_text  LIKE LINE OF it_legend_icon_text .

DATA(ld_col_key) = 'Check type of data required'.
DATA(ld_tree_handle) = 'Check type of data required'.

DATA(ld_key_date) = 20210129

DATA(ld_begda) = 20210129

DATA(ld_endda) = 20210129

"populate fields of struture and append to itab
append wa_tree_objects to it_tree_objects.

"populate fields of struture and append to itab
append wa_tree_structure to it_tree_structure.

"populate fields of struture and append to itab
append wa_column_content to it_column_content.

"populate fields of struture and append to itab
append wa_legend_icon_text to it_legend_icon_text. . CALL FUNCTION 'GRM_GET_FATHERS_LEVEL_1' EXPORTING col_key = ld_col_key tree_handle = ld_tree_handle key_date = ld_key_date begda = ld_begda endda = ld_endda TABLES tree_objects = it_tree_objects tree_structure = it_tree_structure column_content = it_column_content * legend_icon_text = it_legend_icon_text . " GRM_GET_FATHERS_LEVEL_1
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_col_key  TYPE TV_ITMNAME ,
it_tree_objects  TYPE STANDARD TABLE OF TREE_OBJEC ,
wa_tree_objects  LIKE LINE OF it_tree_objects,
ld_tree_handle  TYPE CL_GUI_CONTROL ,
it_tree_structure  TYPE STANDARD TABLE OF TREE_STRUC ,
wa_tree_structure  LIKE LINE OF it_tree_structure,
ld_key_date  TYPE OBJEC-BEGDA ,
it_column_content  TYPE STANDARD TABLE OF ORGNODECON ,
wa_column_content  LIKE LINE OF it_column_content,
ld_begda  TYPE OBJEC-BEGDA ,
it_legend_icon_text  TYPE STANDARD TABLE OF TREELEGEND ,
wa_legend_icon_text  LIKE LINE OF it_legend_icon_text,
ld_endda  TYPE OBJEC-ENDDA .

ld_col_key = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tree_objects to it_tree_objects.
ld_tree_handle = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tree_structure to it_tree_structure.

ld_key_date = 20210129

"populate fields of struture and append to itab
append wa_column_content to it_column_content.

ld_begda = 20210129

"populate fields of struture and append to itab
append wa_legend_icon_text to it_legend_icon_text.

ld_endda = 20210129

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name GRM_GET_FATHERS_LEVEL_1 or its description.