You have an integration scenario which is setup in ByDesign system. From the third-party system, you are uploading Supplier Invoices using OData. This generates an External Reference ID such as 0001 in the third-party system. When updating this External Reference ID in ByDesign system, the External Reference ID ignores the prefix 000 and this is not identified in ByDesign system. That is, when you post the Supplier Invoice in SAP ByDesign, even if the Request payload has values for example 0001, the system is deleting the 0 and posting only 1 in the field External Document ID.
After posting and any status change in SAP ByDesign related to payment, voiding, cancellation status should be reflected in third-party system. For that, you have setup an interface to reconcile data between two systems. If the interface has only 1 instead of 0001, the iDoc will fail because 1 does not exist in third-party system.
A preceded zero is not possible for the field External Document ID. As soon as a value like 0001 is confirmed, the zero disappears. Your expectation is that, the External Document ID must be exactly the same number as stated on the Supplier Invoices, including preceded zero.
SAP Business ByDesign
Reproducing the Issue
Execute the OData scenario to create Supplier Invoices from the third-party system to ByDesign system.
To check the External Document ID in the Supplier Invoices created in ByDesign system:
- Go to Supplier Invoicing work center
- Go to Invoices and Credit Memos view
- Find the respective Invoice ID
- Observe that the field External Document ID does not have the prefix 0. That is, the prefix 0 disappears and it displays the rest of the ID.
When you try to insert data into the database tables, you would need to append leading zeros in case of numeric values for the External Document ID to fulfil the length of the datatype. In this case it is CHAR 35.
For example, if the value is 0001, system would prefix leading zeros at the front and store in the database. When you display it in the UI, system would try to remove leading zeros and display it, since the number of leading zeros to be removed cannot be known as this is specific to each type of document. There are no configurations which can be checked based on which the data can be shown.
Create an extension field and fill the values accordingly. This can be extended to webservice also.
External Document ID, External Reference ID, leading zeros, preceded zeros, preceding zeros, 0, prefix 0, delete 0 , KBA , external document id , external reference id , 0 , preceded zeros , delete 0 , prefix 0 , leading zeros , preceding zeros , AP-RC-ODF-BYD , OData Framework and Console (ByD) , Problem