QM Program Custom development Background program

Automatic Vendor Quality Notification Creation for Rejected Characteristics

Short answer: A custom background job that automatically opens a quality notification against the vendor for goods receipt lots with a rejected characteristic. The notification is created with the material, batch, purchase order and measured values; every rejected characteristic becomes a separate defect item.

Estimated effort
M · 4–6 working days
System
ECC and S/4HANA
Tables
6
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

QM01 opens a notification manually. If defects are recorded during results recording, a notification can be created through the inspection type setting, but that expects the user to enter the defect separately; when results come from a laboratory interface or a mass upload, no notification is opened at all. An automatic job is needed so that every rejected result turns into a notification against the vendor and shows up on the vendor scorecard.

Who uses it? Supplier quality engineers, incoming inspection laboratories, quality managers and purchasing teams.

Closest standard alternatives

  • QM01 Create Quality Notification. Opens a quality notification manually.
  • QE51N Results Recording Worklist. A notification can be created when defects are entered during results recording; no notification for results that come from an interface.

Tables used

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

TableRoleAccessSystem
QALSInspection Lot RecordGoods receipt inspection lot, vendor, batch and purchase orderReadECC + S/4
QAMRCharacteristic Results During Inspection ProcessingRejected characteristic resultsReadECC + S/4
QAMVCharacteristic Specifications for Inspection ProcessingCharacteristic description, target and limitsReadECC + S/4
LFA1Vendor Master (General Section)Vendor nameReadECC + S/4
QMELNotification HeaderExisting notification check and the quality notification createdRead / writeECC + S/4
QMFENotification ItemsDefect item for every rejected characteristicWriteECC + S/4

BAPIs and functions used

  • BAPI_QUALNOT_CREATECreate QM Notification. Creates the quality notification with header and defect items
  • BAPI_QUALNOT_SAVESave QM Notification. Saves the notification created
  • BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Makes the save permanent

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_WERKPlantRange / multipleQALS-WERKYes1000
S_ARTInspection typeRange / multipleQALS-ARTNo01
S_DATEResult date rangeRange / multipleQAMR-PRUEFDATUVYesSon 3 gün
S_LIFNRVendorRange / multipleQALS-LIFNRNo100245
P_QMARTNotification typeSingle valueQMEL-QMARTYesQ2
P_FEGRPDefault defect code groupSingle valueQMFE-FEGRPNoGIRIS
P_FECODDefault defect codeSingle valueQMFE-FECODNo0010
P_TESTTest mode (list without creating notifications)Checkbox—NoX

Result list columns

#ColumnSource
1Inspection lotQALS-PRUEFLOS
2VendorQALS-LIFNR
3Vendor nameLFA1-NAME1
4MaterialQALS-MATNR
5Rejected characteristicQAMV-VERWMERKM
6Measured meanQAMR-MITTELWERT
7NotificationQMEL-QMNUM
8StatusCalculated Created, test, skipped (notification exists) or error
9MessageCalculated First error or success message from the BAPI return table

Sample result list

Inspection lotVendorVendor nameMaterialRejected characteristicMeasured meanNotificationStatusMessage
010000018840100245Bursa Metal SanayiRM-2051KALINLIK3.18200001452CreatedNotification 200001452 saved, 1 defect item
010000018902100388Konya Kalıp ve PlastikRM-3602CAP-DIS40.36200001453CreatedNotification 200001453 saved, 2 defect items
010000018911100412Trakya AmbalajRM-1205NEM11.80200001440SkippedA notification already exists for the lot
010000018915100310Kuzey Ahşap ÜrünleriRM-4410KALINLIK17.20ErrorDefect code GIRIS/0010 not in catalog
A view built with fictional sample data; not real system data.

How does the program work?

  1. Goods receipt lots (QALS) in the selected plant and inspection types whose result date is in the parameter range and that have at least one rejected characteristic (QAMR-MBEWERTG = R) are read.
  2. Lots that already have a notification (QMEL-PRUEFLOS) are skipped, so a second notification is never opened for the same lot when the job runs again.
  3. The notification header is prepared: notification type (parameter, e.g. Q2), material, vendor, plant, batch, inspection lot, purchase order and item; the short text is built from the description of the first rejected characteristic.
  4. A defect item is added for every rejected characteristic: the defect code group and code come from the parameter or from a characteristic-to-code mapping table; target, limits and measured mean are written to the long text.
  5. The notification is created with BAPI_QUALNOT_CREATE and saved with BAPI_QUALNOT_SAVE and BAPI_TRANSACTION_COMMIT. In test mode only the notifications to be opened are listed. Results and messages are written to the job log.

Performance notes

Schedule the job hourly or daily and limit the result date range to the last few days. A commit is done per notification; a lot that fails is retried in the next run.

Features

  • Runs as a background job
  • Test mode (check without posting)
  • Line-by-line result and error log
  • Send the result by email The list of notifications created can be sent to the supplier quality engineer.
  • ALV list (sort, filter, subtotals)

Authorization objects

  • Q_QMELQuality notification creation authorization by notification type
  • Q_INSPTYPEInspection lot authorization by inspection type

Frequently asked questions

How many notifications are opened when several characteristics of a lot are rejected?

One notification is opened per lot and every rejected characteristic becomes a separate defect item on it. Separate notifications per characteristic are also possible if preferred.

Is the notification sent to the vendor automatically?

The program opens the notification; sending it to the vendor is done with the standard notification output or email setup. A step that emails a summary to the vendor when the notification is saved can be added if needed.

Can it be used on S/4HANA?

Yes. BAPI_QUALNOT_CREATE and BAPI_QUALNOT_SAVE are supported on S/4HANA as well; the QM tables read are the same.

Packages that include this solution

QM Package Custom

Supplier Quality Management Pack

A four-component pack that follows supplier quality from approval to evaluation: quality info record release and certificate validity, lots skipped by …

4 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: Automatic Vendor Quality Notification Creation for Rejected Characteristics