<?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: fixed field length by adding zeros in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-field-length-by-adding-zeros/m-p/6562096#M1431494</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much. solved it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Feb 2010 22:31:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-18T22:31:44Z</dc:date>
    <item>
      <title>fixed field length by adding zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-field-length-by-adding-zeros/m-p/6562093#M1431491</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 am wondering how to fix the field length by putting zeros if field length is not as required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg. required field length is 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp; data in filed is 2  then should be - 2000.&lt;/P&gt;&lt;P&gt;          if             12 then should be - 1200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 21:12:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-field-length-by-adding-zeros/m-p/6562093#M1431491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T21:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: fixed field length by adding zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-field-length-by-adding-zeros/m-p/6562094#M1431492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Her is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: txt(4).

txt = ' 12'.
SHIFT txt LEFT DELETING LEADING space.
TRANSLATE txt USING ' 0'.
WRITE:/ txt.

txt = '  2'.
SHIFT txt LEFT DELETING LEADING space.
TRANSLATE txt USING ' 0'.
WRITE:/ txt.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Dean Q.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 21:45:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-field-length-by-adding-zeros/m-p/6562094#M1431492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T21:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: fixed field length by adding zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-field-length-by-adding-zeros/m-p/6562095#M1431493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;below is example for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t1(4) type c value '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: len type i,&lt;/P&gt;&lt;P&gt;      len2  type i,&lt;/P&gt;&lt;P&gt;      diff type i.&lt;/P&gt;&lt;P&gt;describe field t1 length len.&lt;/P&gt;&lt;P&gt;len2 = strlen( t1 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;diff = len - len2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case diff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when '1'.&lt;/P&gt;&lt;P&gt;           t1 = t1 * 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when '2'.&lt;/P&gt;&lt;P&gt;          t1 =  t1 * 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when '3'.&lt;/P&gt;&lt;P&gt;         t1 = t1 * 1000&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: This kind of logic is a basic one. you can resolve urself if you think. Asking basic questions is against forum rules.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 21:51:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-field-length-by-adding-zeros/m-p/6562095#M1431493</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T21:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: fixed field length by adding zeros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-field-length-by-adding-zeros/m-p/6562096#M1431494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much. solved it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 22:31:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-field-length-by-adding-zeros/m-p/6562096#M1431494</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T22:31:44Z</dc:date>
    </item>
  </channel>
</rss>

