MM BAPI RFC Used the same way in S/4HANA

BAPI_REQUISITION_CREATE Create Purchase Requisition

Creates a purchase requisition from item, account assignment and text tables using the older requisition interface. Many existing upload programs and interfaces still call it, although BAPI_PR_CREATE is the newer alternative. Fill the material number in internal format (conversion exit for leading zeros), check RETURN and call BAPI_TRANSACTION_COMMIT after a successful run.

Function group
MEWQ
Remote-enabled (RFC)
Yes
Type
BAPI

Importing parameters

ParameterTypeDescriptionRequired
SKIP_ITEMS_WITH_ERRORBAPIMMPARA-SELECTIONSkip faulty items—
AUTOMATIC_SOURCEBAPIMMPARA-SELECTIONAutomatic source determination—

Exporting parameters

ParameterTypeDescription
NUMBERBAPIEBANC-PREQ_NONumber of the created purchase requisition

Tables parameters

ParameterTypeDescriptionRequired
REQUISITION_ITEMSBAPIEBANCItem dataYes
REQUISITION_ACCOUNT_ASSIGNMENTBAPIEBKNAccount assignment data—
REQUISITION_ITEM_TEXTBAPIEBANTXItem texts—
REQUISITION_ADDRDELIVERYBAPIMERQADDRDELIVERYDelivery address—
RETURNBAPIRETURNReturn messages—
EXTENSIONINBAPIPAREXCustomer fields (inbound)—

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'BAPI_REQUISITION_CREATE'
  IMPORTING
    number = lv_number
  TABLES
    requisition_items = lt_requisition_items
    requisition_account_assignment = lt_requisition_account_assignment
    requisition_item_text = lt_requisition_item_text
    requisition_addrdelivery = lt_requisition_addrdelivery
    return = lt_return
    extensionin = lt_extensionin.

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report