SAP DD_TABL_COPY Function Module for Copy routine for class table (TABL)









DD_TABL_COPY is a standard dd tabl copy 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 routine for class table (TABL) 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 dd tabl copy FM, simply by entering the name DD_TABL_COPY into the relevant SAP transaction such as SE37 or SE38.

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



Function DD_TABL_COPY 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 'DD_TABL_COPY'"Copy routine for class table (TABL)
EXPORTING
* DST_NAME = ' ' "
* FORCE = ' ' "
* GET_STATE = 'M ' "
* PRID = 0 "
* SRC_NAME = ' ' "
* WITHTEXT = ' ' "
* LANGU = SY-LANGU "
* SOURCE_SYSTEM = 'NONE' "

IMPORTING
DD02V_WA = "
DD09L_WA = "

TABLES
* DD03P_TAB = "
* DD05M_TAB = "
* DD08V_TAB = "
* DD12V_TAB = "
* DD17V_TAB = "

EXCEPTIONS
ILLEGAL_VALUE = 1 OP_FAILURE = 2 COPYING_REFUSED = 3
.



IMPORTING Parameters details for DD_TABL_COPY

DST_NAME -

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

FORCE -

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

GET_STATE -

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

PRID -

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

SRC_NAME -

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

WITHTEXT -

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

LANGU -

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

SOURCE_SYSTEM -

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

EXPORTING Parameters details for DD_TABL_COPY

DD02V_WA -

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

DD09L_WA -

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

TABLES Parameters details for DD_TABL_COPY

DD03P_TAB -

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

DD05M_TAB -

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

DD08V_TAB -

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

DD12V_TAB -

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

DD17V_TAB -

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

EXCEPTIONS details

ILLEGAL_VALUE -

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

OP_FAILURE -

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

COPYING_REFUSED -

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

Copy and paste ABAP code example for DD_TABL_COPY 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_dd02v_wa  TYPE DD02V, "   
lv_dst_name  TYPE DD02L-TABNAME, "   ' '
lt_dd03p_tab  TYPE STANDARD TABLE OF DD03P, "   
lv_illegal_value  TYPE DD03P, "   
lv_force  TYPE DDREFSTRUC-STATE, "   ' '
lv_dd09l_wa  TYPE DD09L, "   
lt_dd05m_tab  TYPE STANDARD TABLE OF DD05M, "   
lv_op_failure  TYPE DD05M, "   
lt_dd08v_tab  TYPE STANDARD TABLE OF DD08V, "   
lv_get_state  TYPE DCTABLGET, "   'M '
lv_copying_refused  TYPE DCTABLGET, "   
lv_prid  TYPE SY-TABIX, "   0
lt_dd12v_tab  TYPE STANDARD TABLE OF DD12V, "   
lv_src_name  TYPE DD02L-TABNAME, "   ' '
lt_dd17v_tab  TYPE STANDARD TABLE OF DD17V, "   
lv_withtext  TYPE DDREFSTRUC-BOOL, "   ' '
lv_langu  TYPE DDREFSTRUC, "   SY-LANGU
lv_source_system  TYPE DDREFSTRUC. "   'NONE'

  CALL FUNCTION 'DD_TABL_COPY'  "Copy routine for class table (TABL)
    EXPORTING
         DST_NAME = lv_dst_name
         FORCE = lv_force
         GET_STATE = lv_get_state
         PRID = lv_prid
         SRC_NAME = lv_src_name
         WITHTEXT = lv_withtext
         LANGU = lv_langu
         SOURCE_SYSTEM = lv_source_system
    IMPORTING
         DD02V_WA = lv_dd02v_wa
         DD09L_WA = lv_dd09l_wa
    TABLES
         DD03P_TAB = lt_dd03p_tab
         DD05M_TAB = lt_dd05m_tab
         DD08V_TAB = lt_dd08v_tab
         DD12V_TAB = lt_dd12v_tab
         DD17V_TAB = lt_dd17v_tab
    EXCEPTIONS
        ILLEGAL_VALUE = 1
        OP_FAILURE = 2
        COPYING_REFUSED = 3
. " DD_TABL_COPY




ABAP code using 7.40 inline data declarations to call FM DD_TABL_COPY

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 TABNAME FROM DD02L INTO @DATA(ld_dst_name).
DATA(ld_dst_name) = ' '.
 
 
 
"SELECT single STATE FROM DDREFSTRUC INTO @DATA(ld_force).
DATA(ld_force) = ' '.
 
 
 
 
 
DATA(ld_get_state) = 'M '.
 
 
"SELECT single TABIX FROM SY INTO @DATA(ld_prid).
 
 
"SELECT single TABNAME FROM DD02L INTO @DATA(ld_src_name).
DATA(ld_src_name) = ' '.
 
 
"SELECT single BOOL FROM DDREFSTRUC INTO @DATA(ld_withtext).
DATA(ld_withtext) = ' '.
 
DATA(ld_langu) = SY-LANGU.
 
DATA(ld_source_system) = 'NONE'.
 


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!