SAP CLEF_KSSK_DET_VALID Function Module for Selection of Valid KSSK Entries with Effectivity Logic
CLEF_KSSK_DET_VALID is a standard clef kssk det valid SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Selection of Valid KSSK Entries with Effectivity Logic 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 kssk det valid FM, simply by entering the name CLEF_KSSK_DET_VALID 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_KSSK_DET_VALID 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_KSSK_DET_VALID'"Selection of Valid KSSK Entries with Effectivity Logic.
EXPORTING
* I_EFFECTIVITY_ACT = ' ' "Indicator that T_AENNR_TAB is Read
* I_CLASSTYPE = ' ' "Class Type
I_EFFE_DATUM = "Dummy Effectivity Date
TABLES
T_KSSK_TAB = "Table of All Selected KSSK Entries
* T_AENNR_TAB = "Optional Table of All Change Numbers
EXCEPTIONS
NO_CLASSTYPE = 1
IMPORTING Parameters details for CLEF_KSSK_DET_VALID
I_EFFECTIVITY_ACT - Indicator that T_AENNR_TAB is Read
Data type: RMCLF-KREUZDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CLASSTYPE - Class Type
Data type: TCLA-KLARTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_EFFE_DATUM - Dummy Effectivity Date
Data type: TCLA-EFFE_DATUMOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CLEF_KSSK_DET_VALID
T_KSSK_TAB - Table of All Selected KSSK Entries
Data type: KSSKOptional: No
Call by Reference: No ( called with pass by value option)
T_AENNR_TAB - Optional Table of All Change Numbers
Data type: CC01_LISTE3Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_CLASSTYPE - Class Type Not Known
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CLEF_KSSK_DET_VALID 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_t_kssk_tab | TYPE STANDARD TABLE OF KSSK, " | |||
| lv_no_classtype | TYPE KSSK, " | |||
| lv_i_effectivity_act | TYPE RMCLF-KREUZ, " SPACE | |||
| lv_i_classtype | TYPE TCLA-KLART, " SPACE | |||
| lt_t_aennr_tab | TYPE STANDARD TABLE OF CC01_LISTE3, " | |||
| lv_i_effe_datum | TYPE TCLA-EFFE_DATUM. " |
|   CALL FUNCTION 'CLEF_KSSK_DET_VALID' "Selection of Valid KSSK Entries with Effectivity Logic |
| EXPORTING | ||
| I_EFFECTIVITY_ACT | = lv_i_effectivity_act | |
| I_CLASSTYPE | = lv_i_classtype | |
| I_EFFE_DATUM | = lv_i_effe_datum | |
| TABLES | ||
| T_KSSK_TAB | = lt_t_kssk_tab | |
| T_AENNR_TAB | = lt_t_aennr_tab | |
| EXCEPTIONS | ||
| NO_CLASSTYPE = 1 | ||
| . " CLEF_KSSK_DET_VALID | ||
ABAP code using 7.40 inline data declarations to call FM CLEF_KSSK_DET_VALID
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 KREUZ FROM RMCLF INTO @DATA(ld_i_effectivity_act). | ||||
| DATA(ld_i_effectivity_act) | = ' '. | |||
| "SELECT single KLART FROM TCLA INTO @DATA(ld_i_classtype). | ||||
| DATA(ld_i_classtype) | = ' '. | |||
| "SELECT single EFFE_DATUM FROM TCLA INTO @DATA(ld_i_effe_datum). | ||||
Search for further information about these or an SAP related objects