SAP Function Modules

BAPI_CHARACT_GETDETAIL SAP Function module - BAPI for Characteristics - Read Attributes







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

Associated Function Group: CTBP
Released Date: 17.09.1999
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_CHARACT_GETDETAIL - BAPI CHARACT GETDETAIL





CALL FUNCTION 'BAPI_CHARACT_GETDETAIL' "BAPI for Characteristics - Read Attributes
  EXPORTING
    charactname =               " bapicharactkey-charactname  Characteristic Name
*   keydate = SY-DATUM          " bapicharactkey-keydate  Date
*   language =                  " bapifieldscacl-bapilangua  Language: Empty = All Languages
  IMPORTING
    charactdetail =             " bapicharactdetail  Characteristic Attributes
  TABLES
*   charactdescr =              " bapicharactdescr  Characteristic Descriptions
*   charactvaluesnum =          " bapicharactvaluesnum  Allowed Values for NUM Characteristics
*   charactvalueschar =         " bapicharactvalueschar  Allowed Values for CHAR Characteristics
*   charactvaluescurr =         " bapicharactvaluescurr  Allowed Values for CURR Characteristics
*   charactvaluesdescr =        " bapicharactvaluesdescr  Value Descriptions
*   charactreferences =         " bapicharactreferences  Entries for Reference Characteristics
*   charactrestrictions =       " bapicharactrestrictions  Restrictions to Class Types
    return =                    " bapiret2      Error Messages
    .  "  BAPI_CHARACT_GETDETAIL

ABAP code example for Function Module BAPI_CHARACT_GETDETAIL





The ABAP code below is a full code listing to execute function module BAPI_CHARACT_GETDETAIL 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_charactdetail  TYPE BAPICHARACTDETAIL ,
it_charactdescr  TYPE STANDARD TABLE OF BAPICHARACTDESCR,"TABLES PARAM
wa_charactdescr  LIKE LINE OF it_charactdescr ,
it_charactvaluesnum  TYPE STANDARD TABLE OF BAPICHARACTVALUESNUM,"TABLES PARAM
wa_charactvaluesnum  LIKE LINE OF it_charactvaluesnum ,
it_charactvalueschar  TYPE STANDARD TABLE OF BAPICHARACTVALUESCHAR,"TABLES PARAM
wa_charactvalueschar  LIKE LINE OF it_charactvalueschar ,
it_charactvaluescurr  TYPE STANDARD TABLE OF BAPICHARACTVALUESCURR,"TABLES PARAM
wa_charactvaluescurr  LIKE LINE OF it_charactvaluescurr ,
it_charactvaluesdescr  TYPE STANDARD TABLE OF BAPICHARACTVALUESDESCR,"TABLES PARAM
wa_charactvaluesdescr  LIKE LINE OF it_charactvaluesdescr ,
it_charactreferences  TYPE STANDARD TABLE OF BAPICHARACTREFERENCES,"TABLES PARAM
wa_charactreferences  LIKE LINE OF it_charactreferences ,
it_charactrestrictions  TYPE STANDARD TABLE OF BAPICHARACTRESTRICTIONS,"TABLES PARAM
wa_charactrestrictions  LIKE LINE OF it_charactrestrictions ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return .


DATA(ld_charactname) = some text here

DATA(ld_keydate) = 20210129

DATA(ld_language) = Check type of data required

"populate fields of struture and append to itab
append wa_charactdescr to it_charactdescr.

"populate fields of struture and append to itab
append wa_charactvaluesnum to it_charactvaluesnum.

"populate fields of struture and append to itab
append wa_charactvalueschar to it_charactvalueschar.

"populate fields of struture and append to itab
append wa_charactvaluescurr to it_charactvaluescurr.

"populate fields of struture and append to itab
append wa_charactvaluesdescr to it_charactvaluesdescr.

"populate fields of struture and append to itab
append wa_charactreferences to it_charactreferences.

"populate fields of struture and append to itab
append wa_charactrestrictions to it_charactrestrictions.

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'BAPI_CHARACT_GETDETAIL' EXPORTING charactname = ld_charactname * keydate = ld_keydate * language = ld_language IMPORTING charactdetail = ld_charactdetail TABLES * charactdescr = it_charactdescr * charactvaluesnum = it_charactvaluesnum * charactvalueschar = it_charactvalueschar * charactvaluescurr = it_charactvaluescurr * charactvaluesdescr = it_charactvaluesdescr * charactreferences = it_charactreferences * charactrestrictions = it_charactrestrictions return = it_return . " BAPI_CHARACT_GETDETAIL
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_charactdetail  TYPE BAPICHARACTDETAIL ,
ld_charactname  TYPE BAPICHARACTKEY-CHARACTNAME ,
it_charactdescr  TYPE STANDARD TABLE OF BAPICHARACTDESCR ,
wa_charactdescr  LIKE LINE OF it_charactdescr,
ld_keydate  TYPE BAPICHARACTKEY-KEYDATE ,
it_charactvaluesnum  TYPE STANDARD TABLE OF BAPICHARACTVALUESNUM ,
wa_charactvaluesnum  LIKE LINE OF it_charactvaluesnum,
ld_language  TYPE BAPIFIELDSCACL-BAPILANGUA ,
it_charactvalueschar  TYPE STANDARD TABLE OF BAPICHARACTVALUESCHAR ,
wa_charactvalueschar  LIKE LINE OF it_charactvalueschar,
it_charactvaluescurr  TYPE STANDARD TABLE OF BAPICHARACTVALUESCURR ,
wa_charactvaluescurr  LIKE LINE OF it_charactvaluescurr,
it_charactvaluesdescr  TYPE STANDARD TABLE OF BAPICHARACTVALUESDESCR ,
wa_charactvaluesdescr  LIKE LINE OF it_charactvaluesdescr,
it_charactreferences  TYPE STANDARD TABLE OF BAPICHARACTREFERENCES ,
wa_charactreferences  LIKE LINE OF it_charactreferences,
it_charactrestrictions  TYPE STANDARD TABLE OF BAPICHARACTRESTRICTIONS ,
wa_charactrestrictions  LIKE LINE OF it_charactrestrictions,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return.


ld_charactname = some text here

"populate fields of struture and append to itab
append wa_charactdescr to it_charactdescr.

ld_keydate = 20210129

"populate fields of struture and append to itab
append wa_charactvaluesnum to it_charactvaluesnum.

ld_language = Check type of data required

"populate fields of struture and append to itab
append wa_charactvalueschar to it_charactvalueschar.

"populate fields of struture and append to itab
append wa_charactvaluescurr to it_charactvaluescurr.

"populate fields of struture and append to itab
append wa_charactvaluesdescr to it_charactvaluesdescr.

"populate fields of struture and append to itab
append wa_charactreferences to it_charactreferences.

"populate fields of struture and append to itab
append wa_charactrestrictions to it_charactrestrictions.

"populate fields of struture and append to itab
append wa_return to it_return.

SAP Documentation for FM BAPI_CHARACT_GETDETAIL


This BAPI returns detail information on a characteristic, which is identified by its name and optionally by a date (default value is the ...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 BAPI_CHARACT_GETDETAIL or its description.