BAPI_PO_CHANGE Change Purchase Order
Changes an existing purchase order: header fields, items, schedule lines, account assignment, conditions and texts, and can also add new items. It is the standard way to update prices, quantities or delivery dates from a custom program or an inbound interface. Pass the item number in both POITEM and POITEMX, set 'X' only for the fields you change, and commit with BAPI_TRANSACTION_COMMIT when RETURN has no errors.
- Function group
- 2012
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| PURCHASEORDER | BAPIMEPOHEADER-PO_NUMBER | Purchase order number | Yes |
| POHEADER | BAPIMEPOHEADER | Header data | — |
| POHEADERX | BAPIMEPOHEADERX | Header change flags | — |
| TESTRUN | BAPIFLAG-BAPIFLAG | Test run (no update) | — |
| NO_MESSAGING | BAPIFLAG-BAPIFLAG | No output (message) determination | — |
| NO_PRICE_FROM_PO | BAPIFLAG-BAPIFLAG | Do not adopt price from last document | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| EXPHEADER | BAPIMEPOHEADER | Header data (result) |
| EXPPOEXPIMPHEADER | BAPIEIKP | Foreign trade header data (result) |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| RETURN | BAPIRET2 | Return messages | — |
| POITEM | BAPIMEPOITEM | Item data | — |
| POITEMX | BAPIMEPOITEMX | Item change flags | — |
| POSCHEDULE | BAPIMEPOSCHEDULE | Delivery schedule lines | — |
| POSCHEDULEX | BAPIMEPOSCHEDULX | Schedule line change flags | — |
| POACCOUNT | BAPIMEPOACCOUNT | Account assignment data | — |
| POACCOUNTX | BAPIMEPOACCOUNTX | Account assignment change flags | — |
| POCOND | BAPIMEPOCOND | Item conditions | — |
| POCONDX | BAPIMEPOCONDX | Condition change flags | — |
| POTEXTHEADER | BAPIMEPOTEXTHEADER | Header texts | — |
| POTEXTITEM | BAPIMEPOTEXT | Item texts | — |
| EXTENSIONIN | BAPIPAREX | Customer 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_PO_CHANGE'
EXPORTING
purchaseorder = lv_purchaseorder
IMPORTING
expheader = lv_expheader
exppoexpimpheader = lv_exppoexpimpheader
TABLES
return = lt_return
poitem = lt_poitem
poitemx = lt_poitemx
poschedule = lt_poschedule
poschedulex = lt_poschedulex
poaccount = lt_poaccount
poaccountx = lt_poaccountx
pocond = lt_pocond
pocondx = lt_pocondx
potextheader = lt_potextheader.Related tables
Solutions using this function
Automatic Delivery Completed Flag for Old Open Purchase Order Items Program
A custom background program that selects purchase order items by rule, those whose remaining quantity is below a tolerance or whose delivery date …
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.