SAP CLFM_DELETE_CLASSIFICATION Function Module for Classification: delete from database









CLFM_DELETE_CLASSIFICATION is a standard clfm delete classification 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: delete from database 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 clfm delete classification FM, simply by entering the name CLFM_DELETE_CLASSIFICATION into the relevant SAP transaction such as SE37 or SE38.

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



Function CLFM_DELETE_CLASSIFICATION 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 'CLFM_DELETE_CLASSIFICATION'"Classification: delete from database
EXPORTING
* ECHT_LAUF = 'X' "LIVE RUN DEFAULT X, test run blank
OBJECT = "Object number
TABLE = "Table name of classifiable object
* TYPE = ' ' "Type of call: background (X) or update (' ')
* CLASSTYPE = ' ' "Class type
* CHANGE_SERVICE_NUMBER = "Change number
* DATE_OF_CHANGE = "Change date
* OBJ_HAS_CHANGE_SERVICE = ' ' "Object subject to engineering change management
* I_NO_LOCK = ' ' "No lock necessary

IMPORTING
ANZ_AUSP = "Number of deleted characteristic records
ANZ_KSSK = "Number of deleted allocation records

EXCEPTIONS
FOREIGN_LOCK = 1 NOT_DELETED = 2 SYSTEM_FAILURE = 3 TABLE_NOT_FOUND = 4 DATE_NOT_ALLOWED = 5 CHANGE_NR_CHANGED = 6
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLCLFM_001 Influences Class and Value Assignment
EXIT_SAPLCLFM_002 Customer Exit for Changing Classification Data Before Saving
EXIT_SAPLCLFM_003 Customer Exit After Check on Assigned Characteristic Values

IMPORTING Parameters details for CLFM_DELETE_CLASSIFICATION

ECHT_LAUF - LIVE RUN DEFAULT X, test run blank

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

OBJECT - Object number

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

TABLE - Table name of classifiable object

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

TYPE - Type of call: background (X) or update (' ')

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

CLASSTYPE - Class type

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

CHANGE_SERVICE_NUMBER - Change number

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

DATE_OF_CHANGE - Change date

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

OBJ_HAS_CHANGE_SERVICE - Object subject to engineering change management

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

I_NO_LOCK - No lock necessary

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

EXPORTING Parameters details for CLFM_DELETE_CLASSIFICATION

ANZ_AUSP - Number of deleted characteristic records

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

ANZ_KSSK - Number of deleted allocation records

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

EXCEPTIONS details

FOREIGN_LOCK - Class of other user blocked

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

NOT_DELETED - Classification data not deleted

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

SYSTEM_FAILURE - System lock error

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

TABLE_NOT_FOUND - Table not found

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

DATE_NOT_ALLOWED - Date in record = date of change number

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

CHANGE_NR_CHANGED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CLFM_DELETE_CLASSIFICATION 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_anz_ausp  TYPE SY-DBCNT, "   
lv_echt_lauf  TYPE RMCLF-KREUZ, "   'X'
lv_foreign_lock  TYPE RMCLF, "   
lv_object  TYPE RMCLF-OBJEK, "   
lv_anz_kssk  TYPE SY-DBCNT, "   
lv_not_deleted  TYPE SY, "   
lv_table  TYPE TCLT-OBTAB, "   
lv_system_failure  TYPE TCLT, "   
lv_type  TYPE SY-BATCH, "   SPACE
lv_table_not_found  TYPE SY, "   
lv_classtype  TYPE RMCLF-KLART, "   SPACE
lv_date_not_allowed  TYPE RMCLF, "   
lv_change_nr_changed  TYPE RMCLF, "   
lv_change_service_number  TYPE RMCLF-AENNR1, "   
lv_date_of_change  TYPE RMCLF-DATUV1, "   
lv_obj_has_change_service  TYPE RMCLF, "   SPACE
lv_i_no_lock  TYPE RMCLF-KREUZ. "   SPACE

  CALL FUNCTION 'CLFM_DELETE_CLASSIFICATION'  "Classification: delete from database
    EXPORTING
         ECHT_LAUF = lv_echt_lauf
         OBJECT = lv_object
         TABLE = lv_table
         TYPE = lv_type
         CLASSTYPE = lv_classtype
         CHANGE_SERVICE_NUMBER = lv_change_service_number
         DATE_OF_CHANGE = lv_date_of_change
         OBJ_HAS_CHANGE_SERVICE = lv_obj_has_change_service
         I_NO_LOCK = lv_i_no_lock
    IMPORTING
         ANZ_AUSP = lv_anz_ausp
         ANZ_KSSK = lv_anz_kssk
    EXCEPTIONS
        FOREIGN_LOCK = 1
        NOT_DELETED = 2
        SYSTEM_FAILURE = 3
        TABLE_NOT_FOUND = 4
        DATE_NOT_ALLOWED = 5
        CHANGE_NR_CHANGED = 6
. " CLFM_DELETE_CLASSIFICATION




ABAP code using 7.40 inline data declarations to call FM CLFM_DELETE_CLASSIFICATION

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 DBCNT FROM SY INTO @DATA(ld_anz_ausp).
 
"SELECT single KREUZ FROM RMCLF INTO @DATA(ld_echt_lauf).
DATA(ld_echt_lauf) = 'X'.
 
 
"SELECT single OBJEK FROM RMCLF INTO @DATA(ld_object).
 
"SELECT single DBCNT FROM SY INTO @DATA(ld_anz_kssk).
 
 
"SELECT single OBTAB FROM TCLT INTO @DATA(ld_table).
 
 
"SELECT single BATCH FROM SY INTO @DATA(ld_type).
DATA(ld_type) = ' '.
 
 
"SELECT single KLART FROM RMCLF INTO @DATA(ld_classtype).
DATA(ld_classtype) = ' '.
 
 
 
"SELECT single AENNR1 FROM RMCLF INTO @DATA(ld_change_service_number).
 
"SELECT single DATUV1 FROM RMCLF INTO @DATA(ld_date_of_change).
 
DATA(ld_obj_has_change_service) = ' '.
 
"SELECT single KREUZ FROM RMCLF INTO @DATA(ld_i_no_lock).
DATA(ld_i_no_lock) = ' '.
 


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!