SAP HRWPC_GET_PATHROOTS Function Module for
HRWPC_GET_PATHROOTS is a standard hrwpc get pathroots 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 hrwpc get pathroots FM, simply by entering the name HRWPC_GET_PATHROOTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRWPC_TO_DATA_SUPPLIER
Program Name: SAPLHRWPC_TO_DATA_SUPPLIER
Main Program: SAPLHRWPC_TO_DATA_SUPPLIER
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HRWPC_GET_PATHROOTS 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 'HRWPC_GET_PATHROOTS'".
EXPORTING
* USER = SY-UNAME "
* OTYPE = "
* OBJID = "
* PLVAR = "
* BEGDA = SY-DATUM "
* ENDDA = '99991231' "
* PATHID = "
* DEPTH = 0 "
* FM_PATHROOTS = "
TABLES
* PARAMVALUES = "
* ROOT_OBJECTS = "
* KEYOBJEC = "
* KEYSTRUC = "
EXCEPTIONS
NO_ROOTS_FOUND = 1 INVALID_FUNCTION_MODULE = 2
IMPORTING Parameters details for HRWPC_GET_PATHROOTS
USER -
Data type: SY-UNAMEDefault: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)
OTYPE -
Data type: STRUC-OTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
OBJID -
Data type: STRUC-OBJIDOptional: Yes
Call by Reference: No ( called with pass by value option)
PLVAR -
Data type: OBJEC-PLVAROptional: Yes
Call by Reference: No ( called with pass by value option)
BEGDA -
Data type: OBJEC-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA -
Data type: OBJEC-ENDDADefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PATHID -
Data type: GDSTR-WEGIDOptional: Yes
Call by Reference: No ( called with pass by value option)
DEPTH -
Data type: GDSTR-DEPTHOptional: Yes
Call by Reference: No ( called with pass by value option)
FM_PATHROOTS -
Data type: RS38L-NAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HRWPC_GET_PATHROOTS
PARAMVALUES -
Data type: HRWPC_S_OADP_PARAMVALUEOptional: Yes
Call by Reference: Yes
ROOT_OBJECTS -
Data type: HRROOTOBOptional: Yes
Call by Reference: Yes
KEYOBJEC -
Data type: HRWPC_S_KEYOBJECOptional: Yes
Call by Reference: Yes
KEYSTRUC -
Data type: HRWPC_S_KEYSTRUCOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_ROOTS_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_FUNCTION_MODULE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HRWPC_GET_PATHROOTS 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_user | TYPE SY-UNAME, " SY-UNAME | |||
| lt_paramvalues | TYPE STANDARD TABLE OF HRWPC_S_OADP_PARAMVALUE, " | |||
| lv_no_roots_found | TYPE HRWPC_S_OADP_PARAMVALUE, " | |||
| lv_otype | TYPE STRUC-OTYPE, " | |||
| lt_root_objects | TYPE STANDARD TABLE OF HRROOTOB, " | |||
| lv_invalid_function_module | TYPE HRROOTOB, " | |||
| lv_objid | TYPE STRUC-OBJID, " | |||
| lt_keyobjec | TYPE STANDARD TABLE OF HRWPC_S_KEYOBJEC, " | |||
| lv_plvar | TYPE OBJEC-PLVAR, " | |||
| lt_keystruc | TYPE STANDARD TABLE OF HRWPC_S_KEYSTRUC, " | |||
| lv_begda | TYPE OBJEC-BEGDA, " SY-DATUM | |||
| lv_endda | TYPE OBJEC-ENDDA, " '99991231' | |||
| lv_pathid | TYPE GDSTR-WEGID, " | |||
| lv_depth | TYPE GDSTR-DEPTH, " 0 | |||
| lv_fm_pathroots | TYPE RS38L-NAME. " |
|   CALL FUNCTION 'HRWPC_GET_PATHROOTS' " |
| EXPORTING | ||
| USER | = lv_user | |
| OTYPE | = lv_otype | |
| OBJID | = lv_objid | |
| PLVAR | = lv_plvar | |
| BEGDA | = lv_begda | |
| ENDDA | = lv_endda | |
| PATHID | = lv_pathid | |
| DEPTH | = lv_depth | |
| FM_PATHROOTS | = lv_fm_pathroots | |
| TABLES | ||
| PARAMVALUES | = lt_paramvalues | |
| ROOT_OBJECTS | = lt_root_objects | |
| KEYOBJEC | = lt_keyobjec | |
| KEYSTRUC | = lt_keystruc | |
| EXCEPTIONS | ||
| NO_ROOTS_FOUND = 1 | ||
| INVALID_FUNCTION_MODULE = 2 | ||
| . " HRWPC_GET_PATHROOTS | ||
ABAP code using 7.40 inline data declarations to call FM HRWPC_GET_PATHROOTS
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 UNAME FROM SY INTO @DATA(ld_user). | ||||
| DATA(ld_user) | = SY-UNAME. | |||
| "SELECT single OTYPE FROM STRUC INTO @DATA(ld_otype). | ||||
| "SELECT single OBJID FROM STRUC INTO @DATA(ld_objid). | ||||
| "SELECT single PLVAR FROM OBJEC INTO @DATA(ld_plvar). | ||||
| "SELECT single BEGDA FROM OBJEC INTO @DATA(ld_begda). | ||||
| DATA(ld_begda) | = SY-DATUM. | |||
| "SELECT single ENDDA FROM OBJEC INTO @DATA(ld_endda). | ||||
| DATA(ld_endda) | = '99991231'. | |||
| "SELECT single WEGID FROM GDSTR INTO @DATA(ld_pathid). | ||||
| "SELECT single DEPTH FROM GDSTR INTO @DATA(ld_depth). | ||||
| "SELECT single NAME FROM RS38L INTO @DATA(ld_fm_pathroots). | ||||
Search for further information about these or an SAP related objects