SAP CLEF_EFFECTIVITY_USED Function Module for Checks Whether Effectivity is Active for Change Number/Class Type
CLEF_EFFECTIVITY_USED is a standard clef effectivity used SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Checks Whether Effectivity is Active for Change Number/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 clef effectivity used FM, simply by entering the name CLEF_EFFECTIVITY_USED into the relevant SAP transaction such as SE37 or SE38.
Function Group: CLEF
Program Name: SAPLCLEF
Main Program: SAPLCLEF
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CLEF_EFFECTIVITY_USED 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 'CLEF_EFFECTIVITY_USED'"Checks Whether Effectivity is Active for Change Number/Class Type.
EXPORTING
I_AENNR = "Change Number
I_CLASSTYPE = "Class Type
IMPORTING
E_EFFE_DATUM = "Date for Effectivity for Class Type
E_EFFE_AENNR = "No Change Numbers with Effectivity
E_EFFE_GLTART = "
EXCEPTIONS
KLART_NOT_ACTIVE = 1
IMPORTING Parameters details for CLEF_EFFECTIVITY_USED
I_AENNR - Change Number
Data type: AUSP-AENNROptional: No
Call by Reference: No ( called with pass by value option)
I_CLASSTYPE - Class Type
Data type: AUSP-KLARTOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CLEF_EFFECTIVITY_USED
E_EFFE_DATUM - Date for Effectivity for Class Type
Data type: TCLA-EFFE_DATUMOptional: No
Call by Reference: No ( called with pass by value option)
E_EFFE_AENNR - No Change Numbers with Effectivity
Data type: RMCLF-KREUZOptional: No
Call by Reference: No ( called with pass by value option)
E_EFFE_GLTART -
Data type: KLAH-CLASSOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
KLART_NOT_ACTIVE - Effectivity Not Active for Class Type
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CLEF_EFFECTIVITY_USED 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_i_aennr | TYPE AUSP-AENNR, " | |||
| lv_e_effe_datum | TYPE TCLA-EFFE_DATUM, " | |||
| lv_klart_not_active | TYPE TCLA, " | |||
| lv_i_classtype | TYPE AUSP-KLART, " | |||
| lv_e_effe_aennr | TYPE RMCLF-KREUZ, " | |||
| lv_e_effe_gltart | TYPE KLAH-CLASS. " |
|   CALL FUNCTION 'CLEF_EFFECTIVITY_USED' "Checks Whether Effectivity is Active for Change Number/Class Type |
| EXPORTING | ||
| I_AENNR | = lv_i_aennr | |
| I_CLASSTYPE | = lv_i_classtype | |
| IMPORTING | ||
| E_EFFE_DATUM | = lv_e_effe_datum | |
| E_EFFE_AENNR | = lv_e_effe_aennr | |
| E_EFFE_GLTART | = lv_e_effe_gltart | |
| EXCEPTIONS | ||
| KLART_NOT_ACTIVE = 1 | ||
| . " CLEF_EFFECTIVITY_USED | ||
ABAP code using 7.40 inline data declarations to call FM CLEF_EFFECTIVITY_USED
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 AENNR FROM AUSP INTO @DATA(ld_i_aennr). | ||||
| "SELECT single EFFE_DATUM FROM TCLA INTO @DATA(ld_e_effe_datum). | ||||
| "SELECT single KLART FROM AUSP INTO @DATA(ld_i_classtype). | ||||
| "SELECT single KREUZ FROM RMCLF INTO @DATA(ld_e_effe_aennr). | ||||
| "SELECT single CLASS FROM KLAH INTO @DATA(ld_e_effe_gltart). | ||||
Search for further information about these or an SAP related objects