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

ParameterTypeDescriptionRequired
PURCHASEORDERBAPIEKKO-PO_NUMBERPurchase order numberYes
ITEMSBAPIMMPARA-SELECTIONReturn items—
ACCOUNT_ASSIGNMENTBAPIMMPARA-SELECTIONReturn account assignments—
SCHEDULESBAPIMMPARA-SELECTIONReturn schedule lines—
HISTORYBAPIMMPARA-SELECTIONReturn PO history—
ITEM_TEXTSBAPIMMPARA-SELECTIONReturn item texts—
HEADER_TEXTSBAPIMMPARA-SELECTIONReturn header texts—
SERVICESBAPIMMPARA-SELECTIONReturn services—
CONFIRMATIONSBAPIMMPARA-SELECTIONReturn confirmations—
SERVICE_TEXTSBAPIMMPARA-SELECTIONReturn service texts—
EXTENSIONSBAPIMMPARA-SELECTIONReturn customer extensions—

Exporting parameters

ParameterTypeDescription
PO_HEADERBAPIEKKOLPO header data
PO_ADDRESSBAPIADDRESSPO address

Tables parameters

ParameterTypeDescriptionRequired
PO_HEADER_TEXTSBAPIEKKOTXHeader texts—
PO_ITEMSBAPIEKPOPO items—
PO_ITEM_ACCOUNT_ASSIGNMENTBAPIEKKNAccount assignments—
PO_ITEM_SCHEDULESBAPIEKETSchedule lines—
PO_ITEM_CONFIRMATIONSBAPIEKESVendor confirmations—
PO_ITEM_TEXTSBAPIEKPOTXItem texts—
PO_ITEM_HISTORYBAPIEKBEPO history—
PO_ITEM_HISTORY_TOTALSBAPIEKBESPO history totals—
PO_ITEM_SERVICESBAPIESLLService lines—
EXTENSIONOUTBAPIPAREXCustomer extension fields (output)—
RETURNBAPIRETURNReturn 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.

Request a custom report