Symptom
In the service master data ABC, you select the Base UoM as XYZ which is a customized UoM, and maintained quantity conversion: 1 XYZ = 1 Hour(s). (ABC represents the ID of service item; XYZ represents the ID of the UoM)
When creating new invoice request manually in UI, you are able to select XYZ as the quantity UoM in the item line. But, when creating external customer invoice request via web service, you are not able to set XYZ as the Quantity Unit Code due to error. Hence, not able to set XYZ as quantity UoM in the document.
Environment
SAP Business ByDesign
Reproducing the Issue
By using the following codes in the paylaod, it creates external invoice reuqest with item quantity=18, quantity UoM=h-Hour(s), list price=150 USD.
<Quantity unitCode="HUR">18</Quantity>
<QuantityTypeCode >TIME</QuantityTypeCode>
<PriceAndTax>
<PriceComponent>
<TypeCode>7PR1</TypeCode>
<Rate>
<DecimalValue>150</DecimalValue>
<CurrencyCode>USD</CurrencyCode>
<BaseDecimalValue>1</BaseDecimalValue>
<BaseMeasureUnitCode>HUR</BaseMeasureUnitCode>
</Rate>
</PriceComponent>
While, you want to set the quantity UoM to XYZ in the invoice request. You then use the following code.
<Quantity unitCode="XYZ">18</Quantity>
<QuantityTypeCode>TIME</QuantityTypeCode>
The created external customer invoice request is then inconsistent status due to error:Combination of product and quantity unit does not exist.
Cause
Customized UoM is not accepted Quantity Unit Code. You are not able to use customized UoM in external customer invoice request.
Resolution
You need to check the accepted Quantity Unit Code and Quantity Type Code in KBA 2788104 - Quantity Unit Error When Uploading Customer Invoice.
Review your XML structure and correct the units passed.
Keywords
web service; quantity unit code; quantity type code; UoM; Unit of Measure; , KBA , SRD-CRM-INV , Customer Invoicing , How To