SAP Knowledge Base Article - Public

2601778 - When Using ManageCustomerInvoiceRequestIn Web Service, Price Component 7PRA for Discount Always Displays Zero Value

Symptom

You want to create an external customer invoice request via the web service ManageCustomerInvoiceRequestIn using the price component 7PRA as a discount, but the discount always displays a value of zero in the system instead of the value you are passing via the web service.

Environment

SAP Business ByDesign

Reproducing the Issue

Example of XML request sample you are sending for Discount:

<PriceComponent>
<TypeCode listID="2">7PRA</TypeCode>
<Rate>
<DecimalValue>10</DecimalValue>
<CurrencyCode>USD</CurrencyCode>
</Rate>
</PriceComponent>

But the value in the uploaded external customer invoice request for the discount is 0,00 USD in your system:

  1. Go to Customer Invoicing work center.
  2. Go to Invoice Requests view.
  3. Open the external customer invoice request ABC you created (ABC represents the ID of the external customer invoice request).
  4. Navigate to the Pricing and Invoicing tab.
  5. Expand the line items:
    You can see that the price component for discount has the value 0,00 USD.

Cause

The price component 7PRA is a quality loss fee and is a negative quantity, so the value of <DecimalValue> in the XML request has to be negative.

Resolution

If you want to use the discount type code 7PRA you need to adapt your XML request and the tags under <PriceComponent> accordingly, as in the following sample payload:

<PriceComponent>
<TypeCode listID="2">7PRA</TypeCode>
<Rate>
<DecimalValue>-10</DecimalValue>
<CurrencyCode>USD</CurrencyCode>
<BaseDecimalValue>0</BaseDecimalValue>
</Rate>
</PriceComponent>

Please note that you have to change the data in the sample request to reflect your own data, but you need to keep the minus sign '-' for <DecimalValue>.

Once you have adapted your payload, the price component will be taken into the invoice requests through web service as expected.

Keywords

7PRA ; discount ; web service ; external ; customer invoice ; decimalvalue ; typecode ; negative ; xml , KBA , AP-CI-CIR , Customer Invoice Request , Problem

Product

SAP Business ByDesign all versions