<?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: Leading Zeros in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815485#M1126999</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhaskar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to give the dot(.) its not accepting. Throwing error.&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>Tue, 02 Dec 2008 12:00:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-02T12:00:17Z</dc:date>
    <item>
      <title>Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815475#M1126989</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;I need to insert leading zeros for a currency and quantity field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg:  v_dig =7.00&lt;/P&gt;&lt;P&gt;       v_dig = 00007.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I searched in SDN but I could get only for char. I even converted to char and tried but the value is changing to 0000700. the decimal is not coming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me with this.&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>Tue, 02 Dec 2008 10:33:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815475#M1126989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T10:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815476#M1126990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how did you move the decimal value to char field? you have to do like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;WRITE decimal TO char_field.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;after that you can fill up with leading zeros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 10:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815476#M1126990</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-12-02T10:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815477#M1126991</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;       it is not posible to add leading zeroes to currency.  u have to take the output field also as char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 10:36:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815477#M1126991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T10:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815478#M1126992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;lv_val = v_dig(1).&lt;/P&gt;&lt;P&gt;lv_len = strlen ( lv_val).&lt;/P&gt;&lt;P&gt;while (lv_len  LT  4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate '0' lv_val into v_dig.&lt;/P&gt;&lt;P&gt;lv_len = strlen( lv_val).&lt;/P&gt;&lt;P&gt;endwhile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt; regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: BrightSide on Dec 2, 2008 10:40 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 10:40:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815478#M1126992</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T10:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815479#M1126993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FM&lt;/P&gt;&lt;P&gt;BKK_AMOUNT_CONV_TO_EXTERNAL or&lt;/P&gt;&lt;P&gt;CURRENCY_AMOUNT_SAP_TO_IDOC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to properly convert you amount from internal to external format&lt;/P&gt;&lt;P&gt;you may define AMOUNT_EXTERNAL as character field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will properly convert your amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that you can concatenate 0000 to your amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 10:41:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815479#M1126993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T10:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815480#M1126994</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;you could try using TRANSLATE statement :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA : v_dig LIKE reguh-rwbtr
          , v_dig_with_zero(8) .

v_dig = 7 .

MOVE v_dig TO v_dig_with_zero .

* move value to the right side of the final variable : v_dig_with_zero contains '    7.00'
SHIFT v_dig_with_zero RIGHT DELETING TRAILING space .


* replace space in front of value with zeros :  v_dig_with_zero contains '00007.00'
TRANSLATE v_dig_with_zero USING ' 0' .

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 10:58:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815480#M1126994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T10:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815481#M1126995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you want to show the content with leading zeroes in a script or smartform then use the fill character F&lt;/P&gt;&lt;P&gt;for example &amp;amp;V_DIG(F0)&amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you want to show the content with leading zeroes in a write statement then use this:&lt;/P&gt;&lt;P&gt;WRITE v_dig TO v_dig_type_char.&lt;/P&gt;&lt;P&gt;OVERLAY v_dig_type_char with '000000000000000000'.&lt;/P&gt;&lt;P&gt;WRITE v_dig_type_char. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Guido&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 11:30:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815481#M1126995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T11:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815482#M1126996</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 FM:   HRPBSNO_FORMAT_ZERO&lt;/P&gt;&lt;P&gt;With input values:&lt;/P&gt;&lt;P&gt;Left = 4&lt;/P&gt;&lt;P&gt;Right = 2&lt;/P&gt;&lt;P&gt;In_separator =  blank&lt;/P&gt;&lt;P&gt;Out_separator = dot( .)&lt;/P&gt;&lt;P&gt;Str value = 70.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will get output as 0070.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 11:33:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815482#M1126996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T11:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815483#M1126997</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;I implemented all the above but still I am getting spaces but not zeros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: unhrs(8) type c.&lt;/P&gt;&lt;P&gt;DATA: amount(11) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WRITE wa_tm-unhrs TO unhrs.&lt;/P&gt;&lt;P&gt;    SHIFT amount RIGHT DELETING TRAILING space .&lt;/P&gt;&lt;P&gt;    translate amount using '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_items-unit                       = unhrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me with this.&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>Tue, 02 Dec 2008 11:49:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815483#M1126997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T11:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815484#M1126998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot get leading 0's in a quantity/currency field.&lt;/P&gt;&lt;P&gt;for displaying purpose, after all calculation are over &lt;/P&gt;&lt;P&gt;you can convert it into a character field&lt;/P&gt;&lt;P&gt;and then apply the MATN conversion exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 11:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815484#M1126998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T11:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815485#M1126999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhaskar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to give the dot(.) its not accepting. Throwing error.&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>Tue, 02 Dec 2008 12:00:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815485#M1126999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T12:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815486#M1127000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;As eric said Move  the data to character fields then to NUMC field u wil get leading zeros&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 12:03:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815486#M1127000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T12:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815487#M1127001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; translate amount using '0'.&lt;/P&gt;&lt;P&gt;Your partern is not correct. It should be : translate amount using &lt;STRONG&gt;' 0'&lt;/STRONG&gt; (there is a space before the zero).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using translate, the first char of  partern is replaced by the second (use F1 key on word TRANSLATE in your abap editor).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 12:28:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815487#M1127001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T12:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Leading Zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815488#M1127002</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;You can use the below code as well:&lt;/P&gt;&lt;P&gt;DATA: v_menge TYPE bstmg,&lt;/P&gt;&lt;P&gt;          v_char(8) TYPE c,&lt;/P&gt;&lt;P&gt;          v_char1(8) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_menge = '7.00'.&lt;/P&gt;&lt;P&gt;v_char = v_menge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UNPACK v_char TO v_char.&lt;/P&gt;&lt;P&gt;CONCATENATE v_char&lt;EM&gt;0(5) '.' v_char&lt;/EM&gt;5(2) INTO v_char1.&lt;/P&gt;&lt;P&gt;WRITE: v_char1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nitin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 12:36:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leading-zeros/m-p/4815488#M1127002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T12:36:03Z</dc:date>
    </item>
  </channel>
</rss>

