Symptom
You are trying to retrieve data from a custom price list using the CalculatePriceIn webservice, and when sending the request with a Custom distribution channel, you face the following error:
Invalid entries for 'Distribution Channel': value Z1.
Environment
SAP Business ByDesign
Reproducing the Issue
Send the Payload, such as the one below:
<n0:CalculatePricesRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<CalculatePricesRequest>
<Application>2</Application>
<CurrencyCode>USD</CurrencyCode>
<CompanyID>10</CompanyID>
<SalesOrganisationID>P110</SalesOrganisationID>
<DistributionChannel>Z1</DistributionChannel>
<Item>
<ID>1</ID>
<ProductID>TEST</ProductID>
<ProductTypeCode>1</ProductTypeCode>
<Quantity unitCode="EA">1</Quantity>
<QuantityTypeCode>EA</QuantityTypeCode>
</Item>
</CalculatePricesRequest>
</n0:CalculatePricesRequest_sync>
Response Error:
Error: <Note>Invalid entries for 'Distribution Channel': value Z1</Note> (Z1 represents the ID of the custom Distribution Channel).
Cause
You have defined a custom distribution channel under the activity Distribution Channel as Z1 and it was maintained using a language other than English.
Although the Z values are maintained in your business configuration, they are not returned and consequently are treated as invalid since they are not available in English language.
See example below which represents the values stored in the backend table:
DE - German language
EN - English language
Code Description Language
01 Direct EN
02 Indirect EN
Z1 Custom1 DE
Z2 Custom3 EN
As you are sending a webservice request with EN - English as its language, but passing a distribution channel for a different language, ex. DE - German, the system will not consider. In this example, only the standard distribution channels and Z2 would be valid distribution channels, as Z1 would appear as unknown / not defined.
Resolution
This is the system expected behavior.
In order to solve this scenario, please maintain the custom distribution channels in the expected language.
- Go to the Business Configuration work center.
- Select the Overview view.
- Search for Distribution Channel.
- Click on Translation button.
- Select Source and Target language.
- Expand the expected Distribution Channel.
- Enter Target Language description.
- Click OK.
- Click Save.
Keywords
CalculatePriceIn, Price List, Webservice, Data, Error , KBA , AP-PRC-PC , Calculation , How To