ERPClimb logoERPClimb
SAP BAPIObjectBAPI_PR_CREATEModuleMM_P2P

BAPI_PR_CREATE — Create Purchase Requisitions with the ME51N-Era BAPI

BAPI_PR_CREATE is the supported Enjoy-era purchase requisition creation BAPI corresponding to ME51N. SAP states that it replaced the older BAPI_REQUISITION_CREATE when classic ME51 was replaced by ME51N. It uses PR header/item/X structures, supports modern requisition processing, and requires the normal BAPI transaction pattern: evaluate RETURN completely, then commit only successful work.

This page covers the older BAPI used to create a purchase requisition from an external caller, the fields it carries, and why interfaces built on it commonly fail silently. It focuses on commit behaviour and RETURN table handling, the two areas where custom P2P interfaces built on this call actually break, and on what has replaced it in current builds.

Published 20 Sept 2026· 952 words

What it does

BAPI_PR_CREATE creates purchase requisitions through the newer purchasing object model used by ME51N. SAP Purchasing documentation explicitly distinguishes it from the older BAPI_REQUISITION_CREATE: BAPI_PR_CREATE is the Enjoy-era interface SAP recommends for purchase requisition creation. It supports the modern PR header/item structures and application validations and should be preferred over the obsolete classic requisition BAPI for on-stack BAPI integration.

Important parameters

The exact structure and table names for this legacy call vary slightly by release, so the parameters below are described by content rather than by asserting a literal ABAP identifier that may not be correct for every system.

  • RETURN - table of BAPIRET2-format messages, one row per validation or persistence event, including item-level failures that do not stop the overall call
  • header import data - document type, purchasing group, requisitioner, and requisition date, mirroring the header screen of ME51N
  • item import table - material or short text, plant, storage location, quantity, unit, delivery date, account assignment category, and cost object (cost center, WBS element, or order)
  • export field for the generated requisition number - populated once the call builds a document, but only meaningful once the caller has confirmed there is no error row in RETURN

Commit behaviour

Like nearly every classic MM BAPI, BAPI_PR_CREATE does not commit its own work. It builds the requisition inside the current logical unit of work and returns control without releasing database locks or making the document visible to other sessions. The caller must issue an explicit commit afterward. If that call is skipped, the requisition exists only inside the calling program's own database session: it disappears on rollback, on program termination, or at the end of an asynchronous RFC call, while the export field still shows a number that was never actually persisted. This is the source of the classic complaint that the interface reported success and a requisition number, but ME53N cannot find the document.

Return handling

RETURN is the only reliable success signal; the function module completing without a runtime error is not enough, because BAPI_PR_CREATE, like its siblings, can finish processing normally while reporting rejection only through a row with type E or A in RETURN. An interface that checks only sy-subrc, or that treats a filled export number as proof of success, will log a rejected requisition as created, because a preliminary number can appear even when the document is later rolled back internally. The correct pattern is to scan every row of RETURN for type E or A before deciding the call succeeded, to log type W rows separately since they often carry configuration warnings such as a missing source list or missing info record that explain a release-strategy surprise later, and to never issue the commit until that scan confirms no error row exists. Interfaces that commit unconditionally and only inspect RETURN afterward end up creating requisitions with incomplete account assignment, which then fail during conversion to a purchase order, and the failure gets diagnosed days later, far removed from the actual cause.

ECC vs S/4HANA

SAP Purchasing documentation states that BAPI_REQUISITION_CREATE is an old interface tied to obsolete ME51 and that BAPI_PR_CREATE replaced it for ME51N-era processing. Existing BAPI_PR_CREATE integrations remain relevant in S/4HANA on-premise/private cloud, although new clean-core integrations should also evaluate the released S/4HANA Purchase Requisition API. Do not describe BAPI_PR_CREATE as superseded by BAPI_REQUISITION_CREATE—the relationship is the opposite.

Common pitfalls

The failures below recur across interfaces built directly on this call rather than on a newer API.

  • Interface commits before scanning RETURN, so a requisition with one rejected item still gets created with the remaining items intact, leaving a document that does not match the source system's expected line count
  • Purchasing organization or plant combination not maintained for the document type used in the call, rejected with a message that reads identically to a material master issue in the log
  • Account assignment category passed without the matching cost center, WBS element, or order number, accepted at header level but rejected item by item, producing a mismatch between source and target item counts
  • Retry logic in the interface resubmits the same payload after a timeout without an idempotency check, creating duplicate requisitions for the same demand
  • Release strategy configured on the requisition document type triggers automatically after creation, and the interface treats a requisition still awaiting release as an error because no purchase order has appeared yet

Whose problem this is

Functional owns the failure when RETURN reports a configuration message: missing account assignment default, blocked document type, or a release strategy step that has not fired yet. Functional needs the exact RETURN row text and the requisition document type used. Developer owns it when the commit was never issued, when RETURN was ignored entirely, or when a warning row was treated as success; developer needs the interface's own trace of the call sequence and the commit call, or the absence of one.

Related SAP objects

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

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