SAP CLMA_CLASS_CREATE Function Module for Create Class for SAP Retail
CLMA_CLASS_CREATE is a standard clma class create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create Class for SAP Retail 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 clma class create FM, simply by entering the name CLMA_CLASS_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CLMA
Program Name: SAPLCLMA
Main Program: SAPLCLMA
Appliation area: M
Release date: 14-Feb-1995
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CLMA_CLASS_CREATE 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 'CLMA_CLASS_CREATE'"Create Class for SAP Retail.
EXPORTING
CLASSNAME = "Class
CLASSTYPE = "Class Type
CLASS_DESCRIPTION = "Class Text
* WWSKZ = ' ' "SAP Retail Only: Type of SAP Retail Class
* LANGUAGE = SY-LANGU "Language
IMPORTING
ERROR_MSGID = "Message ID (in Case of Error)
ERROR_MSGNO = "Message Number (in Case of Error)
ERROR = "Error That is Not an Exception
ERROR_MSGV1 = "Message Variable 1 (in Case of Error)
ERROR_MSGV2 = "Message Variable 2 (in Case of Error)
ERROR_MSGV3 = "Message Variable 3 (in Case of Error)
ERROR_MSGV4 = "Message Variable 4 (in Case of Error)
TABLES
* TFEATURES = "Characteristics
EXCEPTIONS
CLASS_EXIST = 1 CLASS_INVALID_SIGN = 2 CLASS_LOCKED = 3 FEATURE_NOT_EXIST = 4 LOCK_ERROR = 5 NO_AUTHORITY = 6 FEATURE_NAME_MISSING = 7
IMPORTING Parameters details for CLMA_CLASS_CREATE
CLASSNAME - Class
Data type: KLAH-CLASSOptional: No
Call by Reference: No ( called with pass by value option)
CLASSTYPE - Class Type
Data type: KLAH-KLARTOptional: No
Call by Reference: No ( called with pass by value option)
CLASS_DESCRIPTION - Class Text
Data type: SWOR-KSCHLOptional: No
Call by Reference: No ( called with pass by value option)
WWSKZ - SAP Retail Only: Type of SAP Retail Class
Data type: RMCLM-WWSKZDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE - Language
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CLMA_CLASS_CREATE
ERROR_MSGID - Message ID (in Case of Error)
Data type: SY-MSGIDOptional: No
Call by Reference: No ( called with pass by value option)
ERROR_MSGNO - Message Number (in Case of Error)
Data type: SY-MSGNOOptional: No
Call by Reference: No ( called with pass by value option)
ERROR - Error That is Not an Exception
Data type: SY-BINPTOptional: No
Call by Reference: No ( called with pass by value option)
ERROR_MSGV1 - Message Variable 1 (in Case of Error)
Data type: SY-MSGV1Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_MSGV2 - Message Variable 2 (in Case of Error)
Data type: SY-MSGV2Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_MSGV3 - Message Variable 3 (in Case of Error)
Data type: SY-MSGV3Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_MSGV4 - Message Variable 4 (in Case of Error)
Data type: SY-MSGV4Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CLMA_CLASS_CREATE
TFEATURES - Characteristics
Data type: CLMERKOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CLASS_EXIST - Class already exists
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CLASS_INVALID_SIGN - Class contains an invalid character
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CLASS_LOCKED - Class has already been blocked
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FEATURE_NOT_EXIST - A characteristic does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LOCK_ERROR - System: Block error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORITY - No authorization for creation class
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FEATURE_NAME_MISSING - Characteristic Name Missing from Transfer Table
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CLMA_CLASS_CREATE 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, " | |||
| lt_tfeatures | TYPE STANDARD TABLE OF CLMERK, " | |||
| lv_class_exist | TYPE CLMERK, " | |||
| lv_error_msgid | TYPE SY-MSGID, " | |||
| lv_classtype | TYPE KLAH-KLART, " | |||
| lv_error_msgno | TYPE SY-MSGNO, " | |||
| lv_class_invalid_sign | TYPE SY, " | |||
| lv_error | TYPE SY-BINPT, " | |||
| lv_class_locked | TYPE SY, " | |||
| lv_class_description | TYPE SWOR-KSCHL, " | |||
| lv_wwskz | TYPE RMCLM-WWSKZ, " SPACE | |||
| lv_error_msgv1 | TYPE SY-MSGV1, " | |||
| lv_feature_not_exist | TYPE SY, " | |||
| lv_language | TYPE SY-LANGU, " SY-LANGU | |||
| lv_lock_error | TYPE SY, " | |||
| lv_error_msgv2 | TYPE SY-MSGV2, " | |||
| lv_error_msgv3 | TYPE SY-MSGV3, " | |||
| lv_no_authority | TYPE SY, " | |||
| lv_error_msgv4 | TYPE SY-MSGV4, " | |||
| lv_feature_name_missing | TYPE SY. " |
|   CALL FUNCTION 'CLMA_CLASS_CREATE' "Create Class for SAP Retail |
| EXPORTING | ||
| CLASSNAME | = lv_classname | |
| CLASSTYPE | = lv_classtype | |
| CLASS_DESCRIPTION | = lv_class_description | |
| WWSKZ | = lv_wwskz | |
| LANGUAGE | = lv_language | |
| IMPORTING | ||
| ERROR_MSGID | = lv_error_msgid | |
| ERROR_MSGNO | = lv_error_msgno | |
| ERROR | = lv_error | |
| ERROR_MSGV1 | = lv_error_msgv1 | |
| ERROR_MSGV2 | = lv_error_msgv2 | |
| ERROR_MSGV3 | = lv_error_msgv3 | |
| ERROR_MSGV4 | = lv_error_msgv4 | |
| TABLES | ||
| TFEATURES | = lt_tfeatures | |
| EXCEPTIONS | ||
| CLASS_EXIST = 1 | ||
| CLASS_INVALID_SIGN = 2 | ||
| CLASS_LOCKED = 3 | ||
| FEATURE_NOT_EXIST = 4 | ||
| LOCK_ERROR = 5 | ||
| NO_AUTHORITY = 6 | ||
| FEATURE_NAME_MISSING = 7 | ||
| . " CLMA_CLASS_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM CLMA_CLASS_CREATE
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). | ||||
| "SELECT single MSGID FROM SY INTO @DATA(ld_error_msgid). | ||||
| "SELECT single KLART FROM KLAH INTO @DATA(ld_classtype). | ||||
| "SELECT single MSGNO FROM SY INTO @DATA(ld_error_msgno). | ||||
| "SELECT single BINPT FROM SY INTO @DATA(ld_error). | ||||
| "SELECT single KSCHL FROM SWOR INTO @DATA(ld_class_description). | ||||
| "SELECT single WWSKZ FROM RMCLM INTO @DATA(ld_wwskz). | ||||
| DATA(ld_wwskz) | = ' '. | |||
| "SELECT single MSGV1 FROM SY INTO @DATA(ld_error_msgv1). | ||||
| "SELECT single LANGU FROM SY INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = SY-LANGU. | |||
| "SELECT single MSGV2 FROM SY INTO @DATA(ld_error_msgv2). | ||||
| "SELECT single MSGV3 FROM SY INTO @DATA(ld_error_msgv3). | ||||
| "SELECT single MSGV4 FROM SY INTO @DATA(ld_error_msgv4). | ||||
Search for further information about these or an SAP related objects