SAP Knowledge Base Article - Public

2631257 - Leading Zeros in External Reference Field of Sales Orders or External Document ID of supplier invoice are Missing


You enter zero as leading numbers in the field External Reference in Sales Order or in the field External document ID in supplier invoice, and then you observe that those zeros are being removed or disappearing automatically.


SAP Business ByDesign

Reproducing the Issue

  1. Go to the Sales Orders work center
  2. Select the Sales Orders view 
  3. Search for the Sales Order ABC (ABC represents the ID of the Sales Order)
  4. Add 00 (zeros) in the External Reference field
  5. Press Enter button


  1.  Go to Supplier Invoicing work center
  2.  Go to New supplier invoice without reference to Purchase order under common tasks
  3.  Add 00 (zeros) in the External document ID
  4.  Press Enter button


It happens because the values you entered in the External Reference field/ External document ID are containing only numbers. Also in general we do not expect any document numbers being generated with leading zeros when they contain only numbers and thus we remove them.


In order to have the leading zeros you need to customize by creating new extension field and ask your partners to make the External Reference number to alpha numeric (contains number and characters). For example: 00123A. In this case, the leading zeros will not disappear after pressing Enter button.


You can add it to  as new requirement on Customer Influence Forum at


Leading Zeros ; External Reference ; Sales Order; Supplier invoice;External document ID , KBA , zero's disappeared , AP-SLO-SO , Sales Order , AP-SIP-SIV , Supplier Invoice , How To


SAP Business ByDesign all versions