SAP EXIT_SAPLQLIB_004 Function Module for Customer Exit: Calculation of Complaint Score
EXIT_SAPLQLIB_004 is a standard exit saplqlib 004 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Customer Exit: Calculation of Complaint Score 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 exit saplqlib 004 FM, simply by entering the name EXIT_SAPLQLIB_004 into the relevant SAP transaction such as SE37 or SE38.
Function Group: XQLI
Program Name: SAPLXQLI
Main Program:
Appliation area: Q
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EXIT_SAPLQLIB_004 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 'EXIT_SAPLQLIB_004'"Customer Exit: Calculation of Complaint Score.
EXPORTING
I_DATUV = "Creation Date of the Quality Notification for Selection
I_EKORG = "Purchasing Organization for Vendor Evaluation
I_LIFNR = "Vendor for Vendor Evaluation
I_QMUAT = "Share of Sales Volume for Q-Score Calculation
I_HWAERS = "Currency Key for Calculation of Nonconformity Costs
I_QMFEHLAW = "Total Nonconformity Cost Calculation
I_UMSATZ_GESAMT = "Calculated Sales of Vendor/Purchasing Organization
I_QKZ = "Q-Score Calculated in the Standard System
IMPORTING
E_QKZ = "Q-Score Calculated in the Customer Exit
TABLES
T_QSS_QM_ML = "Table of Q-Scores for Each Material
T_QMART = "Nonconformity Costs per Notification Type
Related Function Modules
Below is a list of related SAP function modules this CUSTOMER FUNCTION exit / user exit is relevant for.QLIB_AU_LOT_KQD
QLIB_GR_LOT_KQD
QLIB_GR_QMEL_KQD
QLIB_LOT_LIST
QLIB_LOT_SELECT Inspection lot selection (QM internal) for vendor evaluation
QLIB_QMEL_SELECT Selection of q-notifications (internal to QM) for vendor evaluation
QLIB_QMIS_LOT_INTERFACE
QLIB_SUPPL_VAL_QM Connection inspection lot vendor evaluation
IMPORTING Parameters details for EXIT_SAPLQLIB_004
I_DATUV - Creation Date of the Quality Notification for Selection
Data type: QMEL-QMDATOptional: No
Call by Reference: No ( called with pass by value option)
I_EKORG - Purchasing Organization for Vendor Evaluation
Data type: QMEL-EKORGOptional: No
Call by Reference: No ( called with pass by value option)
I_LIFNR - Vendor for Vendor Evaluation
Data type: QMEL-LIFNUMOptional: No
Call by Reference: No ( called with pass by value option)
I_QMUAT - Share of Sales Volume for Q-Score Calculation
Data type: T147-QMUATOptional: No
Call by Reference: No ( called with pass by value option)
I_HWAERS - Currency Key for Calculation of Nonconformity Costs
Data type: SY-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
I_QMFEHLAW - Total Nonconformity Cost Calculation
Data type: QSS_QMART-FEHLAWOptional: No
Call by Reference: No ( called with pass by value option)
I_UMSATZ_GESAMT - Calculated Sales of Vendor/Purchasing Organization
Data type: S012-REWRTOptional: No
Call by Reference: No ( called with pass by value option)
I_QKZ - Q-Score Calculated in the Standard System
Data type: TQSS-KENNZAHLUNOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EXIT_SAPLQLIB_004
E_QKZ - Q-Score Calculated in the Customer Exit
Data type: TQSS-KENNZAHLUNOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for EXIT_SAPLQLIB_004
T_QSS_QM_ML - Table of Q-Scores for Each Material
Data type: QSS_QM_MLOptional: No
Call by Reference: No ( called with pass by value option)
T_QMART - Nonconformity Costs per Notification Type
Data type: QSS_QMARTOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EXIT_SAPLQLIB_004 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_e_qkz | TYPE TQSS-KENNZAHLUN, " | |||
| lv_i_datuv | TYPE QMEL-QMDAT, " | |||
| lt_t_qss_qm_ml | TYPE STANDARD TABLE OF QSS_QM_ML, " | |||
| lv_i_ekorg | TYPE QMEL-EKORG, " | |||
| lt_t_qmart | TYPE STANDARD TABLE OF QSS_QMART, " | |||
| lv_i_lifnr | TYPE QMEL-LIFNUM, " | |||
| lv_i_qmuat | TYPE T147-QMUAT, " | |||
| lv_i_hwaers | TYPE SY-WAERS, " | |||
| lv_i_qmfehlaw | TYPE QSS_QMART-FEHLAW, " | |||
| lv_i_umsatz_gesamt | TYPE S012-REWRT, " | |||
| lv_i_qkz | TYPE TQSS-KENNZAHLUN. " |
|   CALL FUNCTION 'EXIT_SAPLQLIB_004' "Customer Exit: Calculation of Complaint Score |
| EXPORTING | ||
| I_DATUV | = lv_i_datuv | |
| I_EKORG | = lv_i_ekorg | |
| I_LIFNR | = lv_i_lifnr | |
| I_QMUAT | = lv_i_qmuat | |
| I_HWAERS | = lv_i_hwaers | |
| I_QMFEHLAW | = lv_i_qmfehlaw | |
| I_UMSATZ_GESAMT | = lv_i_umsatz_gesamt | |
| I_QKZ | = lv_i_qkz | |
| IMPORTING | ||
| E_QKZ | = lv_e_qkz | |
| TABLES | ||
| T_QSS_QM_ML | = lt_t_qss_qm_ml | |
| T_QMART | = lt_t_qmart | |
| . " EXIT_SAPLQLIB_004 | ||
ABAP code using 7.40 inline data declarations to call FM EXIT_SAPLQLIB_004
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 KENNZAHLUN FROM TQSS INTO @DATA(ld_e_qkz). | ||||
| "SELECT single QMDAT FROM QMEL INTO @DATA(ld_i_datuv). | ||||
| "SELECT single EKORG FROM QMEL INTO @DATA(ld_i_ekorg). | ||||
| "SELECT single LIFNUM FROM QMEL INTO @DATA(ld_i_lifnr). | ||||
| "SELECT single QMUAT FROM T147 INTO @DATA(ld_i_qmuat). | ||||
| "SELECT single WAERS FROM SY INTO @DATA(ld_i_hwaers). | ||||
| "SELECT single FEHLAW FROM QSS_QMART INTO @DATA(ld_i_qmfehlaw). | ||||
| "SELECT single REWRT FROM S012 INTO @DATA(ld_i_umsatz_gesamt). | ||||
| "SELECT single KENNZAHLUN FROM TQSS INTO @DATA(ld_i_qkz). | ||||
Search for further information about these or an SAP related objects