SAP TTE_DT_TREE_COPY_WITH_REP Function Module for Copy a decision tree and do string replacements









TTE_DT_TREE_COPY_WITH_REP is a standard tte dt tree copy with rep SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Copy a decision tree and do string replacements 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 tte dt tree copy with rep FM, simply by entering the name TTE_DT_TREE_COPY_WITH_REP into the relevant SAP transaction such as SE37 or SE38.

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



Function TTE_DT_TREE_COPY_WITH_REP 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 'TTE_DT_TREE_COPY_WITH_REP'"Copy a decision tree and do string replacements
EXPORTING
I_TREETYPE = "Decision Tree Type
I_TREEID_FROM = "Decision Tree ID
I_TREEID_TO = "Decision Tree ID

TABLES
STR_REP_TAB = "Table with string replacement instructions

EXCEPTIONS
TREE_FROM_NOT_EXIST = 1 TREE_TO_EXISTS = 2 STRING_FROM_IS_INITIAL = 3
.



IMPORTING Parameters details for TTE_DT_TREE_COPY_WITH_REP

I_TREETYPE - Decision Tree Type

Data type: TTET_DT_TYPE
Optional: No
Call by Reference: Yes

I_TREEID_FROM - Decision Tree ID

Data type: TTET_DT_TREEID
Optional: No
Call by Reference: Yes

I_TREEID_TO - Decision Tree ID

Data type: TTET_DT_TREEID
Optional: No
Call by Reference: Yes

TABLES Parameters details for TTE_DT_TREE_COPY_WITH_REP

STR_REP_TAB - Table with string replacement instructions

Data type: TTET_STR_REP_TAB
Optional: No
Call by Reference: Yes

EXCEPTIONS details

TREE_FROM_NOT_EXIST - Source tree does not exist

Data type:
Optional: No
Call by Reference: Yes

TREE_TO_EXISTS - Target Tree already exists

Data type:
Optional: No
Call by Reference: Yes

STRING_FROM_IS_INITIAL - str_rep_tab-string_from_is_initial

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TTE_DT_TREE_COPY_WITH_REP 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_treetype  TYPE TTET_DT_TYPE, "   
lt_str_rep_tab  TYPE STANDARD TABLE OF TTET_STR_REP_TAB, "   
lv_tree_from_not_exist  TYPE TTET_STR_REP_TAB, "   
lv_i_treeid_from  TYPE TTET_DT_TREEID, "   
lv_tree_to_exists  TYPE TTET_DT_TREEID, "   
lv_i_treeid_to  TYPE TTET_DT_TREEID, "   
lv_string_from_is_initial  TYPE TTET_DT_TREEID. "   

  CALL FUNCTION 'TTE_DT_TREE_COPY_WITH_REP'  "Copy a decision tree and do string replacements
    EXPORTING
         I_TREETYPE = lv_i_treetype
         I_TREEID_FROM = lv_i_treeid_from
         I_TREEID_TO = lv_i_treeid_to
    TABLES
         STR_REP_TAB = lt_str_rep_tab
    EXCEPTIONS
        TREE_FROM_NOT_EXIST = 1
        TREE_TO_EXISTS = 2
        STRING_FROM_IS_INITIAL = 3
. " TTE_DT_TREE_COPY_WITH_REP




ABAP code using 7.40 inline data declarations to call FM TTE_DT_TREE_COPY_WITH_REP

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.

 
 
 
 
 
 
 


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!