SAP CLAF_CLASSIFICATION_OF_OBJECTS Function Module for Classification Data for Object









CLAF_CLASSIFICATION_OF_OBJECTS is a standard claf classification of objects SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Classification Data for Object 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 claf classification of objects FM, simply by entering the name CLAF_CLASSIFICATION_OF_OBJECTS into the relevant SAP transaction such as SE37 or SE38.

Function Group: CLAF
Program Name: SAPLCLAF
Main Program: SAPLCLAF
Appliation area:
Release date: 08-Mar-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function CLAF_CLASSIFICATION_OF_OBJECTS 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 'CLAF_CLASSIFICATION_OF_OBJECTS'"Classification Data for Object
EXPORTING
* CLASS = ' ' "Class Number (External)
* INITIAL_CHARACT = 'X' "Display Initial Characteristics
* NO_VALUE_DESCRIPT = "Value Instead of Value Description
* CHANGE_SERVICE_CLF = 'X' "Engineering Change Management Active for Classification
* INHERITED_CHAR = ' ' "With Inherited Characteristics
* CHANGE_NUMBER = ' ' "Change Number
* CLASSTEXT = 'X' "With Class Description (Default Without)
CLASSTYPE = "Class Type
* CLINT = 0 "Internal Class Number
* FEATURES = 'X' "With Characteristic Values (Default With)
* LANGUAGE = SY-LANGU "Language
OBJECT = "Object Number
* OBJECTTABLE = ' ' "Object Table
* KEY_DATE = SY-DATUM "Valid From

TABLES
T_CLASS = "Classes for Object
T_OBJECTDATA = "Classification Data of Object for Classes
* I_SEL_CHARACTERISTIC = "Characteristics as Additional Selection Criteria
* T_NO_AUTH_CHARACT = "Characteristics Without Organizational Area Authorization

EXCEPTIONS
NO_CLASSIFICATION = 1 NO_CLASSTYPES = 2 INVALID_CLASS_TYPE = 3
.



IMPORTING Parameters details for CLAF_CLASSIFICATION_OF_OBJECTS

CLASS - Class Number (External)

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

INITIAL_CHARACT - Display Initial Characteristics

Data type: RMCLM-BASISD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_VALUE_DESCRIPT - Value Instead of Value Description

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

CHANGE_SERVICE_CLF - Engineering Change Management Active for Classification

Data type: TCLA-AEDIEZUORD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

INHERITED_CHAR - With Inherited Characteristics

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

CHANGE_NUMBER - Change Number

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

CLASSTEXT - With Class Description (Default Without)

Data type: RMCLM-ANZUKZ
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CLASSTYPE - Class Type

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

CLINT - Internal Class Number

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

FEATURES - With Characteristic Values (Default With)

Data type: RMCLM-ANZUKZ
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGUAGE - Language

Data type: SY-LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

OBJECT - Object Number

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

OBJECTTABLE - Object Table

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

KEY_DATE - Valid From

Data type: SY-DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CLAF_CLASSIFICATION_OF_OBJECTS

T_CLASS - Classes for Object

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

T_OBJECTDATA - Classification Data of Object for Classes

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

I_SEL_CHARACTERISTIC - Characteristics as Additional Selection Criteria

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

T_NO_AUTH_CHARACT - Characteristics Without Organizational Area Authorization

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

EXCEPTIONS details

NO_CLASSIFICATION - No Classification Data Found for Object

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

NO_CLASSTYPES - No Class Types Found for Object Table

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

INVALID_CLASS_TYPE - No Authorization for Class Type

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

Copy and paste ABAP code example for CLAF_CLASSIFICATION_OF_OBJECTS 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 KLAH-CLASS, "   SPACE
lt_t_class  TYPE STANDARD TABLE OF SCLASS, "   
lv_no_classification  TYPE SCLASS, "   
lv_initial_charact  TYPE RMCLM-BASISD, "   'X'
lv_no_value_descript  TYPE RMCLM-BASISD, "   
lv_change_service_clf  TYPE TCLA-AEDIEZUORD, "   'X'
lv_inherited_char  TYPE RMCLM-BASISD, "   SPACE
lv_change_number  TYPE AENR-AENNR, "   SPACE
lv_classtext  TYPE RMCLM-ANZUKZ, "   'X'
lt_t_objectdata  TYPE STANDARD TABLE OF CLOBJDAT, "   
lv_no_classtypes  TYPE CLOBJDAT, "   
lv_classtype  TYPE KLAH-KLART, "   
lv_invalid_class_type  TYPE KLAH, "   
lt_i_sel_characteristic  TYPE STANDARD TABLE OF SEL_CHAR, "   
lv_clint  TYPE KLAH-CLINT, "   0
lt_t_no_auth_charact  TYPE STANDARD TABLE OF KLMERKS, "   
lv_features  TYPE RMCLM-ANZUKZ, "   'X'
lv_language  TYPE SY-LANGU, "   SY-LANGU
lv_object  TYPE AUSP-OBJEK, "   
lv_objecttable  TYPE TCLA-OBTAB, "   SPACE
lv_key_date  TYPE SY-DATUM. "   SY-DATUM

  CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'  "Classification Data for Object
    EXPORTING
         CLASS = lv_class
         INITIAL_CHARACT = lv_initial_charact
         NO_VALUE_DESCRIPT = lv_no_value_descript
         CHANGE_SERVICE_CLF = lv_change_service_clf
         INHERITED_CHAR = lv_inherited_char
         CHANGE_NUMBER = lv_change_number
         CLASSTEXT = lv_classtext
         CLASSTYPE = lv_classtype
         CLINT = lv_clint
         FEATURES = lv_features
         LANGUAGE = lv_language
         OBJECT = lv_object
         OBJECTTABLE = lv_objecttable
         KEY_DATE = lv_key_date
    TABLES
         T_CLASS = lt_t_class
         T_OBJECTDATA = lt_t_objectdata
         I_SEL_CHARACTERISTIC = lt_i_sel_characteristic
         T_NO_AUTH_CHARACT = lt_t_no_auth_charact
    EXCEPTIONS
        NO_CLASSIFICATION = 1
        NO_CLASSTYPES = 2
        INVALID_CLASS_TYPE = 3
. " CLAF_CLASSIFICATION_OF_OBJECTS




ABAP code using 7.40 inline data declarations to call FM CLAF_CLASSIFICATION_OF_OBJECTS

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 KLAH INTO @DATA(ld_class).
DATA(ld_class) = ' '.
 
 
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_initial_charact).
DATA(ld_initial_charact) = 'X'.
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_no_value_descript).
 
"SELECT single AEDIEZUORD FROM TCLA INTO @DATA(ld_change_service_clf).
DATA(ld_change_service_clf) = 'X'.
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_inherited_char).
DATA(ld_inherited_char) = ' '.
 
"SELECT single AENNR FROM AENR INTO @DATA(ld_change_number).
DATA(ld_change_number) = ' '.
 
"SELECT single ANZUKZ FROM RMCLM INTO @DATA(ld_classtext).
DATA(ld_classtext) = 'X'.
 
 
 
"SELECT single KLART FROM KLAH INTO @DATA(ld_classtype).
 
 
 
"SELECT single CLINT FROM KLAH INTO @DATA(ld_clint).
 
 
"SELECT single ANZUKZ FROM RMCLM INTO @DATA(ld_features).
DATA(ld_features) = 'X'.
 
"SELECT single LANGU FROM SY INTO @DATA(ld_language).
DATA(ld_language) = SY-LANGU.
 
"SELECT single OBJEK FROM AUSP INTO @DATA(ld_object).
 
"SELECT single OBTAB FROM TCLA INTO @DATA(ld_objecttable).
DATA(ld_objecttable) = ' '.
 
"SELECT single DATUM FROM SY INTO @DATA(ld_key_date).
DATA(ld_key_date) = SY-DATUM.
 


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!