cancel
Showing results for 
Search instead for 
Did you mean: 

API_BILLING_DOCUMENT_SRV returns no header pricing data

ray_mannion
Participant
0 Kudos
308

We are seeing no header pricing data coming back from this service and wonder if it is a bug that SAP should investigate or fix.

Even in the tryout feature, no billing documents return header pricing.

https://api.sap.com/api/API_BILLING_DOCUMENT_SRV/tryout

Has anyone been able to retrieve header pricing conditions for billing documents with this service?

Accepted Solutions (0)

Answers (1)

Answers (1)

Hardeep_Tulsi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Ray.  You can  get billing document details from API  in the SAP API Business Hub. 

API Documentation URL: SAP API Business Hub - Billing Document (V2) 

Please Check Available Endpoints : Header Details: /A_BillingDocument and Header Pricing Conditions: /A_BillingDocumentItemPricingElement

To Trouble shoot further, you can  filter or query using the billing document ID and ensure that you are using correct authentication details.

Sample code to fetch header pricing conditions for a specific billing document, use an HTTP GET request:
GET /sap/opu/odata/sap/API_BILLING_DOCUMENT_SRV/A_BillingDocumentItemPricingElement?$filter=BillingDocument eq '<BILLING_DOCUMENT_ID>'

Also note that A_BillingDocumentPrcgElmnt doesn't fetch you pricing elements at header level if there are no actual header conditions from that specific invoice.

Learn more with Note 876617 - FAQ: Header conditions or header condition screen.

Pricing API only get the pricing conditions from database table for "actual" header or "actual" item level, If there are  'virtual' condition rows ex. 'item totals' (created (dynamically) at runtime during the display of the header condition screen)) will not be fetched.

Hope this helps

Thanks