SAP CLCM_CLASS_FEATURE_ADD_DELETE Function Module for Assign Characteristics to Class / Delete Characteristics from Class









CLCM_CLASS_FEATURE_ADD_DELETE is a standard clcm class feature add delete SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Assign Characteristics to Class / Delete Characteristics from Class 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 clcm class feature add delete FM, simply by entering the name CLCM_CLASS_FEATURE_ADD_DELETE into the relevant SAP transaction such as SE37 or SE38.

Function Group: CLCM
Program Name: SAPLCLCM
Main Program: SAPLCLCM
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CLCM_CLASS_FEATURE_ADD_DELETE 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 'CLCM_CLASS_FEATURE_ADD_DELETE'"Assign Characteristics to Class / Delete Characteristics from Class
EXPORTING
CLASSNAME = "Class name / class number
CLASSTYPE = "Class type
* CHANGE_NUMBER = "Change number
* KEY_DATE = SY-DATUM "

IMPORTING
ERROR = "Error (message logged)

TABLES
TFEATURES = "Characteristics
* TCABN_O = "Characteristics: overwritten data
* TCAWN_O = "Values: overwritten
* TCAWNT_O = "Value descriptions: overwritten

EXCEPTIONS
CLASS_INVALID_CHANGE = 1 NO_RETAIL_CLASS = 2
.



IMPORTING Parameters details for CLCM_CLASS_FEATURE_ADD_DELETE

CLASSNAME - Class name / class number

Data type: KLAH-CLASS
Optional: No
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)

CHANGE_NUMBER - Change number

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

KEY_DATE -

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

EXPORTING Parameters details for CLCM_CLASS_FEATURE_ADD_DELETE

ERROR - Error (message logged)

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

TABLES Parameters details for CLCM_CLASS_FEATURE_ADD_DELETE

TFEATURES - Characteristics

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

TCABN_O - Characteristics: overwritten data

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

TCAWN_O - Values: overwritten

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

TCAWNT_O - Value descriptions: overwritten

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

EXCEPTIONS details

CLASS_INVALID_CHANGE - Change class without commit work first

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

NO_RETAIL_CLASS - No Processing of SAP Retail Classes

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

Copy and paste ABAP code example for CLCM_CLASS_FEATURE_ADD_DELETE 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_error  TYPE SY-BINPT, "   
lv_classname  TYPE KLAH-CLASS, "   
lt_tfeatures  TYPE STANDARD TABLE OF CLMERK, "   
lv_class_invalid_change  TYPE CLMERK, "   
lt_tcabn_o  TYPE STANDARD TABLE OF CLA_CH_CHG, "   
lv_classtype  TYPE KLAH-KLART, "   
lv_no_retail_class  TYPE KLAH, "   
lt_tcawn_o  TYPE STANDARD TABLE OF CLA_CH_VAL, "   
lv_change_number  TYPE KSML-AENNR, "   
lv_key_date  TYPE KSML-DATUV, "   SY-DATUM
lt_tcawnt_o  TYPE STANDARD TABLE OF CLA_CH_VDS. "   

  CALL FUNCTION 'CLCM_CLASS_FEATURE_ADD_DELETE'  "Assign Characteristics to Class / Delete Characteristics from Class
    EXPORTING
         CLASSNAME = lv_classname
         CLASSTYPE = lv_classtype
         CHANGE_NUMBER = lv_change_number
         KEY_DATE = lv_key_date
    IMPORTING
         ERROR = lv_error
    TABLES
         TFEATURES = lt_tfeatures
         TCABN_O = lt_tcabn_o
         TCAWN_O = lt_tcawn_o
         TCAWNT_O = lt_tcawnt_o
    EXCEPTIONS
        CLASS_INVALID_CHANGE = 1
        NO_RETAIL_CLASS = 2
. " CLCM_CLASS_FEATURE_ADD_DELETE




ABAP code using 7.40 inline data declarations to call FM CLCM_CLASS_FEATURE_ADD_DELETE

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 BINPT FROM SY INTO @DATA(ld_error).
 
"SELECT single CLASS FROM KLAH INTO @DATA(ld_classname).
 
 
 
 
"SELECT single KLART FROM KLAH INTO @DATA(ld_classtype).
 
 
 
"SELECT single AENNR FROM KSML INTO @DATA(ld_change_number).
 
"SELECT single DATUV FROM KSML 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!