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

Multiple billing documents that contain items from just one billed reference document using ODataAPI

Kaito2
Explorer
0 Likes
727

Dear Community,

Kaito2_0-1753870849447.png

As is possible to split one reference document into multiple billing documents via fiori screen, how can I do it via OData API? Or is it impossible?

Thanks&Regards

Accepted Solutions (1)

Accepted Solutions (1)

Chuma
Active Contributor
0 Likes

Hello @Kaito2 

You can’t split one delivery into multiple billing documents directly via OData API like you can in the Fiori app. The API (API_BILLINGDOCUMENT_SRV) doesn’t support interactive item selection or partial quantity billing.

 To achieve the same result, you need to

  • Manually split the delivery items/quantities on your side
  • Call the API multiple times with separate payloads, each creating a billing document for a portion of the delivery

API_BILLINGDOCUMENT_SRV – SAP Business Accelerator Hub

With kind regards

Chuma

Kaito2
Explorer
0 Likes

Thank you very much! I would appreciate it if you could give me some further information or instructions about this:
・Call the API multiple times with separate payloads, each creating a billing document for a portion of the delivery

Via Odata API, I can only confirm creating a billing document for 1+ whole delivery documents.
The link that you gave me was not Billing Document SRV, Could you give me another link?


Thanks&Regards

Kaito2
Explorer
0 Likes
Call the API multiple times with separate payloads, each creating a billing document for a portion of the delivery 

Answers (1)

Answers (1)

Chris1973
Active Contributor
0 Likes

Hi @Kaito2 

Based on the answer @Chuma  provided, I have checked SAP Help and KBA documentation for SAP S/4HANA Public Cloud Edition. I have a similar finding that confirmed what was said.

However, to replicate the desired partial-billing behaviour of the Fiori app via API, here is my recommended approach:

  1. On your side (middleware or integration layer), split the delivery items or quantities manually into separate sets.
  2. Make separate API calls to API_BILLINGDOCUMENT_SRV, each time with a payload referencing the delivery items and quantities for that partial billing. You can approach this by carrying out the following:
      • Make call number 1: delivery “DLV123”, items 10 and 20
      • Then make call number 2: same delivery “DLV123”, item 30

Each of these calls will produce a separate billing document as you intended.

The following Billing Document SRV link will provide you with further details.

While it's not as seamless as the Fiori app, this is the only fully supported method in Public Cloud.

Best regards,

Chris