QM Program Custom development Interface

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

  • QM01 Create Quality Notification. Creates quality notifications manually one at a time; does not read file or portal data.
  • QM02 Change Quality Notification. Changes an existing notification; does not create notifications in bulk.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
QMELNotification HeaderNotification headers created; duplicate check by external referenceRead / writeECC + S/4
QMFENotification ItemsNotification defect item and defect codeWriteECC + S/4
KNA1Customer Master (General Section)Customer checkReadECC + S/4
LIKPDelivery HeaderCheck that the delivery belongs to the customerReadECC + S/4
LIPSDelivery Item DataMaterial, batch and delivered quantity from the delivery itemReadECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEFile or application server folderSingle value—Yes/interface/sikayet/gelen/
P_QMARTNotification typeSingle valueQMEL-QMARTYesQ1
P_MOVEMove processed file to the archive folderCheckbox—NoX
P_TESTTest 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.

#ColumnTarget fieldRequired
1External referenceQMEL-REFNUMYes
2CustomerQMEL-KUNUMYes
3DeliveryQMEL-LS_VBELNNo
4Delivery itemQMEL-LS_POSNRNo
5Material (blank = from delivery)QMEL-MATNRNo
6Batch (blank = from delivery)QMEL-CHARGNo
7Complaint quantityQMEL-RKMNGYes
8UnitQMEL-MGEINNo
9Short textQMEL-QMTXTYes
10Defect code groupQMFE-FEGRPNo
11Defect codeQMFE-FECODNo
12PriorityQMEL-PRIOKNo

Sample upload file

1External reference *Customer *DeliveryDelivery itemMaterial (blank = from delivery)Batch (blank = from delivery)Complaint quantity *UnitShort text *Defect code groupDefect codePriority
2WEB-2026-041220010080004620000010FG-1001B2026-08836CSJar lids rustyDEF-AMB0402
3WEB-2026-04132002458000463300002012CSLabel date unreadableDEF-ETK0303
4WEB-2026-0414200999FG-20505PCBucket handle brokenDEF-KIR0102
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowCalculated Row number in the file
2External referenceQMEL-REFNUM
3NotificationQMEL-QMNUM
4StatusCalculated Created, duplicate (skipped), test OK or error
5MessageCalculated Check message or the first message from the BAPI return table

Sample result list

RowExternal referenceNotificationStatusMessage
2WEB-2026-0412200000512CreatedNotification 200000512 created
3WEB-2026-0413200000513CreatedMaterial and batch completed from the delivery item
4WEB-2026-0414ErrorCustomer 200999 not found
A view built with fictional sample data; not real system data.

How does the program work?

  1. 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.
  2. 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.
  3. 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.
  4. The notification is saved with BAPI_QUALNOT_SAVE and BAPI_TRANSACTION_COMMIT. In test mode only the checks run and no notification is created.
  5. 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

QM Package Custom

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 …

5 components · v1.0

Related reports

QM Report Custom ALV report

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 …

QMEL · JEST · TJ02T · QMSM

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.

Related report: Customer Complaint Quality Notification Creation Interface from File or Portal