Customer Complaint Quality Notification Creation Interface from File or Portal
Short answer: A custom interface program that reads customer complaints exported by a web portal, CRM or call centre from a file and creates a customer complaint quality notification for each row, with delivery, material, batch and defect code. It prevents the same complaint from being created twice through the external reference and lists the result per row.
- Estimated effort
- M · 4–6 working days
- System
- ECC and S/4HANA
- Tables
- 5
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
QM01 creates notifications one by one and manually; if complaints are collected in another system, each one is typed again and delivery and batch data are often missing. The standard offers no ready file interface for customer complaints. The custom interface validates the complaints in the file, completes missing material and batch from the delivery item and opens the notifications through the standard BAPI.
Who uses it? Customer complaint teams, quality assurance, customer service and integration teams.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| QMELNotification Header | Notification headers created; duplicate check by external reference | Read / write | ECC + S/4 |
| QMFENotification Items | Notification defect item and defect code | Write | ECC + S/4 |
| KNA1Customer Master (General Section) | Customer check | Read | ECC + S/4 |
| LIKPDelivery Header | Check that the delivery belongs to the customer | Read | ECC + S/4 |
| LIPSDelivery Item Data | Material, batch and delivered quantity from the delivery item | Read | ECC + S/4 |
BAPIs and functions used
- BAPI_QUALNOT_CREATECreate QM Notification. Creates the customer complaint notification for each row
- BAPI_QUALNOT_SAVESave QM Notification. Saves the notification created
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Makes the save permanent
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_FILE | File or application server folder | Single value | — | Yes | /interface/sikayet/gelen/ |
| P_QMART | Notification type | Single value | QMEL-QMART | Yes | Q1 |
| P_MOVE | Move processed file to the archive folder | Checkbox | — | No | X |
| P_TEST | Test mode (check without creating notifications) | Checkbox | — | No | — |
Input file columns
The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.
| # | Column | Target field | Required |
|---|---|---|---|
| 1 | External reference | QMEL-REFNUM | Yes |
| 2 | Customer | QMEL-KUNUM | Yes |
| 3 | Delivery | QMEL-LS_VBELN | No |
| 4 | Delivery item | QMEL-LS_POSNR | No |
| 5 | Material (blank = from delivery) | QMEL-MATNR | No |
| 6 | Batch (blank = from delivery) | QMEL-CHARG | No |
| 7 | Complaint quantity | QMEL-RKMNG | Yes |
| 8 | Unit | QMEL-MGEIN | No |
| 9 | Short text | QMEL-QMTXT | Yes |
| 10 | Defect code group | QMFE-FEGRP | No |
| 11 | Defect code | QMFE-FECOD | No |
| 12 | Priority | QMEL-PRIOK | No |
Sample upload file
| 1 | External reference * | Customer * | Delivery | Delivery item | Material (blank = from delivery) | Batch (blank = from delivery) | Complaint quantity * | Unit | Short text * | Defect code group | Defect code | Priority |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | WEB-2026-0412 | 200100 | 80004620 | 000010 | FG-1001 | B2026-088 | 36 | CS | Jar lids rusty | DEF-AMB | 040 | 2 |
| 3 | WEB-2026-0413 | 200245 | 80004633 | 000020 | 12 | CS | Label date unreadable | DEF-ETK | 030 | 3 | ||
| 4 | WEB-2026-0414 | 200999 | FG-2050 | 5 | PC | Bucket handle broken | DEF-KIR | 010 | 2 |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Row | Calculated Row number in the file |
| 2 | External reference | QMEL-REFNUM |
| 3 | Notification | QMEL-QMNUM |
| 4 | Status | Calculated Created, duplicate (skipped), test OK or error |
| 5 | Message | Calculated Check message or the first message from the BAPI return table |
Sample result list
| Row | External reference | Notification | Status | Message |
|---|---|---|---|---|
| 2 | WEB-2026-0412 | 200000512 | Created | Notification 200000512 created |
| 3 | WEB-2026-0413 | 200000513 | Created | Material and batch completed from the delivery item |
| 4 | WEB-2026-0414 | Error | Customer 200999 not found |
How does the program work?
- The file (CSV or XLSX) is read from the user’s PC or, in a background job, from a folder on the application server. If a notification with the same external reference (QMEL-REFNUM) already exists, the row is skipped.
- Checks: the customer exists in KNA1; if a delivery is given, it belongs to the customer in LIKP; if a delivery item is given, material and batch are completed from LIPS and the complaint quantity may not exceed the delivered quantity (LIPS-LFIMG); the defect code group and code must exist in the catalog.
- BAPI_QUALNOT_CREATE is called with the selected notification type: customer, material, batch, complaint quantity and unit, delivery reference, priority and short text in the header; defect code group and code in the item; a description, if any, goes to the long text.
- The notification is saved with BAPI_QUALNOT_SAVE and BAPI_TRANSACTION_COMMIT. In test mode only the checks run and no notification is created.
- Result and message are listed per row; failed rows are written to a separate file and the processed file is moved to an archive folder.
Performance notes
Because complaint files are small, the program can run as an hourly background job. Check the external references for all rows in the file with a single SELECT.
Features
- Runs as a background job An hourly job processes portal or CRM exports as they arrive in the application server folder.
- Test mode (check without posting)
- Line-by-line result and error log
- Download failed lines as a separate file
- ALV list (sort, filter, subtotals)
Authorization objects
- Q_QMELAuthorization to create quality notifications by notification type
- Q_TCODEQM transaction authorization (QM01)
Frequently asked questions
What happens if the same complaint is sent twice?
The program checks the external reference (QMEL-REFNUM). If a notification with this reference exists, the row is skipped as a "duplicate" and the existing notification number is shown in the message.
Can a direct portal connection be used instead of a file?
Yes. The same check and creation logic can be published as an OData service or an RFC, so the portal writes the complaint to SAP immediately and gets the notification number back. The effort range grows with the service design.
Does the program work on S/4HANA?
Yes. BAPI_QUALNOT_CREATE, BAPI_QUALNOT_SAVE, QMEL and QMFE are also used in S/4HANA; the file template stays the same.
Packages that include this solution
Customer Complaint and Root Cause Pack
A five-component pack that follows a customer complaint from intake to improvement: automatic complaint notifications from a portal or call centre …
Related reports
Customer Complaints Traced to Delivery, Batch and Inspection Lot Report
A custom ALV report that shows customer complaint notifications on the same line as the delivery, the batch, the inspection lot of that batch, its …
Quality Notification Defect and Root Cause Pareto Analysis Report
A custom ALV report that counts defect codes and root cause codes in the quality notifications of the selected period and ranks them from the most …
Overdue Quality Notifications and Open Tasks Report
A custom ALV report that lists open quality notifications with the days past the required end date, the number of open and overdue tasks, and the next …
Let us build this program for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.