SAP CLMA_CLASS_EXIST Function Module for Check that Class Exists and is Valid









CLMA_CLASS_EXIST is a standard clma class exist 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 that Class Exists and is Valid 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 exist FM, simply by entering the name CLMA_CLASS_EXIST into the relevant SAP transaction such as SE37 or SE38.

Function Group: CLMA
Program Name: SAPLCLMA
Main Program: SAPLCLMA
Appliation area:
Release date: 14-Feb-1995
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CLMA_CLASS_EXIST 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_EXIST'"Check that Class Exists and is Valid
EXPORTING
CLASS = "External Class Number
* CLASS_ACTIVITY = "1=Create 2=Change 3=Display 4=Delete
* BYPASSING_BUFFER = ' ' "Work Without Buffer
* CLASSIFY_ACTIVITY = ' ' "Classification: Display (Blank) Change (X)
* CLASSNUMBER = ' ' "Internal Class Number
CLASSTYPE = "Class Type
* DATE = SY-DATUM "Date to be Checked Against Validity Period
* DESCRIPTION_ONLY = ' ' "Return Class Description Only
* LANGUAGE = SY-LANGU "Language
* MODE = ' ' "Start From: K = Classification S = Find Objects
* NO_DESCRIPTION = ' ' "Do Not Return Class Description

IMPORTING
CLASS_DESCRIPTION = "Class Description
E_BUFFER_COUNT = "Number of Buffer Entries in KLAH
CLASS_LANGUAGE = "Language of Language-Specific Class Elements
NOT_VALID = "Invalid
NO_ACTIVE_STATUS = "Not an Active Status
NO_AUTHORITY_CLASSIFY = "No Authorization for Classification
NO_AUTHORITY_MAINTAIN = "No Authorization to Maintain Class
NO_AUTHORITY_SELECT = "No Authorization for Finding Objects
RET_CODE = "Return Code: 0=OK 1=In Other Language 2=Not There
XKLAH = "Class Header Dataset

EXCEPTIONS
NO_VALID_SIGN = 1
.



IMPORTING Parameters details for CLMA_CLASS_EXIST

CLASS - External Class Number

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

CLASS_ACTIVITY - 1=Create 2=Change 3=Display 4=Delete

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

BYPASSING_BUFFER - Work Without Buffer

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

CLASSIFY_ACTIVITY - Classification: Display (Blank) Change (X)

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

CLASSNUMBER - Internal Class Number

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

CLASSTYPE - Class Type

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

DATE - Date to be Checked Against Validity Period

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

DESCRIPTION_ONLY - Return Class Description Only

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

LANGUAGE - Language

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

MODE - Start From: K = Classification S = Find Objects

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

NO_DESCRIPTION - Do Not Return Class Description

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

EXPORTING Parameters details for CLMA_CLASS_EXIST

CLASS_DESCRIPTION - Class Description

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

E_BUFFER_COUNT - Number of Buffer Entries in KLAH

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

CLASS_LANGUAGE - Language of Language-Specific Class Elements

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

NOT_VALID - Invalid

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

NO_ACTIVE_STATUS - Not an Active Status

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

NO_AUTHORITY_CLASSIFY - No Authorization for Classification

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

NO_AUTHORITY_MAINTAIN - No Authorization to Maintain Class

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

NO_AUTHORITY_SELECT - No Authorization for Finding Objects

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

RET_CODE - Return Code: 0=OK 1=In Other Language 2=Not There

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

XKLAH - Class Header Dataset

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

EXCEPTIONS details

NO_VALID_SIGN - Invalid Characters in External Class Number

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

Copy and paste ABAP code example for CLMA_CLASS_EXIST 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_class  TYPE RMCLM-CLASS, "   
lv_no_valid_sign  TYPE RMCLM, "   
lv_class_description  TYPE RMCLM-KLBEZ, "   
lv_class_activity  TYPE SY-BATCH, "   
lv_e_buffer_count  TYPE SY-TMAXL, "   
lv_bypassing_buffer  TYPE RMCLM-BASISD, "   SPACE
lv_class_language  TYPE SY-LANGU, "   
lv_classify_activity  TYPE RMCLM-BASISD, "   SPACE
lv_not_valid  TYPE RMCLM-BASISD, "   
lv_classnumber  TYPE KLAH-CLINT, "   SPACE
lv_classtype  TYPE RMCLM-KLART, "   
lv_no_active_status  TYPE RMCLM-BASISD, "   
lv_date  TYPE SY-DATUM, "   SY-DATUM
lv_no_authority_classify  TYPE RMCLM-BASISD, "   
lv_description_only  TYPE RMCLM-ANZUKZ, "   SPACE
lv_no_authority_maintain  TYPE RMCLM-BASISD, "   
lv_language  TYPE SY-LANGU, "   SY-LANGU
lv_no_authority_select  TYPE RMCLM-BASISD, "   
lv_mode  TYPE RMCLM-BASISD, "   SPACE
lv_ret_code  TYPE SY-SUBRC, "   
lv_xklah  TYPE KLAH, "   
lv_no_description  TYPE RMCLM-BASISD. "   SPACE

  CALL FUNCTION 'CLMA_CLASS_EXIST'  "Check that Class Exists and is Valid
    EXPORTING
         CLASS = lv_class
         CLASS_ACTIVITY = lv_class_activity
         BYPASSING_BUFFER = lv_bypassing_buffer
         CLASSIFY_ACTIVITY = lv_classify_activity
         CLASSNUMBER = lv_classnumber
         CLASSTYPE = lv_classtype
         DATE = lv_date
         DESCRIPTION_ONLY = lv_description_only
         LANGUAGE = lv_language
         MODE = lv_mode
         NO_DESCRIPTION = lv_no_description
    IMPORTING
         CLASS_DESCRIPTION = lv_class_description
         E_BUFFER_COUNT = lv_e_buffer_count
         CLASS_LANGUAGE = lv_class_language
         NOT_VALID = lv_not_valid
         NO_ACTIVE_STATUS = lv_no_active_status
         NO_AUTHORITY_CLASSIFY = lv_no_authority_classify
         NO_AUTHORITY_MAINTAIN = lv_no_authority_maintain
         NO_AUTHORITY_SELECT = lv_no_authority_select
         RET_CODE = lv_ret_code
         XKLAH = lv_xklah
    EXCEPTIONS
        NO_VALID_SIGN = 1
. " CLMA_CLASS_EXIST




ABAP code using 7.40 inline data declarations to call FM CLMA_CLASS_EXIST

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 RMCLM INTO @DATA(ld_class).
 
 
"SELECT single KLBEZ FROM RMCLM INTO @DATA(ld_class_description).
 
"SELECT single BATCH FROM SY INTO @DATA(ld_class_activity).
 
"SELECT single TMAXL FROM SY INTO @DATA(ld_e_buffer_count).
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_bypassing_buffer).
DATA(ld_bypassing_buffer) = ' '.
 
"SELECT single LANGU FROM SY INTO @DATA(ld_class_language).
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_classify_activity).
DATA(ld_classify_activity) = ' '.
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_not_valid).
 
"SELECT single CLINT FROM KLAH INTO @DATA(ld_classnumber).
DATA(ld_classnumber) = ' '.
 
"SELECT single KLART FROM RMCLM INTO @DATA(ld_classtype).
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_no_active_status).
 
"SELECT single DATUM FROM SY INTO @DATA(ld_date).
DATA(ld_date) = SY-DATUM.
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_no_authority_classify).
 
"SELECT single ANZUKZ FROM RMCLM INTO @DATA(ld_description_only).
DATA(ld_description_only) = ' '.
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_no_authority_maintain).
 
"SELECT single LANGU FROM SY INTO @DATA(ld_language).
DATA(ld_language) = SY-LANGU.
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_no_authority_select).
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_mode).
DATA(ld_mode) = ' '.
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_ret_code).
 
 
"SELECT single BASISD FROM RMCLM INTO @DATA(ld_no_description).
DATA(ld_no_description) = ' '.
 


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!