{"audience":"Supplier quality engineers, incoming inspection laboratories, quality managers and purchasing teams.","authorization_objects":[{"note":"Quality notification creation authorization by notification type","object":"Q_QMEL"},{"note":"Inspection lot authorization by inspection type","object":"Q_INSPTYPE"}],"components":[],"countries":[],"effort_days_max":6,"effort_days_min":4,"effort_size":"M","faq":[{"a":"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.","q":"How many notifications are opened when several characteristics of a lot are rejected?"},{"a":"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.","q":"Is the notification sent to the vendor automatically?"},{"a":"Yes. BAPI_QUALNOT_CREATE and BAPI_QUALNOT_SAVE are supported on S/4HANA as well; the QM tables read are the same.","q":"Can it be used on S/4HANA?"}],"features":[{"code":"background","label":"Runs as a background job","note":""},{"code":"test_run","label":"Test mode (check without posting)","note":""},{"code":"log","label":"Line-by-line result and error log","note":""},{"code":"email","label":"Send the result by email","note":"The list of notifications created can be sent to the supplier quality engineer."},{"code":"alv","label":"ALV list (sort, filter, subtotals)","note":""}],"functions":[{"name":"BAPI_QUALNOT_CREATE","role":"Creates the quality notification with header and defect items"},{"name":"BAPI_QUALNOT_SAVE","role":"Saves the notification created"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Makes the save permanent"}],"gap":"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.","id":"qm-auto-notification-rejected-characteristics","industries":[],"input_columns":[],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"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.\n2. 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.\n3. 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.\n4. 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.\n5. 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.","module":"QM","object_type":"batch_job","output_columns":[{"calculated":false,"formula":"","label":"Inspection lot","source_field":"PRUEFLOS","source_table":"QALS"},{"calculated":false,"formula":"","label":"Vendor","source_field":"LIFNR","source_table":"QALS"},{"calculated":false,"formula":"","label":"Vendor name","source_field":"NAME1","source_table":"LFA1"},{"calculated":false,"formula":"","label":"Material","source_field":"MATNR","source_table":"QALS"},{"calculated":false,"formula":"","label":"Rejected characteristic","source_field":"VERWMERKM","source_table":"QAMV"},{"calculated":false,"formula":"","label":"Measured mean","source_field":"MITTELWERT","source_table":"QAMR"},{"calculated":false,"formula":"","label":"Notification","source_field":"QMNUM","source_table":"QMEL"},{"calculated":true,"formula":"Created, test, skipped (notification exists) or error","label":"Status","source_field":null,"source_table":null},{"calculated":true,"formula":"First error or success message from the BAPI return table","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"1000","kind":"select_option","label":"Plant","name":"S_WERK","ref_field":"QALS-WERK","required":true},{"example":"01","kind":"select_option","label":"Inspection type","name":"S_ART","ref_field":"QALS-ART","required":false},{"example":"Son 3 gün","kind":"select_option","label":"Result date range","name":"S_DATE","ref_field":"QAMR-PRUEFDATUV","required":true},{"example":"100245","kind":"select_option","label":"Vendor","name":"S_LIFNR","ref_field":"QALS-LIFNR","required":false},{"example":"Q2","kind":"parameter","label":"Notification type","name":"P_QMART","ref_field":"QMEL-QMART","required":true},{"example":"GIRIS","kind":"parameter","label":"Default defect code group","name":"P_FEGRP","ref_field":"QMFE-FEGRP","required":false},{"example":"0010","kind":"parameter","label":"Default defect code","name":"P_FECOD","ref_field":"QMFE-FECOD","required":false},{"example":"X","kind":"checkbox","label":"Test mode (list without creating notifications)","name":"P_TEST","ref_field":"","required":false}],"part_of":["qm-supplier-quality-pack"],"performance":"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.","process":"P2P","quote_url":"https://nekuhub.com/en/request-a-quote/?report=qm-auto-notification-rejected-characteristics","related":["qm-overdue-quality-notifications","qm-vendor-quality-scorecard"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Opens a quality notification manually.","tcode":"QM01"},{"note":"A notification can be created when defects are entered during results recording; no notification for results that come from an interface.","tcode":"QE51N"}],"summary":"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.","tables":[{"access":"read","join_on":"","role":"Goods receipt inspection lot, vendor, batch and purchase order","table":"QALS","variant":"both"},{"access":"read","join_on":"QAMR-PRUEFLOS = QALS-PRUEFLOS","role":"Rejected characteristic results","table":"QAMR","variant":"both"},{"access":"read","join_on":"QAMV-PRUEFLOS = QAMR-PRUEFLOS AND QAMV-VORGLFNR = QAMR-VORGLFNR AND QAMV-MERKNR = QAMR-MERKNR","role":"Characteristic description, target and limits","table":"QAMV","variant":"both"},{"access":"read","join_on":"LFA1-LIFNR = QALS-LIFNR","role":"Vendor name","table":"LFA1","variant":"both"},{"access":"read_write","join_on":"QMEL-PRUEFLOS = QALS-PRUEFLOS","role":"Existing notification check and the quality notification created","table":"QMEL","variant":"both"},{"access":"write","join_on":"","role":"Defect item for every rejected characteristic","table":"QMFE","variant":"both"}],"title":"Automatic Vendor Quality Notification Creation for Rejected Characteristics","url":"https://nekuhub.com/en/programs/automatic-vendor-quality-notification-for-rejected-characteristics/","vendor_id":"nekudos"}