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

Billing Document API

Robin_Walther
Explorer
0 Likes
2,693

Hi.

I try to use the API https://api.sap.com/api/BILLINGDOCUMENTREQUEST_IN/overview

It works as far as a Billing Document gets created in S4H Cloud.
Now I got 2 Problems:

  1. I do not get a return-body but only a http-code. I don't know, what the number of the Billing Document created is. Furthermore if an error occurs, I still get 202 (Accepted) as a return-code. Only if I check the SOAP-monitor I can see errors. I tried Integration Suite, Postman and SoapUI
  2. Prices do not get posted. I tried different approaches to include a price but nothing happens.

Here's the Payload I send:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sd="http://sap.com/xi/SD-BIL">
   <soapenv:Header/>
   <soapenv:Body>
      <sd:BillingDocumentRequest>
         <MessageHeader>
            <CreationDateTime>2021-03-29T14:16:26Z</CreationDateTime>
         </MessageHeader>
         <GlobalParameters>
            <ReferenceDocumentLogicalSystem>SYS01</ReferenceDocumentLogicalSystem>
         </GlobalParameters>
         <BillableDocument>
            <ReferenceDocument>6e2f1cf0</ReferenceDocument>
            <BillableDocumentItem>
               <BillingDocumentDate>2022-12-07</BillingDocumentDate>
               <SalesDocumentType>EOX1</SalesDocumentType>
               <SalesDocumentItemCategory>EDX1</SalesDocumentItemCategory>
               <BillingDocumentType>CIX1</BillingDocumentType>
               <SalesOrganization>2220</SalesOrganization>
               <DistributionChannel>20</DistributionChannel>
               <Division>00</Division>
               <Plant>2210</Plant>
               <ProductHierarchyNode>10</ProductHierarchyNode>
               <SoldToParty>22402210</SoldToParty>
               <BillToParty>22402210</BillToParty>
               <PayerParty>22402210</PayerParty>
               <TransactionCurrency>CHF</TransactionCurrency>
               <ReferenceDocumentItem>10</ReferenceDocumentItem>
               <Material>813001</Material>
               <ProductTaxClassification1>1</ProductTaxClassification1>
               <CustomerTaxClassification1>1</CustomerTaxClassification1>
               <DepartureCountry>CH</DepartureCountry>
               <RequestedQuantity unitCode="PCE">1</RequestedQuantity>
               <ServicesRenderedDate>2022-12-07</ServicesRenderedDate>
               <TaxDepartureCountry>CH</TaxDepartureCountry>
               <CustomerPaymentTerms>0001</CustomerPaymentTerms>
               <PricingElement>
                  <ConditionType>PPR0</ConditionType>
                  <ConditionRateValue>1</ConditionRateValue>
                  <ConditionQuantity unitCode="PCE">1</ConditionQuantity>
                  <ConditionCurrency>CHF</ConditionCurrency>
               </PricingElement>
            </BillableDocumentItem>
         </BillableDocument>
      </sd:BillingDocumentRequest>
   </soapenv:Body>
</soapenv:Envelope><br>

Thanks

Robin

Accepted Solutions (1)

Accepted Solutions (1)

PrasanthPadmanabhan
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Robin,

You can activate the outbound service 'Billing Document - Send Creation Confirmation' in the communication arrangement SAP_COM_0120 to get the Billing Document number and failures as explained here https://help.sap.com/docs/SAP_S4HANA_CLOUD/03c04db2a7434731b7fe21dca77440da/f363219973f94b969fe8d47c....

Since https://api.sap.com/api/BILLINGDOCUMENTREQUEST_IN/overview relies on SOAP APIs for creation and confirmation, you will have to activate both the inbound and outbound APIs as these are asynchronous SOAP services

Best Regards,

Prasanth

Robin_Walther
Explorer
0 Likes

Hi Prasanth.

Thanks for the Information.
I hoped to avoid this and get the confirmation right away. This way it is way more difficult.

Do you maybe also have an idea, why my prices won't get posted?

Best Regards,

Robin

Answers (0)