SAP RHGA_READ_TREE_UP Function Module for
RHGA_READ_TREE_UP is a standard rhga read tree up 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 rhga read tree up FM, simply by entering the name RHGA_READ_TREE_UP into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRBAS00GENATTR_RUNTIME
Program Name: SAPLHRBAS00GENATTR_RUNTIME
Main Program: SAPLHRBAS00GENATTR_RUNTIME
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RHGA_READ_TREE_UP 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 'RHGA_READ_TREE_UP'".
EXPORTING
* SCENARIO = ' ' "Business Scenario
* PATH_UP = ' ' "Evaluation Path
* PATH_UP_INT = ' ' "
OTYPE = "Object Type
REALO = "Extended object ID
* PPOMA_MODE = ' ' "Call from PPOMA
* SELDATE = SY-DATUM "
IMPORTING
SINGLE_TREE = "HR: Object Key (with Plan Version)
LAST_OBJECT = "
EXCEPTIONS
INVALID_SCENARIO = 1 INTERNAL_ERROR = 2 ERROR_READING_STRUCTURE = 3
IMPORTING Parameters details for RHGA_READ_TREE_UP
SCENARIO - Business Scenario
Data type: OM_ATTRSCNDefault: SPACE
Optional: Yes
Call by Reference: Yes
PATH_UP - Evaluation Path
Data type: WEGIDDefault: SPACE
Optional: Yes
Call by Reference: Yes
PATH_UP_INT -
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: Yes
OTYPE - Object Type
Data type: OTYPEOptional: No
Call by Reference: Yes
REALO - Extended object ID
Data type: REALOOptional: No
Call by Reference: Yes
PPOMA_MODE - Call from PPOMA
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: Yes
SELDATE -
Data type: OMSELDATEDefault: SY-DATUM
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for RHGA_READ_TREE_UP
SINGLE_TREE - HR: Object Key (with Plan Version)
Data type: HRTB_OBJKEYOptional: No
Call by Reference: Yes
LAST_OBJECT -
Data type: HROBJECTOptional: No
Call by Reference: Yes
EXCEPTIONS details
INVALID_SCENARIO -
Data type:Optional: No
Call by Reference: Yes
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: Yes
ERROR_READING_STRUCTURE -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RHGA_READ_TREE_UP 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_scenario | TYPE OM_ATTRSCN, " SPACE | |||
| lv_single_tree | TYPE HRTB_OBJKEY, " | |||
| lv_invalid_scenario | TYPE HRTB_OBJKEY, " | |||
| lv_path_up | TYPE WEGID, " SPACE | |||
| lv_last_object | TYPE HROBJECT, " | |||
| lv_internal_error | TYPE HROBJECT, " | |||
| lv_path_up_int | TYPE FLAG, " SPACE | |||
| lv_error_reading_structure | TYPE FLAG, " | |||
| lv_otype | TYPE OTYPE, " | |||
| lv_realo | TYPE REALO, " | |||
| lv_ppoma_mode | TYPE FLAG, " SPACE | |||
| lv_seldate | TYPE OMSELDATE. " SY-DATUM |
|   CALL FUNCTION 'RHGA_READ_TREE_UP' " |
| EXPORTING | ||
| SCENARIO | = lv_scenario | |
| PATH_UP | = lv_path_up | |
| PATH_UP_INT | = lv_path_up_int | |
| OTYPE | = lv_otype | |
| REALO | = lv_realo | |
| PPOMA_MODE | = lv_ppoma_mode | |
| SELDATE | = lv_seldate | |
| IMPORTING | ||
| SINGLE_TREE | = lv_single_tree | |
| LAST_OBJECT | = lv_last_object | |
| EXCEPTIONS | ||
| INVALID_SCENARIO = 1 | ||
| INTERNAL_ERROR = 2 | ||
| ERROR_READING_STRUCTURE = 3 | ||
| . " RHGA_READ_TREE_UP | ||
ABAP code using 7.40 inline data declarations to call FM RHGA_READ_TREE_UP
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.| DATA(ld_scenario) | = ' '. | |||
| DATA(ld_path_up) | = ' '. | |||
| DATA(ld_path_up_int) | = ' '. | |||
| DATA(ld_ppoma_mode) | = ' '. | |||
| DATA(ld_seldate) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects