SAP QPS1_CODEGROUP_VALID_READ Function Module for Reading a code group at the key date and the respective codes
QPS1_CODEGROUP_VALID_READ is a standard qps1 codegroup valid read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reading a code group at the key date and the respective codes 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 qps1 codegroup valid read FM, simply by entering the name QPS1_CODEGROUP_VALID_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: QPS1
Program Name: SAPLQPS1
Main Program: SAPLQPS1
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function QPS1_CODEGROUP_VALID_READ 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 'QPS1_CODEGROUP_VALID_READ'"Reading a code group at the key date and the respective codes.
EXPORTING
CODEGRUPPE = "code group to be read
* GUELTIGAB = SY-DATUM "Key date
* I_NICHTFREI = ' ' "Ind:
KATALOGART = "catalog type to be read
* KZ_AUFLOESUNG = ' ' "ID: code group should be deleted
* KZ_INAKTIV = ' ' "Ind.: also consider inactive entries
* SPRACHE = SY-LANGU "Language selection
TABLES
SELEKTIERTE_ZEILEN = "Table contains the required entries
EXCEPTIONS
NO_FREE = 1 NO_GROUP = 2 NO_VALID = 3
IMPORTING Parameters details for QPS1_CODEGROUP_VALID_READ
CODEGRUPPE - code group to be read
Data type: QPGR-CODEGRUPPEOptional: No
Call by Reference: No ( called with pass by value option)
GUELTIGAB - Key date
Data type: QPCD-GUELTIGABDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_NICHTFREI - Ind:
Data type: RMQSE-AUFLOESUNGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
KATALOGART - catalog type to be read
Data type: QPGR-KATALOGARTOptional: No
Call by Reference: No ( called with pass by value option)
KZ_AUFLOESUNG - ID: code group should be deleted
Data type: RMQSE-AUFLOESUNGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
KZ_INAKTIV - Ind.: also consider inactive entries
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SPRACHE - Language selection
Data type: QPGT-SPRACHEDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for QPS1_CODEGROUP_VALID_READ
SELEKTIERTE_ZEILEN - Table contains the required entries
Data type: QKATOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_FREE - Code group not released
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_GROUP - required code group is not created
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID - there is no valid code group version
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for QPS1_CODEGROUP_VALID_READ 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_no_free | TYPE STRING, " | |||
| lv_codegruppe | TYPE QPGR-CODEGRUPPE, " | |||
| lt_selektierte_zeilen | TYPE STANDARD TABLE OF QKAT, " | |||
| lv_no_group | TYPE QKAT, " | |||
| lv_gueltigab | TYPE QPCD-GUELTIGAB, " SY-DATUM | |||
| lv_no_valid | TYPE QPCD, " | |||
| lv_i_nichtfrei | TYPE RMQSE-AUFLOESUNG, " ' ' | |||
| lv_katalogart | TYPE QPGR-KATALOGART, " | |||
| lv_kz_aufloesung | TYPE RMQSE-AUFLOESUNG, " ' ' | |||
| lv_kz_inaktiv | TYPE RMQSE, " ' ' | |||
| lv_sprache | TYPE QPGT-SPRACHE. " SY-LANGU |
|   CALL FUNCTION 'QPS1_CODEGROUP_VALID_READ' "Reading a code group at the key date and the respective codes |
| EXPORTING | ||
| CODEGRUPPE | = lv_codegruppe | |
| GUELTIGAB | = lv_gueltigab | |
| I_NICHTFREI | = lv_i_nichtfrei | |
| KATALOGART | = lv_katalogart | |
| KZ_AUFLOESUNG | = lv_kz_aufloesung | |
| KZ_INAKTIV | = lv_kz_inaktiv | |
| SPRACHE | = lv_sprache | |
| TABLES | ||
| SELEKTIERTE_ZEILEN | = lt_selektierte_zeilen | |
| EXCEPTIONS | ||
| NO_FREE = 1 | ||
| NO_GROUP = 2 | ||
| NO_VALID = 3 | ||
| . " QPS1_CODEGROUP_VALID_READ | ||
ABAP code using 7.40 inline data declarations to call FM QPS1_CODEGROUP_VALID_READ
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 CODEGRUPPE FROM QPGR INTO @DATA(ld_codegruppe). | ||||
| "SELECT single GUELTIGAB FROM QPCD INTO @DATA(ld_gueltigab). | ||||
| DATA(ld_gueltigab) | = SY-DATUM. | |||
| "SELECT single AUFLOESUNG FROM RMQSE INTO @DATA(ld_i_nichtfrei). | ||||
| DATA(ld_i_nichtfrei) | = ' '. | |||
| "SELECT single KATALOGART FROM QPGR INTO @DATA(ld_katalogart). | ||||
| "SELECT single AUFLOESUNG FROM RMQSE INTO @DATA(ld_kz_aufloesung). | ||||
| DATA(ld_kz_aufloesung) | = ' '. | |||
| DATA(ld_kz_inaktiv) | = ' '. | |||
| "SELECT single SPRACHE FROM QPGT INTO @DATA(ld_sprache). | ||||
| DATA(ld_sprache) | = SY-LANGU. | |||
Search for further information about these or an SAP related objects