SAP BAPIObjectBAPI_ALM_NOTIF_CREATEModulePM_EAM

BAPI_ALM_NOTIF_CREATE — BAPI_ALM_NOTIF_CREATE for PM CS Notifications

BAPI_ALM_NOTIF_CREATE creates a maintenance or customer service notification, mirroring transaction IW21. It accepts header data, item, cause, task, activity, partner and long text tables, and returns a notification number plus a RETURN table. It does not commit the database itself, and interfaces that skip filtering RETURN for error-type rows routinely report success on notifications that were never saved.

This page covers BAPI_ALM_NOTIF_CREATE, the remote-enabled function module used to create PM and CS notifications programmatically, equivalent to the IW21 create screen. It focuses on the parameter structure, the mandatory commit step, and the return-handling mistakes that produce phantom notification numbers in real interfaces.

Published 16 Sept 2026· 955 words

What it does

BAPI_ALM_NOTIF_CREATE acts on the PM/CS notification object, the same object edited through transactions IW21, IW22 and IW23. It mirrors IW21's create screen: header data, one or more items describing the problem, causes, tasks to be carried out, activities already performed, partner assignments, and long text. Which fields become mandatory depends entirely on the notification type passed in, since notification type customizing controls screen fields, catalog profiles, and partner determination in the same way it does for the online transaction. The BAPI is the standard entry point used by interfaces from external maintenance systems, IoT/condition-monitoring platforms, and custom malfunction-reporting apps that need to raise a notification without a user sitting at IW21.

Important parameters

  • NOTIF_TYPE - the notification type key (for example malfunction report, maintenance request, activity report) that drives mandatory fields and catalog assignment
  • NOTIFHEADER - header structure carrying short text, functional location, equipment number, planner group, main work center, priority, reported date and time
  • TASKS - table of tasks to be executed against the notification
  • ITEMS - table of item-level detail, typically object part and damage codes drawn from the catalog assigned to the notification type
  • CAUSES - table of cause codes linked to items
  • ACTIVITIES - table of activities already carried out, with activity codes and free text
  • PARTNERS - table of partner assignments (reported by, sold-to, coordinator) keyed by partner function
  • LONGTEXTS - table of long text lines for the notification long text object
  • NOTIFICATION - export parameter returning the generated notification number
  • RETURN - table of BAPIRET2 return messages, the only reliable indicator of success or failure

Commit behaviour

The BAPI does not commit. It builds the notification in the update task and returns a notification number optimistically, but nothing is written to the database until BAPI_TRANSACTION_COMMIT is called explicitly by the caller in the same logical unit of work. Interfaces that omit the commit call see a notification number come back, log it as created, and move on, only to find later that IW23 cannot display it because the update was rolled back at session end or by a subsequent error. This is one of the most common causes of number gaps and mismatched reconciliation reports between the source system and SAP.

Return handling

RETURN is a table, not a single message, and every line has to be inspected individually by its TYPE field (E, A, W, I, S). Checking only whether NOTIFICATION came back non-blank is not sufficient, because the BAPI can populate the notification number in a buffer before the error occurs downstream in item, cause, or partner processing, and can also return a number in a test or simulation-like sequence that never gets committed. A properly written wrapper loops the RETURN table, treats any line with TYPE E or A as a hard failure, discards the returned number in that case, and only proceeds to commit when no error-level line exists. Interfaces built by reading only the first row of RETURN, or by string-matching on a message text instead of TYPE, break the first time SAP changes a message's wording or issues the error on a later row, and then silently accept partially built notifications as successful.

ECC vs S/4HANA

BAPI_ALM_NOTIF_CREATE remains fully usable on S/4HANA and has not been formally superseded for general-purpose notification creation from custom or middleware interfaces. Certain line-of-business scenarios, such as mobile asset management apps, use newer OData-based services for notification creation, but those are scoped to specific Fiori applications rather than being a drop-in general replacement. For custom point-to-point or middleware integrations, this BAPI is still the standard call.

Common pitfalls

  • Missing or wrong entries in PARTNERS for partner functions marked mandatory in the notification type's partner determination procedure, causing an error that only appears at BAPI execution, not at header validation
  • Codes in ITEMS or CAUSES that do not belong to the catalog profile assigned to the notification type, producing an error deep in item processing that a caller checking only NOTIFICATION would miss
  • Long text passed with the wrong text ID or line format in LONGTEXTS, resulting in the notification being created with no visible long text even though the call reported success
  • Functional location or equipment number valid in one plant but not authorized or not extended for the notification's planning plant, rejected only at commit
  • Omitting BAPI_TRANSACTION_COMMIT entirely, the single most frequent root cause of notifications that exist in the interface log but not in the system

Whose problem this is

Functional PM/CS consulting owns the notification type configuration, catalog profile assignment, and partner determination procedure that the BAPI depends on, and should be able to reproduce the same creation manually in IW21 with identical field values. Development owns the interface code, specifically the RETURN table filtering logic and the explicit commit call. When a notification silently fails to appear, the first question is whether the manual IW21 equivalent succeeds with the same data before blaming the interface.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-bapis/bapi-alm-notif-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.