SAP RSAR_TREE_CALLBACK Function Module for Callback for new tree









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

Function Group: RSATREE
Program Name: SAPLRSATREE
Main Program: SAPLRSATREE
Appliation area: B
Release date: 24-Oct-1997
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RSAR_TREE_CALLBACK 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 'RSAR_TREE_CALLBACK'"Callback for new tree
EXPORTING
NODE_ID = "
* TREE_ID = "
COMMAND = "
* DESTNODE_ID = "
* BUTTON_COL = "

IMPORTING
FIELDTAB = "
REFRESH = "
ISOURCE_BACK = "
SUBTREEFLAG = "
P_NEW_CHILD_ID = "
NODE_ID_BACK = "
E_TXTLG = "
P_T_CHILD = "
TREE_ID_BACK = "
NODE_ID_SELECT = "
COMMAND_BACK = "

EXCEPTIONS
ERROR = 1
.



IMPORTING Parameters details for RSAR_TREE_CALLBACK

NODE_ID -

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

TREE_ID -

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

COMMAND -

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

DESTNODE_ID -

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

BUTTON_COL -

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

EXPORTING Parameters details for RSAR_TREE_CALLBACK

FIELDTAB -

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

REFRESH -

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

ISOURCE_BACK -

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

SUBTREEFLAG -

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

P_NEW_CHILD_ID -

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

NODE_ID_BACK -

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

E_TXTLG -

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

P_T_CHILD -

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

TREE_ID_BACK -

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

NODE_ID_SELECT -

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

COMMAND_BACK -

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

EXCEPTIONS details

ERROR -

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

Copy and paste ABAP code example for RSAR_TREE_CALLBACK 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_error  TYPE STRING, "   
lv_node_id  TYPE RSATD_KEYTYPE, "   
lv_fieldtab  TYPE RSATR_T_RSACFIELD, "   
lv_refresh  TYPE C, "   
lv_isource_back  TYPE RSIS-ISOURCE, "   
lv_tree_id  TYPE RSATD_KEYTYPE, "   
lv_subtreeflag  TYPE C, "   
lv_command  TYPE RSATR_COMMAND, "   
lv_p_new_child_id  TYPE RSATD_NODE-ID, "   
lv_destnode_id  TYPE RSATD_KEYTYPE, "   
lv_node_id_back  TYPE RSATD_NODE-ID, "   
lv_e_txtlg  TYPE RSACTREE-TEXT, "   
lv_button_col  TYPE I, "   
lv_p_t_child  TYPE RSATD_IT_KEYTYPE, "   
lv_tree_id_back  TYPE RSATD_TREE-ID, "   
lv_node_id_select  TYPE RSATD_NODE-ID, "   
lv_command_back  TYPE RSATR_COMMAND. "   

  CALL FUNCTION 'RSAR_TREE_CALLBACK'  "Callback for new tree
    EXPORTING
         NODE_ID = lv_node_id
         TREE_ID = lv_tree_id
         COMMAND = lv_command
         DESTNODE_ID = lv_destnode_id
         BUTTON_COL = lv_button_col
    IMPORTING
         FIELDTAB = lv_fieldtab
         REFRESH = lv_refresh
         ISOURCE_BACK = lv_isource_back
         SUBTREEFLAG = lv_subtreeflag
         P_NEW_CHILD_ID = lv_p_new_child_id
         NODE_ID_BACK = lv_node_id_back
         E_TXTLG = lv_e_txtlg
         P_T_CHILD = lv_p_t_child
         TREE_ID_BACK = lv_tree_id_back
         NODE_ID_SELECT = lv_node_id_select
         COMMAND_BACK = lv_command_back
    EXCEPTIONS
        ERROR = 1
. " RSAR_TREE_CALLBACK




ABAP code using 7.40 inline data declarations to call FM RSAR_TREE_CALLBACK

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 ISOURCE FROM RSIS INTO @DATA(ld_isource_back).
 
 
 
 
"SELECT single ID FROM RSATD_NODE INTO @DATA(ld_p_new_child_id).
 
 
"SELECT single ID FROM RSATD_NODE INTO @DATA(ld_node_id_back).
 
"SELECT single TEXT FROM RSACTREE INTO @DATA(ld_e_txtlg).
 
 
 
"SELECT single ID FROM RSATD_TREE INTO @DATA(ld_tree_id_back).
 
"SELECT single ID FROM RSATD_NODE INTO @DATA(ld_node_id_select).
 
 


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!