MM
BAPI
RFC
Used the same way in S/4HANA
BAPI_PO_GETDETAIL1 Read Purchase Order Details
Reads a purchase order with header, items, schedule lines, account assignment, conditions, partners and texts in the same structures that BAPI_PO_CREATE1 uses. Developers use it in reports, in interfaces that send purchase orders to other systems, and to read the current values before calling BAPI_PO_CHANGE. Pass the PO number with leading zeros and check RETURN, because an unknown number does not raise an exception.
- Function group
- 2012
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| PURCHASEORDER | BAPIMEPOHEADER-PO_NUMBER | Purchase order number | Yes |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| POHEADER | BAPIMEPOHEADER | Header data |
| POEXPIMPHEADER | BAPIEIKP | Foreign trade header data |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| RETURN | BAPIRET2 | Return messages | — |
| POITEM | BAPIMEPOITEM | Item data | — |
| POSCHEDULE | BAPIMEPOSCHEDULE | Delivery schedule lines | — |
| POACCOUNT | BAPIMEPOACCOUNT | Account assignment data | — |
| POCOND | BAPIMEPOCOND | Item conditions | — |
| POPARTNER | BAPIEKKOP | Partners | — |
| POTEXTHEADER | BAPIMEPOTEXTHEADER | Header texts | — |
| POTEXTITEM | BAPIMEPOTEXT | Item texts | — |
| EXTENSIONOUT | BAPIPAREX | Customer fields (outbound) | — |
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_GETDETAIL1'
EXPORTING
purchaseorder = lv_purchaseorder
IMPORTING
poheader = lv_poheader
poexpimpheader = lv_poexpimpheader
TABLES
return = lt_return
poitem = lt_poitem
poschedule = lt_poschedule
poaccount = lt_poaccount
pocond = lt_pocond
popartner = lt_popartner
potextheader = lt_potextheader
potextitem = lt_potextitem
extensionout = lt_extensionout.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.