SAP CJDB_FILL_HIERARCHY Function Module for Read WBS element structure and add information to nodes of transf. table
CJDB_FILL_HIERARCHY is a standard cjdb fill hierarchy SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read WBS element structure and add information to nodes of transf. table processing and below is the pattern details for this FM, 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 cjdb fill hierarchy FM, simply by entering the name CJDB_FILL_HIERARCHY into the relevant SAP transaction such as SE37 or SE38.
Function Group: CJDB
Program Name: SAPLCJDB
Main Program: SAPLCJDB
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CJDB_FILL_HIERARCHY 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 'CJDB_FILL_HIERARCHY'"Read WBS element structure and add information to nodes of transf. table.
EXPORTING
* MAX_LEVEL = 99 "
* VSNMR = ' ' "Version number - if working with versions
* ARNMR = '000000' "
* STD_STRUCS = ' ' "
* TMP_STRUCS = ' ' "
* PFAD_OBEN = "
* HIEKZ = "
* FILL_PSPCODE = 'X' "
* PSJ_FUNCNAME = "
TABLES
I_PROJ = "
* I_PRPS_RNG = "
E_PRPS_CO = "
* E_PRPS_NOT_YET_READ = "
* E_PRPS_NOT_YET_READ_UP = "
EXCEPTIONS
WRONG_INPUT = 1
IMPORTING Parameters details for CJDB_FILL_HIERARCHY
MAX_LEVEL -
Data type: PRPS-STUFEDefault: 99
Optional: Yes
Call by Reference: No ( called with pass by value option)
VSNMR - Version number - if working with versions
Data type: VSKOPF-VSNMRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ARNMR -
Data type: ADMI_RUN-DOCUMENTDefault: '000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
STD_STRUCS -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TMP_STRUCS -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PFAD_OBEN -
Data type: TCNDB-PFAD_OBENOptional: Yes
Call by Reference: No ( called with pass by value option)
HIEKZ -
Data type: TCNDB-HIEKZOptional: Yes
Call by Reference: No ( called with pass by value option)
FILL_PSPCODE -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PSJ_FUNCNAME -
Data type: TFDIR-FUNCNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CJDB_FILL_HIERARCHY
I_PROJ -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
I_PRPS_RNG -
Data type: DBPSJ_PSP_RNGOptional: Yes
Call by Reference: No ( called with pass by value option)
E_PRPS_CO -
Data type: PRPS_COOptional: No
Call by Reference: No ( called with pass by value option)
E_PRPS_NOT_YET_READ -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
E_PRPS_NOT_YET_READ_UP -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
WRONG_INPUT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CJDB_FILL_HIERARCHY 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: | ||||
| lt_i_proj | TYPE STANDARD TABLE OF STRING, " | |||
| lv_max_level | TYPE PRPS-STUFE, " 99 | |||
| lv_wrong_input | TYPE PRPS, " | |||
| lv_vsnmr | TYPE VSKOPF-VSNMR, " SPACE | |||
| lt_i_prps_rng | TYPE STANDARD TABLE OF DBPSJ_PSP_RNG, " | |||
| lv_arnmr | TYPE ADMI_RUN-DOCUMENT, " '000000' | |||
| lt_e_prps_co | TYPE STANDARD TABLE OF PRPS_CO, " | |||
| lv_std_strucs | TYPE C, " SPACE | |||
| lt_e_prps_not_yet_read | TYPE STANDARD TABLE OF C, " | |||
| lv_tmp_strucs | TYPE C, " SPACE | |||
| lt_e_prps_not_yet_read_up | TYPE STANDARD TABLE OF C, " | |||
| lv_pfad_oben | TYPE TCNDB-PFAD_OBEN, " | |||
| lv_hiekz | TYPE TCNDB-HIEKZ, " | |||
| lv_fill_pspcode | TYPE C, " 'X' | |||
| lv_psj_funcname | TYPE TFDIR-FUNCNAME. " |
|   CALL FUNCTION 'CJDB_FILL_HIERARCHY' "Read WBS element structure and add information to nodes of transf. table |
| EXPORTING | ||
| MAX_LEVEL | = lv_max_level | |
| VSNMR | = lv_vsnmr | |
| ARNMR | = lv_arnmr | |
| STD_STRUCS | = lv_std_strucs | |
| TMP_STRUCS | = lv_tmp_strucs | |
| PFAD_OBEN | = lv_pfad_oben | |
| HIEKZ | = lv_hiekz | |
| FILL_PSPCODE | = lv_fill_pspcode | |
| PSJ_FUNCNAME | = lv_psj_funcname | |
| TABLES | ||
| I_PROJ | = lt_i_proj | |
| I_PRPS_RNG | = lt_i_prps_rng | |
| E_PRPS_CO | = lt_e_prps_co | |
| E_PRPS_NOT_YET_READ | = lt_e_prps_not_yet_read | |
| E_PRPS_NOT_YET_READ_UP | = lt_e_prps_not_yet_read_up | |
| EXCEPTIONS | ||
| WRONG_INPUT = 1 | ||
| . " CJDB_FILL_HIERARCHY | ||
ABAP code using 7.40 inline data declarations to call FM CJDB_FILL_HIERARCHY
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 STUFE FROM PRPS INTO @DATA(ld_max_level). | ||||
| DATA(ld_max_level) | = 99. | |||
| "SELECT single VSNMR FROM VSKOPF INTO @DATA(ld_vsnmr). | ||||
| DATA(ld_vsnmr) | = ' '. | |||
| "SELECT single DOCUMENT FROM ADMI_RUN INTO @DATA(ld_arnmr). | ||||
| DATA(ld_arnmr) | = '000000'. | |||
| DATA(ld_std_strucs) | = ' '. | |||
| DATA(ld_tmp_strucs) | = ' '. | |||
| "SELECT single PFAD_OBEN FROM TCNDB INTO @DATA(ld_pfad_oben). | ||||
| "SELECT single HIEKZ FROM TCNDB INTO @DATA(ld_hiekz). | ||||
| DATA(ld_fill_pspcode) | = 'X'. | |||
| "SELECT single FUNCNAME FROM TFDIR INTO @DATA(ld_psj_funcname). | ||||
Search for further information about these or an SAP related objects