SAP CJDW_GET_TREE Function Module for NOTRANSL: Aufbau Displaytabelle









CJDW_GET_TREE is a standard cjdw get tree SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Aufbau Displaytabelle 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 cjdw get tree FM, simply by entering the name CJDW_GET_TREE into the relevant SAP transaction such as SE37 or SE38.

Function Group: CJDW
Program Name: SAPLCJDW
Main Program: SAPLCJDW
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CJDW_GET_TREE 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 'CJDW_GET_TREE'"NOTRANSL: Aufbau Displaytabelle
EXPORTING
* INDEX = 0 "From element (index in document table)
* LEVELS = ' ' "Number of levels (including from element)
* X_APPEND = ' ' "X = complete element table (not initialized)
* X_FROM_ENTRY = ' ' "X = path upwards to initial element
* X_OUTLINE = 'X' "X = Take outlining into account
* X_SUPERIORS = ' ' "X = path upwards to root (also via setting)
* X_SUPRESS_DEL = ' ' "X = Suppress PSP element with deletion flag

TABLES
ELEMENTS = "Elements

EXCEPTIONS
NOT_FOUND = 1
.



IMPORTING Parameters details for CJDW_GET_TREE

INDEX - From element (index in document table)

Data type: SY-TABIX
Optional: Yes
Call by Reference: No ( called with pass by value option)

LEVELS - Number of levels (including from element)

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_APPEND - X = complete element table (not initialized)

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_FROM_ENTRY - X = path upwards to initial element

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_OUTLINE - X = Take outlining into account

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_SUPERIORS - X = path upwards to root (also via setting)

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_SUPRESS_DEL - X = Suppress PSP element with deletion flag

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CJDW_GET_TREE

ELEMENTS - Elements

Data type: RCJ_MARKL
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NOT_FOUND - Element not found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CJDW_GET_TREE 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_index  TYPE SY-TABIX, "   0
lt_elements  TYPE STANDARD TABLE OF RCJ_MARKL, "   
lv_not_found  TYPE RCJ_MARKL, "   
lv_levels  TYPE RCJ_MARKL, "   SPACE
lv_x_append  TYPE RCJ_MARKL, "   SPACE
lv_x_from_entry  TYPE RCJ_MARKL, "   SPACE
lv_x_outline  TYPE RCJ_MARKL, "   'X'
lv_x_superiors  TYPE RCJ_MARKL, "   SPACE
lv_x_supress_del  TYPE RCJ_MARKL. "   SPACE

  CALL FUNCTION 'CJDW_GET_TREE'  "NOTRANSL: Aufbau Displaytabelle
    EXPORTING
         INDEX = lv_index
         LEVELS = lv_levels
         X_APPEND = lv_x_append
         X_FROM_ENTRY = lv_x_from_entry
         X_OUTLINE = lv_x_outline
         X_SUPERIORS = lv_x_superiors
         X_SUPRESS_DEL = lv_x_supress_del
    TABLES
         ELEMENTS = lt_elements
    EXCEPTIONS
        NOT_FOUND = 1
. " CJDW_GET_TREE




ABAP code using 7.40 inline data declarations to call FM CJDW_GET_TREE

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 TABIX FROM SY INTO @DATA(ld_index).
 
 
 
DATA(ld_levels) = ' '.
 
DATA(ld_x_append) = ' '.
 
DATA(ld_x_from_entry) = ' '.
 
DATA(ld_x_outline) = 'X'.
 
DATA(ld_x_superiors) = ' '.
 
DATA(ld_x_supress_del) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!