<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Replace Leading Zeros with spaces in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754832#M1115215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First move the value into a variable of type char(xx).&lt;/P&gt;&lt;P&gt;Then use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURENCES OF '0' with SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Nov 2008 09:53:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-10T09:53:42Z</dc:date>
    <item>
      <title>Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754825#M1115208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me with a functional module to remove the leading zeros and replace them with spaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg:  number : 000095&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output needed :      95.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with the search in the sdn but couldnt find.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srikanth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2008 12:13:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754825#M1115208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-09T12:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754826#M1115209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi srik,&lt;/P&gt;&lt;P&gt;I think there is no function module for purpose,but have a look on the simple staatement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:p(5) value '00044'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ p no-zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;output:44&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with Regards,&lt;/P&gt;&lt;P&gt;Jaheer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2008 12:25:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754826#M1115209</guid>
      <dc:creator>jaheer_hussain</dc:creator>
      <dc:date>2008-11-09T12:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754827#M1115210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need spaces replacing those zeros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2008 12:27:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754827#M1115210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-09T12:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754828#M1115211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at function module CONVERSION_EXIT_ALPHA_OUTPUT  This will convert "000095" to '95'.  If you need to get to '&amp;lt;4 spaces&amp;gt;95' then use the WRITE INTO command with the addition "RIGHT-JUSTIFIED".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jaheer Hussein's suggestion should also work, with some modification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:p(5) value '00044',
    v(5).

write p into v no-zero right justified.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Nov 9, 2008 3:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2008 14:45:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754828#M1115211</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-11-09T14:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754829#M1115212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srikanth,&lt;/P&gt;&lt;P&gt;Check out the code for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: V_MATNR TYPE MARA-MATNR VALUE '00098'.
DATA: V_OUTPUT TYPE MARA-MATNR.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
  EXPORTING
    input         =  V_MATNR
 IMPORTING
   OUTPUT        =   V_OUTPUT.

          .
WRITE: / V_OUTPUT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2008 17:17:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754829#M1115212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-09T17:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754830#M1115213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use FM ''CONVERSION_EXIT_ALPHA_OUTPUT'' to have a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris Gu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 02:10:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754830#M1115213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T02:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754831#M1115214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
BKK_DELETE_LEADING_ZERO
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arunima&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 08:03:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754831#M1115214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T08:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754832#M1115215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First move the value into a variable of type char(xx).&lt;/P&gt;&lt;P&gt;Then use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE ALL OCCURENCES OF '0' with SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 09:53:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754832#M1115215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T09:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754833#M1115216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try below code for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:p(10) VALUE '000095'.&lt;/P&gt;&lt;P&gt;WRITE: p NO-ZERO RIGHT-JUSTIFIED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Deepa Kulkarni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 09:54:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754833#M1115216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T09:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754834#M1115217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Go for a REPLACE stmt.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 09:54:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754834#M1115217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T09:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754835#M1115218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Just use a SHIFT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT number left deleting leading '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suganya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 09:57:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754835#M1115218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T09:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Replace Leading Zeros with spaces</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754836#M1115219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot it worked with write to&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 10:29:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-leading-zeros-with-spaces/m-p/4754836#M1115219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T10:29:03Z</dc:date>
    </item>
  </channel>
</rss>

