SAP Function Modules

CME_API_CHAR_CREATE SAP Function module - CME Characteristic - Create







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

Associated Function Group: CME_API_CHAR
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM CME_API_CHAR_CREATE - CME API CHAR CREATE





CALL FUNCTION 'CME_API_CHAR_CREATE' "CME Characteristic - Create
* EXPORTING
*   is_key =                    " cme_s_char_key_int_ext  CME Characteristic -Key Fields-
*   is_dtype_key =              " cme_s_dtype_key_int_ext  CME Data Type -Key Fields in Internal/External Format-
*   i_group =                   " dml_grp       CME Characteristic -Group-
*   is_change_order =           " dml_s_api_ecm  CME Characteristic -Data Change Status-
*   is_attributes =             " cme_s_char_attr  CME Characteristic -Global Attributes-
*   is_dtype_format =           " cme_s_dtype_format  CME Data Type -Format Fields-
*   is_admin_data =             " dml_s_admin   CME Characteristic -Administrative Data-
*   it_status =                 " dml_t_status  CME Characteristic -Status-
*   it_documents =              " cme_t_object_documents  CME Characteristic -Documents for Characteristic-
*   it_values =                 " cme_t_val     CME Characteristic -Values-
*   it_value_text =             " cme_t_text    CME Data Type -Texts for Values-
*   it_value_documents =        " cme_t_value_documents  CME Characteristic - Documents for Characteristic Value
*   it_reference =              " cme_t_char_ref  CME Characteristic -Data Reference-
*   it_text =                   " cme_t_text    CME Characteristic -Texts-
*   it_extensions =             " cme_t_extensions  CME Characteristic -Extensions-
*   it_extensions_texts =       " cme_t_text_extensions  CME Characteristic -Texts for Extensions-
  IMPORTING
    es_key =                    " cme_s_char_key_int_ext  CME Characteristic -Key Fields-
* TABLES
*   et_return =                 " bapiret2      Messages
  EXCEPTIONS
    EX_ERROR = 1                "               An error has occurred
    .  "  CME_API_CHAR_CREATE

ABAP code example for Function Module CME_API_CHAR_CREATE





The ABAP code below is a full code listing to execute function module CME_API_CHAR_CREATE 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_key  TYPE CME_S_CHAR_KEY_INT_EXT ,
it_et_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_et_return  LIKE LINE OF it_et_return .

DATA(ld_is_key) = 'Check type of data required'.
DATA(ld_is_dtype_key) = 'Check type of data required'.
DATA(ld_i_group) = 'Check type of data required'.
DATA(ld_is_change_order) = 'Check type of data required'.
DATA(ld_is_attributes) = 'Check type of data required'.
DATA(ld_is_dtype_format) = 'Check type of data required'.
DATA(ld_is_admin_data) = 'Check type of data required'.
DATA(ld_it_status) = 'Check type of data required'.
DATA(ld_it_documents) = 'Check type of data required'.
DATA(ld_it_values) = 'Check type of data required'.
DATA(ld_it_value_text) = 'Check type of data required'.
DATA(ld_it_value_documents) = 'Check type of data required'.
DATA(ld_it_reference) = 'Check type of data required'.
DATA(ld_it_text) = 'Check type of data required'.
DATA(ld_it_extensions) = 'Check type of data required'.
DATA(ld_it_extensions_texts) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_return to it_et_return. . CALL FUNCTION 'CME_API_CHAR_CREATE' * EXPORTING * is_key = ld_is_key * is_dtype_key = ld_is_dtype_key * i_group = ld_i_group * is_change_order = ld_is_change_order * is_attributes = ld_is_attributes * is_dtype_format = ld_is_dtype_format * is_admin_data = ld_is_admin_data * it_status = ld_it_status * it_documents = ld_it_documents * it_values = ld_it_values * it_value_text = ld_it_value_text * it_value_documents = ld_it_value_documents * it_reference = ld_it_reference * it_text = ld_it_text * it_extensions = ld_it_extensions * it_extensions_texts = ld_it_extensions_texts IMPORTING es_key = ld_es_key * TABLES * et_return = it_et_return EXCEPTIONS EX_ERROR = 1 . " CME_API_CHAR_CREATE
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_es_key  TYPE CME_S_CHAR_KEY_INT_EXT ,
ld_is_key  TYPE CME_S_CHAR_KEY_INT_EXT ,
it_et_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_et_return  LIKE LINE OF it_et_return,
ld_is_dtype_key  TYPE CME_S_DTYPE_KEY_INT_EXT ,
ld_i_group  TYPE DML_GRP ,
ld_is_change_order  TYPE DML_S_API_ECM ,
ld_is_attributes  TYPE CME_S_CHAR_ATTR ,
ld_is_dtype_format  TYPE CME_S_DTYPE_FORMAT ,
ld_is_admin_data  TYPE DML_S_ADMIN ,
ld_it_status  TYPE DML_T_STATUS ,
ld_it_documents  TYPE CME_T_OBJECT_DOCUMENTS ,
ld_it_values  TYPE CME_T_VAL ,
ld_it_value_text  TYPE CME_T_TEXT ,
ld_it_value_documents  TYPE CME_T_VALUE_DOCUMENTS ,
ld_it_reference  TYPE CME_T_CHAR_REF ,
ld_it_text  TYPE CME_T_TEXT ,
ld_it_extensions  TYPE CME_T_EXTENSIONS ,
ld_it_extensions_texts  TYPE CME_T_TEXT_EXTENSIONS .

ld_is_key = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_return to it_et_return.
ld_is_dtype_key = 'Check type of data required'.
ld_i_group = 'Check type of data required'.
ld_is_change_order = 'Check type of data required'.
ld_is_attributes = 'Check type of data required'.
ld_is_dtype_format = 'Check type of data required'.
ld_is_admin_data = 'Check type of data required'.
ld_it_status = 'Check type of data required'.
ld_it_documents = 'Check type of data required'.
ld_it_values = 'Check type of data required'.
ld_it_value_text = 'Check type of data required'.
ld_it_value_documents = 'Check type of data required'.
ld_it_reference = 'Check type of data required'.
ld_it_text = 'Check type of data required'.
ld_it_extensions = 'Check type of data required'.
ld_it_extensions_texts = 'Check type of data required'.

SAP Documentation for FM CME_API_CHAR_CREATE


Module CME_API_CHAR_CREATE creates a new characteristic in the system.

EXAMPLE ...See here for full SAP fm documentation








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