SAP Function Modules

CLMA_CLASS_LIST SAP Function module - Class List (also Generic or Masked)







CLMA_CLASS_LIST is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CLMA_CLASS_LIST into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CLMA
Released Date: 14.02.1995
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM CLMA_CLASS_LIST - CLMA CLASS LIST





CALL FUNCTION 'CLMA_CLASS_LIST' "Class List (also Generic or Masked)
  EXPORTING
    classname =                 " klah-class    Class
    classtype =                 " klah-klart    Class Type
*   language = SY-LANGU         " sy-langu      Language
*   with_allocations = SPACE    " rmclm-anzukz  Only Classes with Assignments
*   key_date = SY-DATUM         " kssk-datuv    Valid-From Date
*   allocations = SPACE         " rmclm-anzukz  With Assignments Indicator
*   change_number = SPACE       " rmclm-aennr
  TABLES
    tclasses =                  " clclass       Class Table
  EXCEPTIONS
    NO_CLASSES = 1              "               No Classes Found
    .  "  CLMA_CLASS_LIST

ABAP code example for Function Module CLMA_CLASS_LIST





The ABAP code below is a full code listing to execute function module CLMA_CLASS_LIST including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_tclasses  TYPE STANDARD TABLE OF CLCLASS,"TABLES PARAM
wa_tclasses  LIKE LINE OF it_tclasses .


SELECT single CLASS
FROM KLAH
INTO @DATA(ld_classname).


SELECT single KLART
FROM KLAH
INTO @DATA(ld_classtype).

DATA(ld_language) = 'Check type of data required'.

DATA(ld_with_allocations) = some text here

SELECT single DATUV
FROM KSSK
INTO @DATA(ld_key_date).


DATA(ld_allocations) = some text here

DATA(ld_change_number) = some text here

"populate fields of struture and append to itab
append wa_tclasses to it_tclasses. . CALL FUNCTION 'CLMA_CLASS_LIST' EXPORTING classname = ld_classname classtype = ld_classtype * language = ld_language * with_allocations = ld_with_allocations * key_date = ld_key_date * allocations = ld_allocations * change_number = ld_change_number TABLES tclasses = it_tclasses EXCEPTIONS NO_CLASSES = 1 . " CLMA_CLASS_LIST
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_classname  TYPE KLAH-CLASS ,
it_tclasses  TYPE STANDARD TABLE OF CLCLASS ,
wa_tclasses  LIKE LINE OF it_tclasses,
ld_classtype  TYPE KLAH-KLART ,
ld_language  TYPE SY-LANGU ,
ld_with_allocations  TYPE RMCLM-ANZUKZ ,
ld_key_date  TYPE KSSK-DATUV ,
ld_allocations  TYPE RMCLM-ANZUKZ ,
ld_change_number  TYPE RMCLM-AENNR .


SELECT single CLASS
FROM KLAH
INTO ld_classname.


"populate fields of struture and append to itab
append wa_tclasses to it_tclasses.

SELECT single KLART
FROM KLAH
INTO ld_classtype.

ld_language = 'Check type of data required'.

ld_with_allocations = some text here

SELECT single DATUV
FROM KSSK
INTO ld_key_date.


ld_allocations = some text here

ld_change_number = some text here

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CLMA_CLASS_LIST or its description.