# 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.

- Modules: MM
- Type: BAPI
- Function group: 2012
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-po-getdetail1/

## 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)

```abap
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

EKET, EKKN, EKKO, EKPO

