BAPI_QUALNOT_CREATE — Create a Quality Notification via BAPI
BAPI_QUALNOT_CREATE creates a quality notification (Q1, Q2, Q3 or a custom notification type), mirroring transaction QM01. It builds the header, item, cause, task and activity data in one call and returns the new notification number in the export header structure, but only after the caller checks RETURN for errors and issues an explicit commit.
This page covers BAPI_QUALNOT_CREATE, the BAPI used to create quality notifications outside the QM01 screen, typically from inbound interfaces, custom Fiori apps or integration with external quality systems. It focuses on the parameter structure, the commit step that callers routinely forget, and the RETURN table handling mistakes that cause silent partial creation.
Published 16 Sept 2026· 1,100 words
What it does
BAPI_QUALNOT_CREATE creates a quality notification, the same object edited on screen through QM01, QM02 and QM03. It supports the standard notification types delivered with QM (customer complaint, complaint against vendor, internal problem report) and any custom type configured on top of them. In one call it can populate the notification header, item lines describing defects, cause records, tasks and activities, and partner assignments. It is the standard entry point for integrations that raise a quality notification automatically, for example from a returns process, a batch rejection in an external warehouse system, or an inbound complaint recorded in a CRM or portal application. It does not process the notification further; follow-up steps such as adding tasks after creation, changing status, or closing the notification are separate BAPIs.
Important parameters
- NOTIF_TYPE - the notification type key (Q1, Q2, Q3 or a custom type) that drives which screen structure, catalog profile and partner determination procedure apply.
- NOTIFHEADER - the header data to create: short text, plant, coding, priority, reference to material, vendor or customer depending on notification type.
- NOTIFHEADER_EXPORT - returned structure containing the generated notification number once the call succeeds; empty or meaningless if RETURN carries an error.
- NOTITEM - table of item lines, each describing a defect with object part, damage code and code group from the assigned catalog profile.
- NOTIFCAUS - table of cause records linked to items, again drawing codes from the configured catalog.
- NOTIFACTV - table of activities recorded against the notification.
- NOTIFTASK - table of tasks to be created alongside the notification.
- PARTNER - table of partner assignments (sold-to, ship-to, vendor, person responsible) that must satisfy the partner determination procedure for the notification type.
- LONGTEXT - long text content for the notification, handled separately from the header fields.
- RETURN - table of BAPIRET2 lines carrying every message the call produced, including field-level catalog and partner errors.
Commit behaviour
BAPI_QUALNOT_CREATE does not commit the database update itself. The notification number returned in NOTIFHEADER_EXPORT is generated during the call, but the record is only persisted after the caller invokes BAPI_TRANSACTION_COMMIT (or the equivalent commit step in the calling framework). If the caller forgets, the number appears valid in the response and downstream logic proceeds as if the notification exists, but the update task rolls back at the end of the session or program and the notification is never written to the database. This produces a particularly confusing defect pattern: the interface log shows a successful call with a plausible number, but QM03 reports the notification does not exist. It is one of the first things to verify when a receiving system swears it got a number back that SAP cannot find.
Return handling
RETURN is a table, not a single message, and every line must be inspected, not just the first one. A common interface bug checks only whether RETURN is initial, or checks the TYPE of the first line, and treats anything else as success. Header creation can succeed while individual item, cause or partner lines fail validation, leaving a notification with a valid number but missing the defect data the business process actually needed. The correct pattern loops over RETURN and treats any line with TYPE 'E' or 'A' as a hard failure requiring rollback of any local commit already issued, and logs 'W' lines even when the overall call is treated as successful, since warnings often flag a catalog code that was silently defaulted or a partner that was dropped because the determination procedure did not expect that partner function. Interfaces that swallow RETURN entirely and rely on NOTIFHEADER_EXPORT being non-blank are the most frequent source of notifications with a number but no usable content.
ECC vs S/4HANA
BAPI_QUALNOT_CREATE remains a supported and commonly used interface for quality notification creation on S/4HANA. There is no single released OData or API Business Hub service that has fully replaced generic notification creation across all notification types; where a specific Fiori app exists for a narrow scenario it may expose its own service, but custom and legacy integrations continue to call this BAPI directly. It is reasonable to keep using it for new integration work unless a specific released API has been confirmed for the exact notification type and scenario in question.
Common pitfalls
- Catalog profile not maintained for the plant and notification type combination: item, cause or activity codes are rejected with an error line in RETURN while the header still creates, producing a notification with no defect detail.
- Partner determination procedure does not include the partner function the interface is sending: the partner line is rejected but the header succeeds, so the notification exists without the customer or vendor assignment the downstream process expects.
- Long text passed in a format or table structure the interface team assumed rather than confirmed, resulting in a notification with an empty long text tab despite the interface reporting success.
- Interface issues the BAPI call in a loop without checking RETURN per iteration, so one bad record in a batch causes every subsequent record to inherit an open, uncommitted session and none of them persist.
- Notification type passed as a technical key that does not match what is configured in the client, common when copying interface logic between a development and production system with different custom types.
Whose problem this is
This is primarily a developer problem: the BAPI contract, the commit step and the RETURN loop are interface code. Functional QM consultants own the evidence the developer needs to diagnose failures: the catalog profile assigned to the plant and notification type, the partner determination procedure, and a working manual creation in QM01 to prove the configuration accepts the same codes the interface is sending.
Related SAP objects
Reviewed pages this object connects to in the ERPClimb knowledge graph.
Source: ERPClimb — https://erpclimb.com/sap-bapis/bapi-qualnot-createERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.