SAP CLAF_CHECK_ALLOCATION Function Module for Check Object-to-Class Assignments / Objects (Not Classes) in Class
CLAF_CHECK_ALLOCATION is a standard claf check allocation SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check Object-to-Class Assignments / Objects (Not Classes) in 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 claf check allocation FM, simply by entering the name CLAF_CHECK_ALLOCATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: CLAF
Program Name: SAPLCLAF
Main Program: SAPLCLAF
Appliation area:
Release date: 09-Feb-1998
Mode(Normal, Remote etc): Normal Function Module
Update:
Function CLAF_CHECK_ALLOCATION 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_CHECK_ALLOCATION'"Check Object-to-Class Assignments / Objects (Not Classes) in Class.
EXPORTING
* CLASSNAME = ' ' "Class
* CLASSNUMBER = 0 "Internal Class Number
CLASSTYPE = "Class Type
* OBJECT = ' ' "Object Key
* KEY_DATE = SY-DATUM "Valid From
* CHANGE_SERVICE_CLF = 'X' "Engineering Change Management for Classification
* CHANGE_NUMBER = ' ' "Change Number
* TABLE = "
IMPORTING
ALLOCATION_EXIST = "Assignment exists
ALLOCATION_EXIST_IN_FUTURE = "No Longer Supported as of 4.0C
IMPORTING Parameters details for CLAF_CHECK_ALLOCATION
CLASSNAME - Class
Data type: KLAH-CLASSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CLASSNUMBER - Internal Class Number
Data type: KSSK-CLINTOptional: Yes
Call by Reference: No ( called with pass by value option)
CLASSTYPE - Class Type
Data type: KSSK-KLARTOptional: No
Call by Reference: No ( called with pass by value option)
OBJECT - Object Key
Data type: KSSK-OBJEKDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
KEY_DATE - Valid From
Data type: KSSK-DATUVDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGE_SERVICE_CLF - Engineering Change Management for Classification
Data type: TCLA-AEDIEZUORDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGE_NUMBER - Change Number
Data type: KSSK-AENNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLE -
Data type: TCLO-OBTABOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CLAF_CHECK_ALLOCATION
ALLOCATION_EXIST - Assignment exists
Data type: RMCLM-BASISDOptional: No
Call by Reference: No ( called with pass by value option)
ALLOCATION_EXIST_IN_FUTURE - No Longer Supported as of 4.0C
Data type: RMCLM-BASISDOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CLAF_CHECK_ALLOCATION 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_classname | TYPE KLAH-CLASS, " SPACE | |||
lv_allocation_exist | TYPE RMCLM-BASISD, " | |||
lv_classnumber | TYPE KSSK-CLINT, " 0 | |||
lv_allocation_exist_in_future | TYPE RMCLM-BASISD, " | |||
lv_classtype | TYPE KSSK-KLART, " | |||
lv_object | TYPE KSSK-OBJEK, " SPACE | |||
lv_key_date | TYPE KSSK-DATUV, " SY-DATUM | |||
lv_change_service_clf | TYPE TCLA-AEDIEZUORD, " 'X' | |||
lv_change_number | TYPE KSSK-AENNR, " SPACE | |||
lv_table | TYPE TCLO-OBTAB. " |
  CALL FUNCTION 'CLAF_CHECK_ALLOCATION' "Check Object-to-Class Assignments / Objects (Not Classes) in Class |
EXPORTING | ||
CLASSNAME | = lv_classname | |
CLASSNUMBER | = lv_classnumber | |
CLASSTYPE | = lv_classtype | |
OBJECT | = lv_object | |
KEY_DATE | = lv_key_date | |
CHANGE_SERVICE_CLF | = lv_change_service_clf | |
CHANGE_NUMBER | = lv_change_number | |
TABLE | = lv_table | |
IMPORTING | ||
ALLOCATION_EXIST | = lv_allocation_exist | |
ALLOCATION_EXIST_IN_FUTURE | = lv_allocation_exist_in_future | |
. " CLAF_CHECK_ALLOCATION |
ABAP code using 7.40 inline data declarations to call FM CLAF_CHECK_ALLOCATION
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_classname). | ||||
DATA(ld_classname) | = ' '. | |||
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_allocation_exist). | ||||
"SELECT single CLINT FROM KSSK INTO @DATA(ld_classnumber). | ||||
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_allocation_exist_in_future). | ||||
"SELECT single KLART FROM KSSK INTO @DATA(ld_classtype). | ||||
"SELECT single OBJEK FROM KSSK INTO @DATA(ld_object). | ||||
DATA(ld_object) | = ' '. | |||
"SELECT single DATUV FROM KSSK INTO @DATA(ld_key_date). | ||||
DATA(ld_key_date) | = SY-DATUM. | |||
"SELECT single AEDIEZUORD FROM TCLA INTO @DATA(ld_change_service_clf). | ||||
DATA(ld_change_service_clf) | = 'X'. | |||
"SELECT single AENNR FROM KSSK INTO @DATA(ld_change_number). | ||||
DATA(ld_change_number) | = ' '. | |||
"SELECT single OBTAB FROM TCLO INTO @DATA(ld_table). | ||||
Search for further information about these or an SAP related objects