SAP G_SET_COPY_INTO_TREECONTROL Function Module for









G_SET_COPY_INTO_TREECONTROL is a standard g set copy into treecontrol 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 g set copy into treecontrol FM, simply by entering the name G_SET_COPY_INTO_TREECONTROL into the relevant SAP transaction such as SE37 or SE38.

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



Function G_SET_COPY_INTO_TREECONTROL 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 'G_SET_COPY_INTO_TREECONTROL'"
EXPORTING
* I_SETID = ' ' "
* I_HIER_OFFSET = 0 "
* I_VAL_OFFSET = 0 "
* I_TOP_NODE_KEY = ' ' "
* I_INCLUDE_TOP_NODE = 'X' "
* I_MAX_HIER_LEVEL = 99 "

TABLES
* IT_SETHIER = "
* IT_SETVAL = "
ET_NODE = "
ET_ITEM = "

EXCEPTIONS
SET_NOT_FOUND = 1
.



IMPORTING Parameters details for G_SET_COPY_INTO_TREECONTROL

I_SETID -

Data type: SETID
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_HIER_OFFSET -

Data type: I
Optional: Yes
Call by Reference: Yes

I_VAL_OFFSET -

Data type: I
Optional: Yes
Call by Reference: Yes

I_TOP_NODE_KEY -

Data type: TV_NODEKEY
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_INCLUDE_TOP_NODE -

Data type: SY-DATAR
Default: 'X'
Optional: Yes
Call by Reference: Yes

I_MAX_HIER_LEVEL -

Data type: I
Default: 99
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for G_SET_COPY_INTO_TREECONTROL

IT_SETHIER -

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

IT_SETVAL -

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

ET_NODE -

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

ET_ITEM -

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

EXCEPTIONS details

SET_NOT_FOUND -

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

Copy and paste ABAP code example for G_SET_COPY_INTO_TREECONTROL 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_i_setid  TYPE SETID, "   SPACE
lt_it_sethier  TYPE STANDARD TABLE OF SETHIER, "   
lv_set_not_found  TYPE SETHIER, "   
lt_it_setval  TYPE STANDARD TABLE OF SETVALUES, "   
lv_i_hier_offset  TYPE I, "   0
lt_et_node  TYPE STANDARD TABLE OF TREEV_NTAB, "   
lv_i_val_offset  TYPE I, "   0
lt_et_item  TYPE STANDARD TABLE OF MTREEITM, "   
lv_i_top_node_key  TYPE TV_NODEKEY, "   SPACE
lv_i_include_top_node  TYPE SY-DATAR, "   'X'
lv_i_max_hier_level  TYPE I. "   99

  CALL FUNCTION 'G_SET_COPY_INTO_TREECONTROL'  "
    EXPORTING
         I_SETID = lv_i_setid
         I_HIER_OFFSET = lv_i_hier_offset
         I_VAL_OFFSET = lv_i_val_offset
         I_TOP_NODE_KEY = lv_i_top_node_key
         I_INCLUDE_TOP_NODE = lv_i_include_top_node
         I_MAX_HIER_LEVEL = lv_i_max_hier_level
    TABLES
         IT_SETHIER = lt_it_sethier
         IT_SETVAL = lt_it_setval
         ET_NODE = lt_et_node
         ET_ITEM = lt_et_item
    EXCEPTIONS
        SET_NOT_FOUND = 1
. " G_SET_COPY_INTO_TREECONTROL




ABAP code using 7.40 inline data declarations to call FM G_SET_COPY_INTO_TREECONTROL

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_i_setid) = ' '.
 
 
 
 
 
 
 
 
DATA(ld_i_top_node_key) = ' '.
 
"SELECT single DATAR FROM SY INTO @DATA(ld_i_include_top_node).
DATA(ld_i_include_top_node) = 'X'.
 
DATA(ld_i_max_hier_level) = 99.
 


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!