SAP Function Modules

COPY_CONFIGURATION_DATA SAP Function module







COPY_CONFIGURATION_DATA 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 COPY_CONFIGURATION_DATA into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM COPY_CONFIGURATION_DATA - COPY CONFIGURATION DATA





CALL FUNCTION 'COPY_CONFIGURATION_DATA' "
  EXPORTING
    source_cuobj =              " inob-cuobj
*   dest_object_id = 'MARA'     " inob-obtab
    dest_object =               " inob-robjek
*   init_configuration = SPACE  " sy-batch
*   config_type = 'S'           " c
*   date = SY-DATUM             " sy-datum
  IMPORTING
    dest_cuobj =                " inob-cuobj
    nr_values =                 " sy-index
    .  "  COPY_CONFIGURATION_DATA

ABAP code example for Function Module COPY_CONFIGURATION_DATA





The ABAP code below is a full code listing to execute function module COPY_CONFIGURATION_DATA 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_dest_cuobj  TYPE INOB-CUOBJ ,
ld_nr_values  TYPE SY-INDEX .


SELECT single CUOBJ
FROM INOB
INTO @DATA(ld_source_cuobj).


SELECT single OBTAB
FROM INOB
INTO @DATA(ld_dest_object_id).


SELECT single ROBJEK
FROM INOB
INTO @DATA(ld_dest_object).

DATA(ld_init_configuration) = 'some text here'.
DATA(ld_config_type) = 'some text here'.
DATA(ld_date) = '20210129'. . CALL FUNCTION 'COPY_CONFIGURATION_DATA' EXPORTING source_cuobj = ld_source_cuobj * dest_object_id = ld_dest_object_id dest_object = ld_dest_object * init_configuration = ld_init_configuration * config_type = ld_config_type * date = ld_date IMPORTING dest_cuobj = ld_dest_cuobj nr_values = ld_nr_values . " COPY_CONFIGURATION_DATA
IF SY-SUBRC EQ 0. "All OK 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_dest_cuobj  TYPE INOB-CUOBJ ,
ld_source_cuobj  TYPE INOB-CUOBJ ,
ld_nr_values  TYPE SY-INDEX ,
ld_dest_object_id  TYPE INOB-OBTAB ,
ld_dest_object  TYPE INOB-ROBJEK ,
ld_init_configuration  TYPE SY-BATCH ,
ld_config_type  TYPE C ,
ld_date  TYPE SY-DATUM .


SELECT single CUOBJ
FROM INOB
INTO ld_source_cuobj.


SELECT single OBTAB
FROM INOB
INTO ld_dest_object_id.


SELECT single ROBJEK
FROM INOB
INTO ld_dest_object.

ld_init_configuration = 'some text here'.
ld_config_type = 'some text here'.
ld_date = '20210129'.

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 COPY_CONFIGURATION_DATA or its description.