SAP CLAP_DDB_GET_CLASSIFICATION Function Module for Classification: API All Assignments to Object
CLAP_DDB_GET_CLASSIFICATION is a standard clap ddb get 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: API All Assignments to 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 clap ddb get classification FM, simply by entering the name CLAP_DDB_GET_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 CLAP_DDB_GET_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 'CLAP_DDB_GET_CLASSIFICATION'"Classification: API All Assignments to Object.
EXPORTING
OBJECT = "Object
* CLASSTYPE = "Class type
* READ_ONLY = ' ' "Allocations read only
* CALLED_FROM_API = ' ' "Call via API modules
* SORT_POSNR = ' ' "
OBTAB = "Logical table name from TCLT
* STANDARD_TYPE_ONLY = ' ' "Only select via standard class type
* OBJECT_EQ_CLASS = ' ' "Object is a class
* SPRAS = SY-LANGU "Language key
* ONLY_VARKLART = ' ' "Only process variant class types
* POBTAB = ' ' "Physical table name from TCLAO
* DATE_OF_CHANGE = "Date for engineering change management
* CHANGE_SERVICE_NUMBER = "Change number
IMPORTING
ERROR_STATU = "NO_ALLOCATION exception in API detail
TABLES
* ALLOCATIONS = "Allocations table
EXCEPTIONS
NO_ALLOCATION = 1 FOREIGN_LOCK = 2 SYSTEM_FAILURE = 3 SET_AENNR = 4 CHANGE_NR_NOT_EXIST = 5 DATE_IN_PAST = 6 ERROR_CLASS = 7 ERROR_DATE_RESTRICTION = 8 ERROR_STATUS = 9
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 CLAP_DDB_GET_CLASSIFICATION
OBJECT - Object
Data type: KSSK-OBJEKOptional: No
Call by Reference: No ( called with pass by value option)
CLASSTYPE - Class type
Data type: RMCLF-KLARTOptional: Yes
Call by Reference: No ( called with pass by value option)
READ_ONLY - Allocations read only
Data type: RMCLF-KREUZDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLED_FROM_API - Call via API modules
Data type: RMCLF-KREUZDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SORT_POSNR -
Data type: RMCLF-KREUZDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBTAB - Logical table name from TCLT
Data type: TCLT-OBTABOptional: No
Call by Reference: No ( called with pass by value option)
STANDARD_TYPE_ONLY - Only select via standard class type
Data type: RMCLF-KREUZDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT_EQ_CLASS - Object is a class
Data type: RMCLF-KREUZDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SPRAS - Language key
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
ONLY_VARKLART - Only process variant class types
Data type: TCLA-VARKLARTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
POBTAB - Physical table name from TCLAO
Data type: TCLAO-OBTABDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATE_OF_CHANGE - Date for engineering change management
Data type: RMCLF-DATUV1Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGE_SERVICE_NUMBER - Change number
Data type: RMCLF-AENNR1Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CLAP_DDB_GET_CLASSIFICATION
ERROR_STATU - NO_ALLOCATION exception in API detail
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CLAP_DDB_GET_CLASSIFICATION
ALLOCATIONS - Allocations table
Data type: API_KSSKOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_ALLOCATION - No allocations found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FOREIGN_LOCK -
Data type:Optional: No
Call by Reference: Yes
SYSTEM_FAILURE -
Data type:Optional: No
Call by Reference: Yes
SET_AENNR - Please enter a change number
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CHANGE_NR_NOT_EXIST - Change number does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DATE_IN_PAST - Change date is in the past
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_CLASS - Change number not for classification
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_DATE_RESTRICTION - Change number not currently released
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_STATUS - Status of change number does not allow use
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CLAP_DDB_GET_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_object | TYPE KSSK-OBJEK, " | |||
lt_allocations | TYPE STANDARD TABLE OF API_KSSK, " | |||
lv_error_statu | TYPE API_KSSK, " | |||
lv_no_allocation | TYPE API_KSSK, " | |||
lv_classtype | TYPE RMCLF-KLART, " | |||
lv_read_only | TYPE RMCLF-KREUZ, " ' ' | |||
lv_called_from_api | TYPE RMCLF-KREUZ, " ' ' | |||
lv_sort_posnr | TYPE RMCLF-KREUZ, " SPACE | |||
lv_obtab | TYPE TCLT-OBTAB, " | |||
lv_foreign_lock | TYPE TCLT, " | |||
lv_system_failure | TYPE TCLT, " | |||
lv_standard_type_only | TYPE RMCLF-KREUZ, " SPACE | |||
lv_set_aennr | TYPE RMCLF, " | |||
lv_object_eq_class | TYPE RMCLF-KREUZ, " SPACE | |||
lv_spras | TYPE SY-LANGU, " SY-LANGU | |||
lv_change_nr_not_exist | TYPE SY, " | |||
lv_date_in_past | TYPE SY, " | |||
lv_only_varklart | TYPE TCLA-VARKLART, " SPACE | |||
lv_pobtab | TYPE TCLAO-OBTAB, " SPACE | |||
lv_error_class | TYPE TCLAO, " | |||
lv_date_of_change | TYPE RMCLF-DATUV1, " | |||
lv_error_date_restriction | TYPE RMCLF, " | |||
lv_error_status | TYPE RMCLF, " | |||
lv_change_service_number | TYPE RMCLF-AENNR1. " |
  CALL FUNCTION 'CLAP_DDB_GET_CLASSIFICATION' "Classification: API All Assignments to Object |
EXPORTING | ||
OBJECT | = lv_object | |
CLASSTYPE | = lv_classtype | |
READ_ONLY | = lv_read_only | |
CALLED_FROM_API | = lv_called_from_api | |
SORT_POSNR | = lv_sort_posnr | |
OBTAB | = lv_obtab | |
STANDARD_TYPE_ONLY | = lv_standard_type_only | |
OBJECT_EQ_CLASS | = lv_object_eq_class | |
SPRAS | = lv_spras | |
ONLY_VARKLART | = lv_only_varklart | |
POBTAB | = lv_pobtab | |
DATE_OF_CHANGE | = lv_date_of_change | |
CHANGE_SERVICE_NUMBER | = lv_change_service_number | |
IMPORTING | ||
ERROR_STATU | = lv_error_statu | |
TABLES | ||
ALLOCATIONS | = lt_allocations | |
EXCEPTIONS | ||
NO_ALLOCATION = 1 | ||
FOREIGN_LOCK = 2 | ||
SYSTEM_FAILURE = 3 | ||
SET_AENNR = 4 | ||
CHANGE_NR_NOT_EXIST = 5 | ||
DATE_IN_PAST = 6 | ||
ERROR_CLASS = 7 | ||
ERROR_DATE_RESTRICTION = 8 | ||
ERROR_STATUS = 9 | ||
. " CLAP_DDB_GET_CLASSIFICATION |
ABAP code using 7.40 inline data declarations to call FM CLAP_DDB_GET_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 OBJEK FROM KSSK INTO @DATA(ld_object). | ||||
"SELECT single KLART FROM RMCLF INTO @DATA(ld_classtype). | ||||
"SELECT single KREUZ FROM RMCLF INTO @DATA(ld_read_only). | ||||
DATA(ld_read_only) | = ' '. | |||
"SELECT single KREUZ FROM RMCLF INTO @DATA(ld_called_from_api). | ||||
DATA(ld_called_from_api) | = ' '. | |||
"SELECT single KREUZ FROM RMCLF INTO @DATA(ld_sort_posnr). | ||||
DATA(ld_sort_posnr) | = ' '. | |||
"SELECT single OBTAB FROM TCLT INTO @DATA(ld_obtab). | ||||
"SELECT single KREUZ FROM RMCLF INTO @DATA(ld_standard_type_only). | ||||
DATA(ld_standard_type_only) | = ' '. | |||
"SELECT single KREUZ FROM RMCLF INTO @DATA(ld_object_eq_class). | ||||
DATA(ld_object_eq_class) | = ' '. | |||
"SELECT single LANGU FROM SY INTO @DATA(ld_spras). | ||||
DATA(ld_spras) | = SY-LANGU. | |||
"SELECT single VARKLART FROM TCLA INTO @DATA(ld_only_varklart). | ||||
DATA(ld_only_varklart) | = ' '. | |||
"SELECT single OBTAB FROM TCLAO INTO @DATA(ld_pobtab). | ||||
DATA(ld_pobtab) | = ' '. | |||
"SELECT single DATUV1 FROM RMCLF INTO @DATA(ld_date_of_change). | ||||
"SELECT single AENNR1 FROM RMCLF INTO @DATA(ld_change_service_number). | ||||
Search for further information about these or an SAP related objects