cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Document XXXX has been saved (pricing error) in SOAP API "billingdocumentrequest_in"

Janarthanan
Participant
0 Kudos
32,396

Hello SAP Community,

I am encountering an issue while using the SOAP API "billingdocumentrequest_in" in SAP S/4HANA Public Cloud. When I send the payload to create a billing document, the response shows the following message:

"Document XXXX has been saved (pricing error)"

Although the billing document is saved, the pricing error indicates that something is not configured or processed correctly.

Pricing Data in Payload:

 

<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>
                <ID>1234567890</ID>
                <CreationDateTime>2025-01-19T14:28:00.1234567Z</CreationDateTime>
                <ReconciliationIndicator>1</ReconciliationIndicator>
                <SenderBusinessSystemID>SD_BIL_TEST</SenderBusinessSystemID>
                <RecipientBusinessSystemID>ZDW_SYSTEM_0120</RecipientBusinessSystemID>
            </MessageHeader>
            <GlobalParameters>
                <ReferenceDocumentLogicalSystem>LOGSYS4</ReferenceDocumentLogicalSystem>
            </GlobalParameters>
            <BillableDocument>
                <ReferenceDocument>9940227712</ReferenceDocument>
                <BillableDocumentItem>
                    <ReferenceDocumentItem>10</ReferenceDocumentItem>
                    <SalesDocumentType>EOX1</SalesDocumentType>
                    <SalesDocumentItemCategory>EDX1</SalesDocumentItemCategory>
                    <BillingDocumentType>CIX1</BillingDocumentType>
                    <SalesOrganization>6110</SalesOrganization>
                    <DistributionChannel>10</DistributionChannel>
                    <Division>00</Division>
                    <BillingDocumentDate>2025-01-19</BillingDocumentDate>
                    <SoldToParty>61100003</SoldToParty>
                    <BillToParty>61100003</BillToParty>
                    <PayerParty>61100003</PayerParty>
                    <TransactionCurrency>SGD</TransactionCurrency>
                    <TaxDepartureCountry>SG</TaxDepartureCountry>
                    <CustomerReference>56565666</CustomerReference>
                    <CustomerPaymentTerms>0004</CustomerPaymentTerms>
                    <PaymentMethod>N</PaymentMethod>
                    <ProductTaxClassification1>1</ProductTaxClassification1>
                    <Material>E001</Material>
                    <Incoterms>
                    <IncotermsClassification>EXW</IncotermsClassification>
                    <IncotermsTransferLocation>Singapore</IncotermsTransferLocation>
              		</Incoterms>
                    <BillingDocumentItemText>Testitem</BillingDocumentItemText>
                    <MaterialGroup>L001</MaterialGroup>
                    <RequestedQuantity unitCode="EA">10</RequestedQuantity>
                    <PricingDate>2025-01-18</PricingDate>
                    <Plant>6110</Plant>
                    <DepartureCountry>SG</DepartureCountry>
                    <ShipToParty>61100003</ShipToParty>
                    <ProfitCenter>YB111</ProfitCenter>
                    
                    <MATLAccountAssignmentGroup>01</MATLAccountAssignmentGroup>
                    <CustomerAccountAssignmentGroup>01</CustomerAccountAssignmentGroup>
                    <ProductTaxClassification>1</ProductTaxClassification>
                    <CustomerTaxClassification>1</CustomerTaxClassification>
                    <PricingElement>
                            <ConditionType>YBHD</ConditionType>
                            <ConditionRateValue>150</ConditionRateValue>
                            <ConditionCurrency>SGD</ConditionCurrency>
                            <ConditionQuantity unitCode="EA">1</ConditionQuantity>
                        </PricingElement>
                </BillableDocumentItem>
            </BillableDocument>
        </sd:BillingDocumentRequest>
    </soapenv:Body>
</soapenv:Envelope>

 

 

Questions:

  1. What specific pricing issues could cause this error, even though the document is saved?
  2. How can I identify the exact pricing condition causing the error?
  3. Are there any common configuration gaps (e.g., access sequences, missing condition records) that I should recheck?
  4. Does anyone have tips for debugging this error further using tools in SAP Public Cloud?

Any insights or suggestions would be greatly appreciated!

Thank you in advance!

 

View Entire Topic
DequanXu
Product and Topic Expert
Product and Topic Expert

Hello,

When encountering a pricing error in SAP S/4HANA Public Cloud while using the SOAP API "billingdocumentrequest_in," even though the billing document is saved, here are some considerations and steps you can take to troubleshoot and resolve the issue:

1. **Specific Pricing Issues:**
- **Missing Condition Records:** The pricing procedure could be missing condition records needed for calculation. Ensure that all relevant conditions have corresponding records maintained.
- **Incorrect Access Sequences:** If access sequences are incorrectly configured, the system may not be able to determine the right condition records.
- **Inactive or Deleted Conditions:** Check to ensure that necessary conditions are not inactive or mistakenly deleted.
- **Price Calculation Errors:** There could be a calculation error due to incorrect formulas or invalid data inputs.

2. **Identifying the Exact Pricing Condition:**
- **Pricing Analysis Tool:** Use the pricing analysis tools available in SAP to evaluate the pricing conditions that were accessed during document creation. This can help identify which condition records were missing or had issues.
- **Condition Type Check:** Verify all condition types in the pricing procedure to ensure they are configured correctly and are active.
- **Condition Record Review:** Look into condition records for validity periods, scales, and assigned access sequences to pinpoint any gaps.

3. **Common Configuration Gaps to Recheck:**
- **Access Sequence Configuration:** Confirm that access sequences are set up properly and linked correctly to the condition types.
- **Condition Record Completeness:** Ensure all condition records needed for the pricing procedure are correctly maintained.
- **Currency and Unit Consistencies:** Check that all values are maintained consistently in the expected units and currencies.

4. **Debugging Tips in SAP Public Cloud:**
- **Error Logs and Trace Tools:** Use the error logs and any available trace tools in SAP S/4HANA Public Cloud to find detailed error messages related to pricing.
- **Simulate Pricing:** Use the simulation options if available to see how pricing behaves without actually creating a billing document.

Best regards,

Dequan Xu

Janarthanan
Participant
0 Kudos
Thanks for the detailed analysis @Dequan Xu. The error was related to UOM conversion in the master data. Although it was already maintained, the system continued to display the error. We created a new master data entry, which resolved the issue.