<?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: field conversion. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829893#M353796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA V_INT TYPE I VALUE '5'.&lt;/P&gt;&lt;P&gt;DATA V_CHAR(16).&lt;/P&gt;&lt;P&gt;DATA V_NUMBER(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF V_INT &amp;lt; '10'.&lt;/P&gt;&lt;P&gt;V_CHAR = V_INT.&lt;/P&gt;&lt;P&gt;CONDENSE V_CHAR NO-GAPS.&lt;/P&gt;&lt;P&gt;CONCATNATE '0' V_CHAR INTO V_NUMBER.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;V_CHAR = V_INT.&lt;/P&gt;&lt;P&gt;CONDENSE V_CHAR NO-GAPS.&lt;/P&gt;&lt;P&gt;V_NUMBER = V_CHAR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jan 2007 21:28:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-04T21:28:00Z</dc:date>
    <item>
      <title>field conversion.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829891#M353794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; im using an integer to increment a counter  and i need to move it in to a char. what if i need a zero '0' before the count if the number is less than 10 in my char field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 21:10:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829891#M353794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T21:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: field conversion.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829892#M353795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: f1(10) VALUE '123'.

WRITE: /001 f1.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input  = f1
  IMPORTING
    output = f1.

WRITE: /001 f1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 21:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829892#M353795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T21:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: field conversion.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829893#M353796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA V_INT TYPE I VALUE '5'.&lt;/P&gt;&lt;P&gt;DATA V_CHAR(16).&lt;/P&gt;&lt;P&gt;DATA V_NUMBER(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF V_INT &amp;lt; '10'.&lt;/P&gt;&lt;P&gt;V_CHAR = V_INT.&lt;/P&gt;&lt;P&gt;CONDENSE V_CHAR NO-GAPS.&lt;/P&gt;&lt;P&gt;CONCATNATE '0' V_CHAR INTO V_NUMBER.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;V_CHAR = V_INT.&lt;/P&gt;&lt;P&gt;CONDENSE V_CHAR NO-GAPS.&lt;/P&gt;&lt;P&gt;V_NUMBER = V_CHAR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 21:28:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829893#M353796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T21:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: field conversion.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829894#M353797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can do the same by declaring a variable of type N with required length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can perform airthematic operations as long as only numericals exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The advantage with data type N is by default we will be having LEADING ZEROES for numbers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: l_int type i value '2',
        l_num(2) type N.

l_num = l_int.
write:/ 'Type I:', l_int,
     / 'Type N:', l_num.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 01:17:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829894#M353797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T01:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: field conversion.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829895#M353798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the following chunk of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  GV_IDX1       TYPE  I,&lt;/P&gt;&lt;P&gt;            GV_IDX2(2)   TYPE N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;  GV_IDX1 = GV_IDX1 + 1.&lt;/P&gt;&lt;P&gt;  GV_IDX2 = GV_IDX1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE:   / GV_IDX1,&lt;/P&gt;&lt;P&gt;                  GV_IDX2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   IF GV_IDX1 GT 10.&lt;/P&gt;&lt;P&gt;       EXIT.&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The O/P will be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1    01&lt;/P&gt;&lt;P&gt;2    02&lt;/P&gt;&lt;P&gt;3    03&lt;/P&gt;&lt;P&gt;.      .&lt;/P&gt;&lt;P&gt;.      .&lt;/P&gt;&lt;P&gt;9    09&lt;/P&gt;&lt;P&gt;10  10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Data Type NUMC inorder to carry out this type of operation.&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;Abir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Don't forget to award Points *&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="36" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 03:37:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829895#M353798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T03:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: field conversion.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829896#M353799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i dont know whether your counter is less than 100 or not if it is so then&lt;/P&gt;&lt;P&gt;you can use type n which will place 0 before your variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : v_data(2) type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;otherwise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can check the counter whether it is lt 10 or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if counter lt 100.&lt;/P&gt;&lt;P&gt;v_data = counter.&lt;/P&gt;&lt;P&gt;&amp;lt;now char field &amp;gt; = v_data.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;directly take char fied = counter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 03:43:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829896#M353799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T03:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: field conversion.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829897#M353800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use this demo code - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: d_integer type i ,&lt;/P&gt;&lt;P&gt;        d_char(2) type N.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;d_integer = 4.&lt;/P&gt;&lt;P&gt;d_char = d_integer.&lt;/P&gt;&lt;P&gt;write: d_char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 04:11:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-conversion/m-p/1829897#M353800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T04:11:04Z</dc:date>
    </item>
  </channel>
</rss>

