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

ParameterTypeDescriptionRequired
PURCHASEORDERBAPIMEPOHEADER-PO_NUMBERPurchase order numberYes

Exporting parameters

ParameterTypeDescription
POHEADERBAPIMEPOHEADERHeader data
POEXPIMPHEADERBAPIEIKPForeign trade header data

Tables parameters

ParameterTypeDescriptionRequired
RETURNBAPIRET2Return messages—
POITEMBAPIMEPOITEMItem data—
POSCHEDULEBAPIMEPOSCHEDULEDelivery schedule lines—
POACCOUNTBAPIMEPOACCOUNTAccount assignment data—
POCONDBAPIMEPOCONDItem conditions—
POPARTNERBAPIEKKOPPartners—
POTEXTHEADERBAPIMEPOTEXTHEADERHeader texts—
POTEXTITEMBAPIMEPOTEXTItem texts—
EXTENSIONOUTBAPIPAREXCustomer 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.

Request a custom report