SAP CLUS_CHARACT_USAGE_IN_CLASS Function Module for Use of Characteristics per Class Type
CLUS_CHARACT_USAGE_IN_CLASS is a standard clus charact usage in class SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Use of Characteristics per Class Type 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 clus charact usage in class FM, simply by entering the name CLUS_CHARACT_USAGE_IN_CLASS into the relevant SAP transaction such as SE37 or SE38.
Function Group: CLUS
Program Name: SAPLCLUS
Main Program:
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CLUS_CHARACT_USAGE_IN_CLASS 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 'CLUS_CHARACT_USAGE_IN_CLASS'"Use of Characteristics per Class Type.
EXPORTING
* CHARACT = ' ' "
* CHARACT_INTERNAL_NUMBER = ' ' "
* CLASSTYPE = ' ' "
* KEY_DATE = SY-DATUM "
* FLG_EFFECTIVITY = ' ' "
IMPORTING
F_USAGE = "
TABLES
* E_KSML = "
EXCEPTIONS
INPUT_MISSING = 1 CHARACT_INVALID = 2
IMPORTING Parameters details for CLUS_CHARACT_USAGE_IN_CLASS
CHARACT -
Data type: CABN-ATNAMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHARACT_INTERNAL_NUMBER -
Data type: CABN-ATINNDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CLASSTYPE -
Data type: KLAH-KLARTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
KEY_DATE -
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_EFFECTIVITY -
Data type: SY-BATCHDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CLUS_CHARACT_USAGE_IN_CLASS
F_USAGE -
Data type: RMCLS-XFLAGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CLUS_CHARACT_USAGE_IN_CLASS
E_KSML -
Data type: KSMLOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INPUT_MISSING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CHARACT_INVALID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CLUS_CHARACT_USAGE_IN_CLASS 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: | ||||
| lt_e_ksml | TYPE STANDARD TABLE OF KSML, " | |||
| lv_charact | TYPE CABN-ATNAM, " SPACE | |||
| lv_f_usage | TYPE RMCLS-XFLAG, " | |||
| lv_input_missing | TYPE RMCLS, " | |||
| lv_charact_invalid | TYPE RMCLS, " | |||
| lv_charact_internal_number | TYPE CABN-ATINN, " SPACE | |||
| lv_classtype | TYPE KLAH-KLART, " SPACE | |||
| lv_key_date | TYPE SY-DATUM, " SY-DATUM | |||
| lv_flg_effectivity | TYPE SY-BATCH. " SPACE |
|   CALL FUNCTION 'CLUS_CHARACT_USAGE_IN_CLASS' "Use of Characteristics per Class Type |
| EXPORTING | ||
| CHARACT | = lv_charact | |
| CHARACT_INTERNAL_NUMBER | = lv_charact_internal_number | |
| CLASSTYPE | = lv_classtype | |
| KEY_DATE | = lv_key_date | |
| FLG_EFFECTIVITY | = lv_flg_effectivity | |
| IMPORTING | ||
| F_USAGE | = lv_f_usage | |
| TABLES | ||
| E_KSML | = lt_e_ksml | |
| EXCEPTIONS | ||
| INPUT_MISSING = 1 | ||
| CHARACT_INVALID = 2 | ||
| . " CLUS_CHARACT_USAGE_IN_CLASS | ||
ABAP code using 7.40 inline data declarations to call FM CLUS_CHARACT_USAGE_IN_CLASS
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 ATNAM FROM CABN INTO @DATA(ld_charact). | ||||
| DATA(ld_charact) | = ' '. | |||
| "SELECT single XFLAG FROM RMCLS INTO @DATA(ld_f_usage). | ||||
| "SELECT single ATINN FROM CABN INTO @DATA(ld_charact_internal_number). | ||||
| DATA(ld_charact_internal_number) | = ' '. | |||
| "SELECT single KLART FROM KLAH INTO @DATA(ld_classtype). | ||||
| DATA(ld_classtype) | = ' '. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_key_date). | ||||
| DATA(ld_key_date) | = SY-DATUM. | |||
| "SELECT single BATCH FROM SY INTO @DATA(ld_flg_effectivity). | ||||
| DATA(ld_flg_effectivity) | = ' '. | |||
Search for further information about these or an SAP related objects