SAP GET_CHAR_LIST Function Module for Class: read characteristics of class, incl. inherited and attributes









GET_CHAR_LIST is a standard get char list SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Class: read characteristics of class, incl. inherited and attributes processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for get char list FM, simply by entering the name GET_CHAR_LIST into the relevant SAP transaction such as SE37 or SE38.

Function Group: STAP
Program Name: SAPLSTAP
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function GET_CHAR_LIST pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'GET_CHAR_LIST'"Class: read characteristics of class, incl. inherited and attributes
EXPORTING
CLASS = "Class
CLASS_TYPE = "Class Type
* DATE = "Date (validity period, engineering change management)
* CHANGE_NO = "Change Number
* WITH_VALUES = ' ' "Flag: Characteristic value output_

IMPORTING
RETURN = "Return Code

TABLES
* CLASS_LIST = "Class description_
* CHAR_LIST = "Characteristics of class (and inherited characteristics)_
* VAL_LIST = "Characteristic Values
.



IMPORTING Parameters details for GET_CHAR_LIST

CLASS - Class

Data type: CAPIPARMS-CLASS
Optional: No
Call by Reference: No ( called with pass by value option)

CLASS_TYPE - Class Type

Data type: CAPIPARMS-CLASS_TYPE
Optional: No
Call by Reference: No ( called with pass by value option)

DATE - Date (validity period, engineering change management)

Data type: CAPIPARMS-DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHANGE_NO - Change Number

Data type: CAPIPARMS-CHANGE_NO
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITH_VALUES - Flag: Characteristic value output_

Data type: CAPIFLAG-WITH_VALS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for GET_CHAR_LIST

RETURN - Return Code

Data type: BAPIRETURN
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for GET_CHAR_LIST

CLASS_LIST - Class description_

Data type: CLASS_LIST
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHAR_LIST - Characteristics of class (and inherited characteristics)_

Data type: CHAR_LIST
Optional: Yes
Call by Reference: No ( called with pass by value option)

VAL_LIST - Characteristic Values

Data type: VAL_LIST
Optional: Yes
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for GET_CHAR_LIST Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_class  TYPE CAPIPARMS-CLASS, "   
lv_return  TYPE BAPIRETURN, "   
lt_class_list  TYPE STANDARD TABLE OF CLASS_LIST, "   
lt_char_list  TYPE STANDARD TABLE OF CHAR_LIST, "   
lv_class_type  TYPE CAPIPARMS-CLASS_TYPE, "   
lv_date  TYPE CAPIPARMS-DATE, "   
lt_val_list  TYPE STANDARD TABLE OF VAL_LIST, "   
lv_change_no  TYPE CAPIPARMS-CHANGE_NO, "   
lv_with_values  TYPE CAPIFLAG-WITH_VALS. "   SPACE

  CALL FUNCTION 'GET_CHAR_LIST'  "Class: read characteristics of class, incl. inherited and attributes
    EXPORTING
         CLASS = lv_class
         CLASS_TYPE = lv_class_type
         DATE = lv_date
         CHANGE_NO = lv_change_no
         WITH_VALUES = lv_with_values
    IMPORTING
         RETURN = lv_return
    TABLES
         CLASS_LIST = lt_class_list
         CHAR_LIST = lt_char_list
         VAL_LIST = lt_val_list
. " GET_CHAR_LIST




ABAP code using 7.40 inline data declarations to call FM GET_CHAR_LIST

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single CLASS FROM CAPIPARMS INTO @DATA(ld_class).
 
 
 
 
"SELECT single CLASS_TYPE FROM CAPIPARMS INTO @DATA(ld_class_type).
 
"SELECT single DATE FROM CAPIPARMS INTO @DATA(ld_date).
 
 
"SELECT single CHANGE_NO FROM CAPIPARMS INTO @DATA(ld_change_no).
 
"SELECT single WITH_VALS FROM CAPIFLAG INTO @DATA(ld_with_values).
DATA(ld_with_values) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!