SAP Function Modules

CUCB_CONFIGURATION_TO_DB SAP Function module







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

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


Pattern for FM CUCB_CONFIGURATION_TO_DB - CUCB CONFIGURATION TO DB





CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB' "
  EXPORTING
    root_instance =             " cuib_cuobj    CUIB: System-Dependent Configuration Reference
    root_object =               " cuib_business_object  CUIB: Business Object
*   force_new_instance =        " boolean       Boolean Variable (X=True, -=False, Space=Unknown)
*   iv_without_commit_update = SPACE  " boolean
*   iv_material =               " matnr         Material Number
*   iv_location =               " werks_d       Plant
*   iv_techs =                  " techs         Parameter Variant/Standard Variant
  IMPORTING
    new_instance =              " cuib_cuobj    CUIB: System-Dependent Configuration Reference
* TABLES
*   exp_new_nested_cuobjs =     " api_nst01
  EXCEPTIONS
    INVALID_INSTANCE = 1        "
    INVALID_ROOT_INSTANCE = 2   "
    NO_CHANGES = 3              "               No change made
    ALREADY_REGISTERED_FOR_UPDATE = 4  "
    INSTANCE_IS_A_CLASSIFICATION = 5  "
    .  "  CUCB_CONFIGURATION_TO_DB

ABAP code example for Function Module CUCB_CONFIGURATION_TO_DB





The ABAP code below is a full code listing to execute function module CUCB_CONFIGURATION_TO_DB 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_new_instance  TYPE CUIB_CUOBJ ,
it_exp_new_nested_cuobjs  TYPE STANDARD TABLE OF API_NST01,"TABLES PARAM
wa_exp_new_nested_cuobjs  LIKE LINE OF it_exp_new_nested_cuobjs .

DATA(ld_root_instance) = 'Check type of data required'.
DATA(ld_root_object) = 'Check type of data required'.
DATA(ld_force_new_instance) = 'Check type of data required'.
DATA(ld_iv_without_commit_update) = 'Check type of data required'.
DATA(ld_iv_material) = 'Check type of data required'.
DATA(ld_iv_location) = 'Check type of data required'.
DATA(ld_iv_techs) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_exp_new_nested_cuobjs to it_exp_new_nested_cuobjs. . CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB' EXPORTING root_instance = ld_root_instance root_object = ld_root_object * force_new_instance = ld_force_new_instance * iv_without_commit_update = ld_iv_without_commit_update * iv_material = ld_iv_material * iv_location = ld_iv_location * iv_techs = ld_iv_techs IMPORTING new_instance = ld_new_instance * TABLES * exp_new_nested_cuobjs = it_exp_new_nested_cuobjs EXCEPTIONS INVALID_INSTANCE = 1 INVALID_ROOT_INSTANCE = 2 NO_CHANGES = 3 ALREADY_REGISTERED_FOR_UPDATE = 4 INSTANCE_IS_A_CLASSIFICATION = 5 . " CUCB_CONFIGURATION_TO_DB
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 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_new_instance  TYPE CUIB_CUOBJ ,
ld_root_instance  TYPE CUIB_CUOBJ ,
it_exp_new_nested_cuobjs  TYPE STANDARD TABLE OF API_NST01 ,
wa_exp_new_nested_cuobjs  LIKE LINE OF it_exp_new_nested_cuobjs,
ld_root_object  TYPE CUIB_BUSINESS_OBJECT ,
ld_force_new_instance  TYPE BOOLEAN ,
ld_iv_without_commit_update  TYPE BOOLEAN ,
ld_iv_material  TYPE MATNR ,
ld_iv_location  TYPE WERKS_D ,
ld_iv_techs  TYPE TECHS .

ld_root_instance = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_exp_new_nested_cuobjs to it_exp_new_nested_cuobjs.
ld_root_object = 'Check type of data required'.
ld_force_new_instance = 'Check type of data required'.
ld_iv_without_commit_update = 'Check type of data required'.
ld_iv_material = 'Check type of data required'.
ld_iv_location = 'Check type of data required'.
ld_iv_techs = '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 CUCB_CONFIGURATION_TO_DB or its description.