title: How to remove leading zero from string in SAPUI5 applications in XML view?
body: <p>I have an integer number in SAPDB but it has to be store as NUMERIC for some reason and numeric values are stored as string in SAP DB. </p>
  
  <p>Thus OData service returns <code>0000000001</code> instead of <code>1</code>.</p>
  
  <p>SO the question is how can I remove leading zero in XML View. The problem is that I can not use Javascript for formatting when I use XML View.</p>
  
  <p>The only solution that I found is to use a code like this:</p>
  
  <pre><code>&lt;Text text="{path:'ZId', type:'sap.ui.model.odata.type.ODataType', oConstraints:{isDigitSequence: true}}" /&gt;
  </code></pre>
  
  <p>But I don't know why it does not remove the leading zeros while it has been said in its references:</p>
  
  <p><code>if true, the value is handled as a sequence of digits; while formatting leading zeros are removed from the value and while parsing the value is enhanced with leading zeros (if a maxLength constraint is given) or leading zeros are removed from the value (if no maxLength constraint is given); this constraint is supported since 1.35.0. To make this type behave as ABAP type NUMC, use oConstraints.isDigitSequence=true together with oConstraints.maxLength.</code></p>
  
  <p>The references that I found some related data were in the following links:</p>
  
  <p><a href="https://archive.sap.com/discussions/thread/3681816" rel="nofollow noreferrer">https://archive.sap.com/discussions/thread/3681816</a></p>
  
  <p><a href="https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.model.odata.type.String.html" rel="nofollow noreferrer">https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.model.odata.type.String.html</a></p>
  
  <p><a href="https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.model.type.Integer.html" rel="nofollow noreferrer">https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.model.type.Integer.html</a></p>
  
  <p><a href="https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.core.format.NumberFormat.html" rel="nofollow noreferrer">https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.core.format.NumberFormat.html</a></p>