<?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: concatenate zeros with the variable in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569410#M257091</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;Here is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_val type char10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    input         = p_val&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   OUTPUT        = p_val.&lt;/P&gt;&lt;P&gt;write: p_val.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark the helpful answers.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;eswar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Oct 2006 13:02:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-04T13:02:28Z</dc:date>
    <item>
      <title>concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569403#M257084</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;how to concatenate zeros to my variable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 12:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569403#M257084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T12:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569404#M257085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;concatenate '0' variable into variable.&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;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 12:58:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569404#M257085</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-10-04T12:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569405#M257086</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 concatenate the string directly or fill the string with '0' using overlay function also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Concatenate '00000' str into str1.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;   overlay str1 with '00000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 12:58:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569405#M257086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T12:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569406#M257087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;take the variable as type N. it will pad zeros&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 12:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569406#M257087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T12:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569407#M257088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or if you want all the remain space in the variable to be prefixed with zeros you can use numc variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: var1(5) ,&lt;/P&gt;&lt;P&gt;      var2(5) type  n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 = '10' . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move: var1 to var2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run the above code and check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 12:59:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569407#M257088</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-10-04T12:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569408#M257089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi if you want to zero pad the variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use the foll FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    input         = variable&lt;/P&gt;&lt;P&gt; IMPORTING &lt;/P&gt;&lt;P&gt;   OUTPUT        = variable&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This FM will help you zero pad the remaining characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Dominic  Pappaly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 13:00:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569408#M257089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T13:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569409#M257090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually i will get the length of the zero's to be padded in run time only how will i do that&lt;/P&gt;&lt;P&gt;my req is like this my parameters variable length is of 10 character but my input is of only 5 character so i need to concatenate the remaining character with zeros can anyone help me n doin this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 13:00:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569409#M257090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T13:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569410#M257091</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;Here is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_val type char10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    input         = p_val&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   OUTPUT        = p_val.&lt;/P&gt;&lt;P&gt;write: p_val.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark the helpful answers.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;eswar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 13:02:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569410#M257091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T13:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569411#M257092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Option 1 :&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt; data  : v_numc(6) type n,&lt;/P&gt;&lt;P&gt;         v_char(3) type c.&lt;/P&gt;&lt;P&gt;v_char = '3'.&lt;/P&gt;&lt;P&gt;move v_char to v_numc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now V_NUMC will have value '000003'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Option 2 :&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;by using Concatenate &lt;/P&gt;&lt;P&gt; LETS SAY Your Variable is V_VBELN of 10 characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : v_char(10) type c value '0000000000',
       v_length type i.

  V_LENGTH = STRLEN( V_VBELN ).
  IF V_LENGTH &amp;lt; 10 . 
*--if LENGTH less than 10, in this case only we have to pad the value with zeroes.
    V_LENGTH = 10 - V_LENGTH. 
&amp;lt;b&amp;gt;    CONCATENATE V_CHAR+0(V_LENGTH)
                V_VBELN
                INTO V_VBELN.&amp;lt;/b&amp;gt;
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srikanth.&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Srikanth Kidambi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 13:03:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569411#M257092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T13:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569412#M257093</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 unpack to fill the remaining spaces in the variable with zero's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unpack str1 to str1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 13:03:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569412#M257093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T13:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569413#M257094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the best way is as described below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pval -&amp;gt; your parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : lval(10) type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lval = pval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Here lval will have the value of pval left padded with zeroes...hope your pval is a numeric field.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 13:04:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569413#M257094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T13:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569414#M257095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then simply use a type N variable for parameter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 13:07:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569414#M257095</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-10-04T13:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate zeros with the variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569415#M257096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I understand is during u runtime you have your output as 12345 but you want to display it as 0000012345.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :       w_len           TYPE i,&lt;/P&gt;&lt;P&gt;      w_zeros         TYPE i,&lt;/P&gt;&lt;P&gt;      w_maxlen        TYPE i VALUE 10,&lt;/P&gt;&lt;P&gt;      w_tempqty    TYPE p,&lt;/P&gt;&lt;P&gt;w_charqty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    w_tempqty = itab-(your field name).&lt;/P&gt;&lt;P&gt;    w_charqty = w_tempqty.&lt;/P&gt;&lt;P&gt;    CONDENSE w_charqty.&lt;/P&gt;&lt;P&gt;    w_len = ( STRLEN( w_charqty ) ).&lt;/P&gt;&lt;P&gt;    w_zeros = w_maxlen - w_len.&lt;/P&gt;&lt;P&gt;    DO w_zeros TIMES.&lt;/P&gt;&lt;P&gt;      CONCATENATE '0' w_charqty INTO w_charqty.&lt;/P&gt;&lt;P&gt;    ENDDO.&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;shejal shetty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 13:07:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concatenate-zeros-with-the-variable/m-p/1569415#M257096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T13:07:27Z</dc:date>
    </item>
  </channel>
</rss>

