SAP IUUC_COPY_DB_TABLE Function Module for copy a DB table, optionally with content









IUUC_COPY_DB_TABLE is a standard iuuc copy db table 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 DB table, optionally with content 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 iuuc copy db table FM, simply by entering the name IUUC_COPY_DB_TABLE into the relevant SAP transaction such as SE37 or SE38.

Function Group: IUUC_REMOTE
Program Name: SAPLIUUC_REMOTE
Main Program: SAPLIUUC_REMOTE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function IUUC_COPY_DB_TABLE 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 'IUUC_COPY_DB_TABLE'"copy a DB table, optionally with content
EXPORTING
I_NAME_ORIGINAL = "Table name of original table
I_NAME_COPY = "Table name of the copy
* I_TABART = "Data class in technical settings
* I_COPY_CONTENT = "also copy table content

IMPORTING
E_COUNT_ORIGINAL = "number of entries in original table
E_COUNT_COPY = "number of entries in copy table

TABLES
ET_MESSAGES = "message structure (message type + message text)

EXCEPTIONS
ORIG_TABLE_NOT_EXIST = 1 TABLE_CREATION_FAILED = 2 TABLE_ACTIVATION_FAILED = 3
.



IMPORTING Parameters details for IUUC_COPY_DB_TABLE

I_NAME_ORIGINAL - Table name of original table

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

I_NAME_COPY - Table name of the copy

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

I_TABART - Data class in technical settings

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

I_COPY_CONTENT - also copy table content

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

EXPORTING Parameters details for IUUC_COPY_DB_TABLE

E_COUNT_ORIGINAL - number of entries in original table

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

E_COUNT_COPY - number of entries in copy table

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

TABLES Parameters details for IUUC_COPY_DB_TABLE

ET_MESSAGES - message structure (message type + message text)

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

EXCEPTIONS details

ORIG_TABLE_NOT_EXIST - original table does not exist

Data type:
Optional: No
Call by Reference: Yes

TABLE_CREATION_FAILED - creation of new table failed

Data type:
Optional: No
Call by Reference: Yes

TABLE_ACTIVATION_FAILED - activation of new table failed

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for IUUC_COPY_DB_TABLE 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:
lt_et_messages  TYPE STANDARD TABLE OF DMC_MSG_STRUCT, "   
lv_i_name_original  TYPE TABNAME, "   
lv_e_count_original  TYPE I, "   
lv_orig_table_not_exist  TYPE I, "   
lv_i_name_copy  TYPE TABNAME, "   
lv_e_count_copy  TYPE I, "   
lv_table_creation_failed  TYPE I, "   
lv_i_tabart  TYPE TABART, "   
lv_table_activation_failed  TYPE TABART, "   
lv_i_copy_content  TYPE BOOLEAN. "   

  CALL FUNCTION 'IUUC_COPY_DB_TABLE'  "copy a DB table, optionally with content
    EXPORTING
         I_NAME_ORIGINAL = lv_i_name_original
         I_NAME_COPY = lv_i_name_copy
         I_TABART = lv_i_tabart
         I_COPY_CONTENT = lv_i_copy_content
    IMPORTING
         E_COUNT_ORIGINAL = lv_e_count_original
         E_COUNT_COPY = lv_e_count_copy
    TABLES
         ET_MESSAGES = lt_et_messages
    EXCEPTIONS
        ORIG_TABLE_NOT_EXIST = 1
        TABLE_CREATION_FAILED = 2
        TABLE_ACTIVATION_FAILED = 3
. " IUUC_COPY_DB_TABLE




ABAP code using 7.40 inline data declarations to call FM IUUC_COPY_DB_TABLE

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!