SAP Function Modules

CACS_COPY_TABLE SAP Function module







CACS_COPY_TABLE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CACS_COPY_TABLE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CACS_CUSTCOPY
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CACS_COPY_TABLE - CACS COPY TABLE





CALL FUNCTION 'CACS_COPY_TABLE' "
  EXPORTING
    i_tabname =                 " tabname       Table Name
    i_appl_from =               " cacsappl      Application/ Package To Be Read
    i_appl_to =                 " cacsappl      Application/ Package To Be Written
*   i_applonly =                " boole_d       X = Replace The Only Field APPL
*   t_packages =                " cacs_tt_packlist  List of ICM Packages
  IMPORTING
    t_tabkeys =                 " tcacs_tabkeys  Key List for Transport Connection
  EXCEPTIONS
    READ_ERROR = 1              "               Error While Reading From Table
    NO_DIFFERENCE = 2           "               New Entry and Template Identical, No Use Copying
    TEMPORARILY_LOCKED = 3      "               Currently Table Otherwise Locked
    LOCK_FAILURE = 4            "               Table could not be locked
    WRITE_FAILURE = 5           "               Nothing Could be Written To Table
    NO_WHERE_COND = 6           "               No Selection Condition Found
    .  "  CACS_COPY_TABLE

ABAP code example for Function Module CACS_COPY_TABLE





The ABAP code below is a full code listing to execute function module CACS_COPY_TABLE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_t_tabkeys  TYPE TCACS_TABKEYS .

DATA(ld_i_tabname) = 'Check type of data required'.
DATA(ld_i_appl_from) = 'Check type of data required'.
DATA(ld_i_appl_to) = 'Check type of data required'.
DATA(ld_i_applonly) = 'Check type of data required'.
DATA(ld_t_packages) = 'Check type of data required'. . CALL FUNCTION 'CACS_COPY_TABLE' EXPORTING i_tabname = ld_i_tabname i_appl_from = ld_i_appl_from i_appl_to = ld_i_appl_to * i_applonly = ld_i_applonly * t_packages = ld_t_packages IMPORTING t_tabkeys = ld_t_tabkeys EXCEPTIONS READ_ERROR = 1 NO_DIFFERENCE = 2 TEMPORARILY_LOCKED = 3 LOCK_FAILURE = 4 WRITE_FAILURE = 5 NO_WHERE_COND = 6 . " CACS_COPY_TABLE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_t_tabkeys  TYPE TCACS_TABKEYS ,
ld_i_tabname  TYPE TABNAME ,
ld_i_appl_from  TYPE CACSAPPL ,
ld_i_appl_to  TYPE CACSAPPL ,
ld_i_applonly  TYPE BOOLE_D ,
ld_t_packages  TYPE CACS_TT_PACKLIST .

ld_i_tabname = 'Check type of data required'.
ld_i_appl_from = 'Check type of data required'.
ld_i_appl_to = 'Check type of data required'.
ld_i_applonly = 'Check type of data required'.
ld_t_packages = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CACS_COPY_TABLE or its description.