SAP Function Modules

CTMS_DDB_HAS_VALUES SAP Function module







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

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


Pattern for FM CTMS_DDB_HAS_VALUES - CTMS DDB HAS VALUES





CALL FUNCTION 'CTMS_DDB_HAS_VALUES' "
* EXPORTING
*   assigned_values = ' '       " xfeld
*   allowed_values = 'X'        " xfeld
*   valid_values = ' '          " xfeld
*   inconsistent_values = ' '   " xfeld
*   first_assigned_value = ' '  " xfeld
*   default_values = ' '        " xfeld
*   incl_author = ' '           " xfeld
*   authority_display = ' '     " xfeld
  TABLES
    imp_characteristics =       " api_char
    exp_values =                " api_value
  EXCEPTIONS
    NOT_FOUND = 1               "
    .  "  CTMS_DDB_HAS_VALUES

ABAP code example for Function Module CTMS_DDB_HAS_VALUES





The ABAP code below is a full code listing to execute function module CTMS_DDB_HAS_VALUES 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:
it_imp_characteristics  TYPE STANDARD TABLE OF API_CHAR,"TABLES PARAM
wa_imp_characteristics  LIKE LINE OF it_imp_characteristics ,
it_exp_values  TYPE STANDARD TABLE OF API_VALUE,"TABLES PARAM
wa_exp_values  LIKE LINE OF it_exp_values .

DATA(ld_assigned_values) = 'Check type of data required'.
DATA(ld_allowed_values) = 'Check type of data required'.
DATA(ld_valid_values) = 'Check type of data required'.
DATA(ld_inconsistent_values) = 'Check type of data required'.
DATA(ld_first_assigned_value) = 'Check type of data required'.
DATA(ld_default_values) = 'Check type of data required'.
DATA(ld_incl_author) = 'Check type of data required'.
DATA(ld_authority_display) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_imp_characteristics to it_imp_characteristics.

"populate fields of struture and append to itab
append wa_exp_values to it_exp_values. . CALL FUNCTION 'CTMS_DDB_HAS_VALUES' * EXPORTING * assigned_values = ld_assigned_values * allowed_values = ld_allowed_values * valid_values = ld_valid_values * inconsistent_values = ld_inconsistent_values * first_assigned_value = ld_first_assigned_value * default_values = ld_default_values * incl_author = ld_incl_author * authority_display = ld_authority_display TABLES imp_characteristics = it_imp_characteristics exp_values = it_exp_values EXCEPTIONS NOT_FOUND = 1 . " CTMS_DDB_HAS_VALUES
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_assigned_values  TYPE XFELD ,
it_imp_characteristics  TYPE STANDARD TABLE OF API_CHAR ,
wa_imp_characteristics  LIKE LINE OF it_imp_characteristics,
ld_allowed_values  TYPE XFELD ,
it_exp_values  TYPE STANDARD TABLE OF API_VALUE ,
wa_exp_values  LIKE LINE OF it_exp_values,
ld_valid_values  TYPE XFELD ,
ld_inconsistent_values  TYPE XFELD ,
ld_first_assigned_value  TYPE XFELD ,
ld_default_values  TYPE XFELD ,
ld_incl_author  TYPE XFELD ,
ld_authority_display  TYPE XFELD .

ld_assigned_values = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_imp_characteristics to it_imp_characteristics.
ld_allowed_values = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_exp_values to it_exp_values.
ld_valid_values = 'Check type of data required'.
ld_inconsistent_values = 'Check type of data required'.
ld_first_assigned_value = 'Check type of data required'.
ld_default_values = 'Check type of data required'.
ld_incl_author = 'Check type of data required'.
ld_authority_display = '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 CTMS_DDB_HAS_VALUES or its description.