cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

API_PURCHASEORDER_PROCESS_SRV to retrieve Purchase Orders

ramesh_putta
Participant
0 Kudos
973

Hello,

I am using the API -API_PURCHASEORDER_PROCESS_SRV to retrieve all the purchase orders information from a S/4 HANA system. I get all the PO data along with PO quantity but I also would like to get the supplier confirmation quantity which is under 'Confirmations' tab in ME23N.

ramesh_putta_0-1744737358419.png

I tried using the entity A_PurchaseOrderScheduleLine but it wont return this field. This field exist in table EKET-DABMG.

Appreciate any inputs on this.

 

Accepted Solutions (0)

Answers (2)

Answers (2)

Jeremy_Deo
Contributor
0 Kudos

Dear user,

Thanks for the clarification. Since you're calling API_PURCHASEORDER_PROCESS_SRV from SAP BTP, the short answer is:

Yes, you can retrieve the supplier confirmation quantity using the API_PURCHASEORDER_PROCESS_SRV, but you must use the correct navigation entity:

 

Use the entity: A_PurchaseOrderItemConfirmation

This entity is part of the same service API_PURCHASEORDER_PROCESS_SRV, and is intended to retrieve the confirmed quantities.

 

How to do it in SAP BTP (via OData)

URL Example:

GET /sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrderItemConfirmation?$filter=PurchaseOrder eq '4500000010'&$format=json

It will return:

  • PurchaseOrder
  • PurchaseOrderItem
  • ConfirmationCategory
  • ConfirmationDate
  • ConfirmedQuantity ← 🎯 Your equivalent of EKET-DABMG
  • ConfirmationControl

 

You can also $expand from PO to Confirmation

Example:

GET /sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrder?$filter=PurchaseOrder eq '4500000010'&$expand=to_Item/to_Confirmation&$format=json

You’ll get:

  • Header data
  • All items
  • Under each item → the supplier confirmation lines with ConfirmedQuantity

 

I hope this will help answer your question.

Best regards,

Jeremy

ramesh_putta
Participant
0 Kudos
Hi Jeremy, thank you again . somehow I do not see the entity - A_PurchaseOrderItemConfirmation available in my system. How do I get this added to this API ? I only see A_PurOrdAccountAssignment, A_PurOrdPricingElement, A_PurchaseOrder ,A_PurchaseOrderItem A_PurchaseOrderScheduleLine and none of these have the field I need
Jeremy_Deo
Contributor
0 Kudos

Hello dear user,

And thank you for asking your question in the SAP Community blog.

You can directly access table EKET, which stores the supplier confirmation quantity in field DABMG.

Here are your main options to retrieve this data:

 

Option 1: ABAP Report Using EKET

If you're writing a custom ABAP report or program to retrieve PO data including supplier confirmations, you can simply read the EKET table:

SELECT e~ebeln, e~ebelp, e~etenr, e~dabmg, e~bedat

  FROM eket AS e

  INTO TABLE DATA(lt_confirmations)

  WHERE e~ebeln IN SO_ebeln. "so_ebeln is a select-option or internal table of PO numbers

You can join with EKKO and EKPO for PO header and item details.

 

Option 2: Custom Function Module or RFC

If you are exposing data externally (e.g., to an external system or UI5 app), you can:

  • Create a custom RFC-enabled Function Module or Web Service
  • In this FM, include logic to read from EKET and expose the DABMG field

 

Option 3: Enhancement of BAPI

You could also enhance BAPI_PO_GETDETAIL or similar to include the confirmation quantity:

  • This BAPI doesn’t include EKET-DABMG by default
  • But you can enhance the structure and user exit behind the BAPI to pull and return DABMG

 

Option 4: Create Custom Z View

If your ECC system uses external reporting tools (e.g., BW, Power BI), create a custom Z view* joining:

  • EKKO – PO Header
  • EKPO – PO Item
  • EKET – Schedule Line

Expose fields like:

  • PO Number
  • Item Number
  • Delivery Date
  • Confirmed Qty (DABMG)

Then use this view in your extraction or reporting.

 

Key Table Reference:

Table

Field

Description

EKET

DABMG

Confirmed quantity by vendor

EKET

EINDT

Delivery date

EKPO

MENGE

PO item quantity

EKKO

EBELN

PO number

 

I hope this will help answer your question.

Best regards,

Jeremy

Best regards,

Jeremy

ramesh_putta
Participant
0 Kudos
Thank you for your input Jeremy. But the question was if we can retrieve this by using the API API_PURCHASEORDER_PROCESS_SRV. I am calling the API from the BTP environment.
MertcanO
Explorer
0 Kudos
The existing Purchase Order API is now deprecated. What API should I use to create purchase orders in a private cloud environment going forward?