MM
BAPI
RFC
Used the same way in S/4HANA
BAPI_PO_GETDETAIL Get Purchase Order Details (Old)
Reads the header, address, items, schedule lines, account assignments, confirmations, services and PO history of a purchase order. Developers use it in PO status reports and interfaces that send order information to external systems. Choose which blocks are returned with 'X' flags such as ITEMS, SCHEDULES and HISTORY; for new development the more complete BAPI_PO_GETDETAIL1 is preferred.
- Function group
- MEWP
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| PURCHASEORDER | BAPIEKKO-PO_NUMBER | Purchase order number | Yes |
| ITEMS | BAPIMMPARA-SELECTION | Return items | — |
| ACCOUNT_ASSIGNMENT | BAPIMMPARA-SELECTION | Return account assignments | — |
| SCHEDULES | BAPIMMPARA-SELECTION | Return schedule lines | — |
| HISTORY | BAPIMMPARA-SELECTION | Return PO history | — |
| ITEM_TEXTS | BAPIMMPARA-SELECTION | Return item texts | — |
| HEADER_TEXTS | BAPIMMPARA-SELECTION | Return header texts | — |
| SERVICES | BAPIMMPARA-SELECTION | Return services | — |
| CONFIRMATIONS | BAPIMMPARA-SELECTION | Return confirmations | — |
| SERVICE_TEXTS | BAPIMMPARA-SELECTION | Return service texts | — |
| EXTENSIONS | BAPIMMPARA-SELECTION | Return customer extensions | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| PO_HEADER | BAPIEKKOL | PO header data |
| PO_ADDRESS | BAPIADDRESS | PO address |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| PO_HEADER_TEXTS | BAPIEKKOTX | Header texts | — |
| PO_ITEMS | BAPIEKPO | PO items | — |
| PO_ITEM_ACCOUNT_ASSIGNMENT | BAPIEKKN | Account assignments | — |
| PO_ITEM_SCHEDULES | BAPIEKET | Schedule lines | — |
| PO_ITEM_CONFIRMATIONS | BAPIEKES | Vendor confirmations | — |
| PO_ITEM_TEXTS | BAPIEKPOTX | Item texts | — |
| PO_ITEM_HISTORY | BAPIEKBE | PO history | — |
| PO_ITEM_HISTORY_TOTALS | BAPIEKBES | PO history totals | — |
| PO_ITEM_SERVICES | BAPIESLL | Service lines | — |
| EXTENSIONOUT | BAPIPAREX | Customer extension fields (output) | — |
| RETURN | BAPIRETURN | Return 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_PO_GETDETAIL'
EXPORTING
purchaseorder = lv_purchaseorder
IMPORTING
po_header = lv_po_header
po_address = lv_po_address
TABLES
po_header_texts = lt_po_header_texts
po_items = lt_po_items
po_item_account_assignment = lt_po_item_account_assignment
po_item_schedules = lt_po_item_schedules
po_item_confirmations = lt_po_item_confirmations
po_item_texts = lt_po_item_texts
po_item_history = lt_po_item_history
po_item_history_totals = lt_po_item_history_totals
po_item_services = lt_po_item_services
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.