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

BAPI_PR_CHANGE Change Purchase Requisition (Enjoy)

Changes an Enjoy purchase requisition: header data, items, account assignment and texts, and can add new items. Custom programs use it to update quantities, delivery dates, sources of supply or account assignment in existing requisitions. Pass the item number in both PRITEM and PRITEMX, flag only the changed fields and commit with BAPI_TRANSACTION_COMMIT when RETURN is clean.

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

Importing parameters

ParameterTypeDescriptionRequired
NUMBERBAPIMEREQHEADER-PREQ_NOPurchase requisition numberYes
PRHEADERBAPIMEREQHEADERHeader data—
PRHEADERXBAPIMEREQHEADERXHeader change flags—
TESTRUNBAPIFLAG-BAPIFLAGTest run (no update)—

Exporting parameters

ParameterTypeDescription
PRHEADEREXPBAPIMEREQHEADERHeader data (result)

Tables parameters

ParameterTypeDescriptionRequired
RETURNBAPIRET2Return messages—
PRITEMBAPIMEREQITEMIMPItem data—
PRITEMXBAPIMEREQITEMXItem change flags—
PRACCOUNTBAPIMEREQACCOUNTAccount assignment data—
PRACCOUNTXBAPIMEREQACCOUNTXAccount assignment change flags—
PRHEADERTEXTBAPIMEREQHEADTEXTHeader texts—
PRITEMTEXTBAPIMEREQITEMTEXTItem texts—
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_PR_CHANGE'
  EXPORTING
    number = lv_number
  IMPORTING
    prheaderexp = lv_prheaderexp
  TABLES
    return = lt_return
    pritem = lt_pritem
    pritemx = lt_pritemx
    praccount = lt_praccount
    praccountx = lt_praccountx
    prheadertext = lt_prheadertext
    pritemtext = lt_pritemtext
    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