Symptom
The response XML of the Web service 'ProductAvailabilityDeterminationQuery' returns product ID with the leading zeros pre-pended to it.
Eg: If the Product ID is 123456 in the Request XML; The Response XML will have the Product ID '0000000000000000000000000000000000123456'.
Reproducing the Issue
Compare the Request and Response XMLs of the web service 'ProductAvailabilityDeterminationQuery'-
Request XML
<ProductAndSupplyPlanningArea>
<ProductInternalID schemeID="Token 1" schemeAgencyID="Token 2">430</ProductInternalID>
<ProductTypeCode>1</ProductTypeCode>
<SupplyPlanningAreaID schemeID="Token 9" schemeAgencyID="Token 10">SM11000</SupplyPlanningAreaID>
</ProductAndSupplyPlanningArea>
Response XML
<ProductAvailabilityDeterminationResponse><ProductInternalID>0000000000000000000000000000000000000430</ProductInternalID>
<ProductTypeCode>1</ProductTypeCode>
<ProductTypeName languageCode="EN">Material </ProductTypeName>
<SupplyPlanningAreaID>SM11000</SupplyPlanningAreaID>
Cause
The data type used for Product ID has 40 characters length. Therefore, in case of Numeric Data, system automatically fills the data field with preceding zeroes if Product ID is less than 40 characters. This does not happen in case the data is Alpha Numeric. The response XML will not have leading zeros for the Alpha Numeric Product IDs even though the Product ID is less than 40 characters.
Eg: If the Product ID is 123456 in the Request XML; The Response XML will have the Product ID '0000000000000000000000000000000000123456'.
If the Product ID is LOG123 in the Request XML; The Response XML will have the Product ID 'LOG123'.
Resolution
This is the designed system behavior.
Keywords
leading zeros, product ID with leading zeros, web service, ProductAvailabilityDeterminationQuery , KBA , AP-CR-ATP , Available To Promise Check Run , Problem