SAP QLIB_LOT_SELECT Function Module for Inspection lot selection (QM internal) for vendor evaluation
QLIB_LOT_SELECT is a standard qlib lot select SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Inspection lot selection (QM internal) for vendor evaluation 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 qlib lot select FM, simply by entering the name QLIB_LOT_SELECT into the relevant SAP transaction such as SE37 or SE38.
Function Group: QLIB
Program Name: SAPLQLIB
Main Program:
Appliation area: Q
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function QLIB_LOT_SELECT 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 'QLIB_LOT_SELECT'"Inspection lot selection (QM internal) for vendor evaluation.
EXPORTING
I_DATUV = "Lot creation date
I_EKORG = "Purchasing organization for vendor evaluation
I_LIFNR = "Vendor for vendor evaluation
I_HERKUNFT = "Origin of the lots
TABLES
T_QSS_ML = "Table of Q-scores for each material
EXCEPTIONS
NO_LOT_FOUND = 1
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLQLIB_001 Customer Function for Selecting Lots for Vendor Evaluation
EXIT_SAPLQLIB_002 Customer Function for Calculating Q-Scores
EXIT_SAPLQLIB_003 Customer Exit: Notification Selection for Vendor Evaluation
EXIT_SAPLQLIB_004 Customer Exit: Calculation of Complaint Score
IMPORTING Parameters details for QLIB_LOT_SELECT
I_DATUV - Lot creation date
Data type: QALS-ENSTEHDATOptional: No
Call by Reference: No ( called with pass by value option)
I_EKORG - Purchasing organization for vendor evaluation
Data type: QALS-EKORGOptional: No
Call by Reference: No ( called with pass by value option)
I_LIFNR - Vendor for vendor evaluation
Data type: QALS-LIFNROptional: No
Call by Reference: No ( called with pass by value option)
I_HERKUNFT - Origin of the lots
Data type: QALS-HERKUNFTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for QLIB_LOT_SELECT
T_QSS_ML - Table of Q-scores for each material
Data type: QSS_MLOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_LOT_FOUND - No inspection lot exists for entry
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for QLIB_LOT_SELECT 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_datuv | TYPE QALS-ENSTEHDAT, " | |||
| lt_t_qss_ml | TYPE STANDARD TABLE OF QSS_ML, " | |||
| lv_no_lot_found | TYPE QSS_ML, " | |||
| lv_i_ekorg | TYPE QALS-EKORG, " | |||
| lv_i_lifnr | TYPE QALS-LIFNR, " | |||
| lv_i_herkunft | TYPE QALS-HERKUNFT. " |
|   CALL FUNCTION 'QLIB_LOT_SELECT' "Inspection lot selection (QM internal) for vendor evaluation |
| EXPORTING | ||
| I_DATUV | = lv_i_datuv | |
| I_EKORG | = lv_i_ekorg | |
| I_LIFNR | = lv_i_lifnr | |
| I_HERKUNFT | = lv_i_herkunft | |
| TABLES | ||
| T_QSS_ML | = lt_t_qss_ml | |
| EXCEPTIONS | ||
| NO_LOT_FOUND = 1 | ||
| . " QLIB_LOT_SELECT | ||
ABAP code using 7.40 inline data declarations to call FM QLIB_LOT_SELECT
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 ENSTEHDAT FROM QALS INTO @DATA(ld_i_datuv). | ||||
| "SELECT single EKORG FROM QALS INTO @DATA(ld_i_ekorg). | ||||
| "SELECT single LIFNR FROM QALS INTO @DATA(ld_i_lifnr). | ||||
| "SELECT single HERKUNFT FROM QALS INTO @DATA(ld_i_herkunft). | ||||
Search for further information about these or an SAP related objects