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

BAPI_REQUISITION_CHANGE Change Purchase Requisition

Changes purchase requisition items and their account assignment with the older interface, which compares an old and a new version of each item. It is used by custom programs that adjust quantities, dates or account assignment of existing requisitions. Read the current values with BAPI_REQUISITION_GETDETAIL, pass them as the old rows and the edited copy as the new rows, then commit with BAPI_TRANSACTION_COMMIT.

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

Importing parameters

ParameterTypeDescriptionRequired
NUMBERBAPIEBAN-PREQ_NOPurchase requisition numberYes

Tables parameters

ParameterTypeDescriptionRequired
REQUISITION_ITEMS_OLDBAPIEBANVItems: old valuesYes
REQUISITION_ITEMS_NEWBAPIEBANVItems: new valuesYes
REQUISITION_ACCOUNT_OLDBAPIEBKNVAccount assignment: old values—
REQUISITION_ACCOUNT_NEWBAPIEBKNVAccount assignment: new values—
RETURNBAPIRETURNReturn messages—

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_CHANGE'
  EXPORTING
    number = lv_number
  TABLES
    requisition_items_old = lt_requisition_items_old
    requisition_items_new = lt_requisition_items_new
    requisition_account_old = lt_requisition_account_old
    requisition_account_new = lt_requisition_account_new
    return = lt_return.

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