SAP HR_ESS_SET_ITS_TREEFIELDS Function Module for
HR_ESS_SET_ITS_TREEFIELDS is a standard hr ess set its treefields 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 hr ess set its treefields FM, simply by entering the name HR_ESS_SET_ITS_TREEFIELDS into the relevant SAP transaction such as SE37 or SE38.
Function Group: EHSS
Program Name: SAPLEHSS
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HR_ESS_SET_ITS_TREEFIELDS 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 'HR_ESS_SET_ITS_TREEFIELDS'".
EXPORTING
OPERATION = "
* CUSTOM2_TARGET = "
* CUSTOM3_TARGET = "
* CUSTOM4_TARGET = "
* CUSTOM5_TARGET = "
* CUSTOM6_TARGET = "
* CUSTOM7_TARGET = "
* CUSTOM8_TARGET = "
* CUSTOM9_TARGET = "
* SELECT_NODE = "
* ACTIVATE_NODE_TARGET = "
* ANCEST_ROOT_TARGET = "
* EXPAND_ALL_TARGET = "
* EXPAND_LEAF_TARGET = "
* SELECT_NODE_TARGET = "
* CUSTOM0_TARGET = "
* CUSTOM1_TARGET = "
TABLES
* NODE_TABLE = "
* COL_TABLE = "
* HEADER_TABLE = "
* ITEM_TABLE = "
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLEHSS_001 Check Start Date for ESS
EXIT_SAPLEHSS_002 Propose Start Date for ESS
IMPORTING Parameters details for HR_ESS_SET_ITS_TREEFIELDS
OPERATION -
Data type:Optional: No
Call by Reference: Yes
CUSTOM2_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
CUSTOM3_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
CUSTOM4_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
CUSTOM5_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
CUSTOM6_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
CUSTOM7_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
CUSTOM8_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
CUSTOM9_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
SELECT_NODE -
Data type:Optional: Yes
Call by Reference: Yes
ACTIVATE_NODE_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
ANCEST_ROOT_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
EXPAND_ALL_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
EXPAND_LEAF_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
SELECT_NODE_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
CUSTOM0_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
CUSTOM1_TARGET -
Data type:Optional: Yes
Call by Reference: Yes
TABLES Parameters details for HR_ESS_SET_ITS_TREEFIELDS
NODE_TABLE -
Data type: ESS_TREEV_NODEOptional: Yes
Call by Reference: Yes
COL_TABLE -
Data type: TREEV_COLOptional: Yes
Call by Reference: No ( called with pass by value option)
HEADER_TABLE -
Data type: TREEV_HDROptional: Yes
Call by Reference: No ( called with pass by value option)
ITEM_TABLE -
Data type: ESS_TREEV_ITEMOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_ESS_SET_ITS_TREEFIELDS 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_operation | TYPE STRING, " | |||
| lt_node_table | TYPE STANDARD TABLE OF ESS_TREEV_NODE, " | |||
| lv_custom2_target | TYPE ESS_TREEV_NODE, " | |||
| lv_custom3_target | TYPE ESS_TREEV_NODE, " | |||
| lv_custom4_target | TYPE ESS_TREEV_NODE, " | |||
| lv_custom5_target | TYPE ESS_TREEV_NODE, " | |||
| lv_custom6_target | TYPE ESS_TREEV_NODE, " | |||
| lv_custom7_target | TYPE ESS_TREEV_NODE, " | |||
| lv_custom8_target | TYPE ESS_TREEV_NODE, " | |||
| lv_custom9_target | TYPE ESS_TREEV_NODE, " | |||
| lt_col_table | TYPE STANDARD TABLE OF TREEV_COL, " | |||
| lv_select_node | TYPE TREEV_COL, " | |||
| lt_header_table | TYPE STANDARD TABLE OF TREEV_HDR, " | |||
| lv_activate_node_target | TYPE TREEV_HDR, " | |||
| lt_item_table | TYPE STANDARD TABLE OF ESS_TREEV_ITEM, " | |||
| lv_ancest_root_target | TYPE ESS_TREEV_ITEM, " | |||
| lv_expand_all_target | TYPE ESS_TREEV_ITEM, " | |||
| lv_expand_leaf_target | TYPE ESS_TREEV_ITEM, " | |||
| lv_select_node_target | TYPE ESS_TREEV_ITEM, " | |||
| lv_custom0_target | TYPE ESS_TREEV_ITEM, " | |||
| lv_custom1_target | TYPE ESS_TREEV_ITEM. " |
|   CALL FUNCTION 'HR_ESS_SET_ITS_TREEFIELDS' " |
| EXPORTING | ||
| OPERATION | = lv_operation | |
| CUSTOM2_TARGET | = lv_custom2_target | |
| CUSTOM3_TARGET | = lv_custom3_target | |
| CUSTOM4_TARGET | = lv_custom4_target | |
| CUSTOM5_TARGET | = lv_custom5_target | |
| CUSTOM6_TARGET | = lv_custom6_target | |
| CUSTOM7_TARGET | = lv_custom7_target | |
| CUSTOM8_TARGET | = lv_custom8_target | |
| CUSTOM9_TARGET | = lv_custom9_target | |
| SELECT_NODE | = lv_select_node | |
| ACTIVATE_NODE_TARGET | = lv_activate_node_target | |
| ANCEST_ROOT_TARGET | = lv_ancest_root_target | |
| EXPAND_ALL_TARGET | = lv_expand_all_target | |
| EXPAND_LEAF_TARGET | = lv_expand_leaf_target | |
| SELECT_NODE_TARGET | = lv_select_node_target | |
| CUSTOM0_TARGET | = lv_custom0_target | |
| CUSTOM1_TARGET | = lv_custom1_target | |
| TABLES | ||
| NODE_TABLE | = lt_node_table | |
| COL_TABLE | = lt_col_table | |
| HEADER_TABLE | = lt_header_table | |
| ITEM_TABLE | = lt_item_table | |
| . " HR_ESS_SET_ITS_TREEFIELDS | ||
ABAP code using 7.40 inline data declarations to call FM HR_ESS_SET_ITS_TREEFIELDS
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.Search for further information about these or an SAP related objects