SAP Function Modules

CUXI_GET_SINGLE_INSTANCE SAP Function module







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

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


Pattern for FM CUXI_GET_SINGLE_INSTANCE - CUXI GET SINGLE INSTANCE





CALL FUNCTION 'CUXI_GET_SINGLE_INSTANCE' "
  EXPORTING
    iv_instance =               " cuxt_instance_no
*   iv_language =               " cux_kblanguage
*   iv_handle_appl_log =        " balloghndl
*   iv_object_appl_log = 'CIF'  " balobj_d
*   iv_subobject_appl_log = 'T_CNFG'  " balsubobj
  IMPORTING
    es_cfg_header =             " cuxt_cucfg_s
    es_instance =               " cuxt_cuins_s
    ev_handle_appl_log =        " balloghndl
    et_return =                 " bapiret2_t
  TABLES
    e_tab_values =              " cuxt_cuval_t
  EXCEPTIONS
    INVALID_INSTANCE = 1        "
    INSTANCE_IS_A_CLASSIFICATION = 2  "
    INTERNAL_ERROR = 3          "
    INVALID_DATA = 4            "
    .  "  CUXI_GET_SINGLE_INSTANCE

ABAP code example for Function Module CUXI_GET_SINGLE_INSTANCE





The ABAP code below is a full code listing to execute function module CUXI_GET_SINGLE_INSTANCE 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_es_cfg_header  TYPE CUXT_CUCFG_S ,
ld_es_instance  TYPE CUXT_CUINS_S ,
ld_ev_handle_appl_log  TYPE BALLOGHNDL ,
ld_et_return  TYPE BAPIRET2_T ,
it_e_tab_values  TYPE STANDARD TABLE OF CUXT_CUVAL_T,"TABLES PARAM
wa_e_tab_values  LIKE LINE OF it_e_tab_values .

DATA(ld_iv_instance) = 'Check type of data required'.
DATA(ld_iv_language) = 'Check type of data required'.
DATA(ld_iv_handle_appl_log) = 'Check type of data required'.
DATA(ld_iv_object_appl_log) = 'Check type of data required'.
DATA(ld_iv_subobject_appl_log) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_tab_values to it_e_tab_values. . CALL FUNCTION 'CUXI_GET_SINGLE_INSTANCE' EXPORTING iv_instance = ld_iv_instance * iv_language = ld_iv_language * iv_handle_appl_log = ld_iv_handle_appl_log * iv_object_appl_log = ld_iv_object_appl_log * iv_subobject_appl_log = ld_iv_subobject_appl_log IMPORTING es_cfg_header = ld_es_cfg_header es_instance = ld_es_instance ev_handle_appl_log = ld_ev_handle_appl_log et_return = ld_et_return TABLES e_tab_values = it_e_tab_values EXCEPTIONS INVALID_INSTANCE = 1 INSTANCE_IS_A_CLASSIFICATION = 2 INTERNAL_ERROR = 3 INVALID_DATA = 4 . " CUXI_GET_SINGLE_INSTANCE
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 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_es_cfg_header  TYPE CUXT_CUCFG_S ,
ld_iv_instance  TYPE CUXT_INSTANCE_NO ,
it_e_tab_values  TYPE STANDARD TABLE OF CUXT_CUVAL_T ,
wa_e_tab_values  LIKE LINE OF it_e_tab_values,
ld_es_instance  TYPE CUXT_CUINS_S ,
ld_iv_language  TYPE CUX_KBLANGUAGE ,
ld_ev_handle_appl_log  TYPE BALLOGHNDL ,
ld_iv_handle_appl_log  TYPE BALLOGHNDL ,
ld_et_return  TYPE BAPIRET2_T ,
ld_iv_object_appl_log  TYPE BALOBJ_D ,
ld_iv_subobject_appl_log  TYPE BALSUBOBJ .

ld_iv_instance = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_tab_values to it_e_tab_values.
ld_iv_language = 'Check type of data required'.
ld_iv_handle_appl_log = 'Check type of data required'.
ld_iv_object_appl_log = 'Check type of data required'.
ld_iv_subobject_appl_log = '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 CUXI_GET_SINGLE_INSTANCE or its description.