<?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: Work with INTEGER and STRINGS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482317#M225506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: v_str1 type string,&lt;/P&gt;&lt;P&gt;      v_int type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v_str&lt;EM&gt;0(1) = 'S' and v_str&lt;/EM&gt;2(1) = 'A'.&lt;/P&gt;&lt;P&gt;v_int = v_str+3(4).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v_str&lt;EM&gt;0(1) = '1' and v_str&lt;/EM&gt;2(1) = '8'.&lt;/P&gt;&lt;P&gt;v_str1 = v_str+3(4).&lt;/P&gt;&lt;P&gt;endif.&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>Fri, 11 Aug 2006 16:06:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-11T16:06:39Z</dc:date>
    <item>
      <title>Work with INTEGER and STRINGS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482315#M225504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the following problem. How to convert int to string and back in ABAP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the second question, if I get a string "S1A0001" how can I check the first and the third byte, if they are equal to 'S' and 'A' then convert '0001' to integer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if I have int-"1080025" check, whether the first byte is equal to "1" and the third one is "8" and if so, to convert the rest "0025" to string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 15:52:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482315#M225504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T15:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Work with INTEGER and STRINGS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482316#M225505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: v_value(7),&lt;/P&gt;&lt;P&gt;      v_int type i, " integer value&lt;/P&gt;&lt;P&gt;      v_str type string. " string value&lt;/P&gt;&lt;P&gt;v_value = 'S1A0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v_value+0(1) = 'S' and&lt;/P&gt;&lt;P&gt;   v_value+2(1) = 'A'.&lt;/P&gt;&lt;P&gt;   v_int = v_value+3(4).&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_value = '1080025'.&lt;/P&gt;&lt;P&gt;if v_value+0(1) = '1' and&lt;/P&gt;&lt;P&gt;   v_value+2(1) = '8'.&lt;/P&gt;&lt;P&gt;   v_str = v_value+3(4).&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 16:04:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482316#M225505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T16:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Work with INTEGER and STRINGS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482317#M225506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: v_str1 type string,&lt;/P&gt;&lt;P&gt;      v_int type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v_str&lt;EM&gt;0(1) = 'S' and v_str&lt;/EM&gt;2(1) = 'A'.&lt;/P&gt;&lt;P&gt;v_int = v_str+3(4).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v_str&lt;EM&gt;0(1) = '1' and v_str&lt;/EM&gt;2(1) = '8'.&lt;/P&gt;&lt;P&gt;v_str1 = v_str+3(4).&lt;/P&gt;&lt;P&gt;endif.&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>Fri, 11 Aug 2006 16:06:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482317#M225506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T16:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Work with INTEGER and STRINGS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482318#M225507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;l_var = variable containing the value either S1A0001 or 1080025.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note the defn &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : l_int type i,&lt;/P&gt;&lt;P&gt;       l_str type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if l_var(1) CA sy-abcde and l_var+2(1) CA sy-abcde.&lt;/P&gt;&lt;P&gt;   l_int = l_var+3(4).&lt;/P&gt;&lt;P&gt;elseif l_var(1) CA '0123456789' and l_var_2(1) CA '0123456789'.&lt;/P&gt;&lt;P&gt;   l_str = l_var+3(4).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above, I have given generalized checks as to 1st and 3rd char being alphabet or numeric and depending on the same do the needful, surely u can replace it with single characters if it is very specific to your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 16:07:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482318#M225507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T16:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Work with INTEGER and STRINGS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482319#M225508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And if I have &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_code TYPE text8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"S1A00005"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and want to get "S2A00006", how can I add to text 2 and 6?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same with int, to convert "10001" to text "A10002".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 16:18:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482319#M225508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T16:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Work with INTEGER and STRINGS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482320#M225509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;l_int = 10001&lt;/P&gt;&lt;P&gt;l_int = l_int + 1&lt;/P&gt;&lt;P&gt;concatenate 'A' l_int into l_str.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is that ur requirement ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 16:22:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482320#M225509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T16:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Work with INTEGER and STRINGS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482321#M225510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: v_num(1) type n,&lt;/P&gt;&lt;P&gt;      v_num2(5) type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_num = p_code+1(1) + 1.&lt;/P&gt;&lt;P&gt;v_num2 = p_code+3(5) + 1.&lt;/P&gt;&lt;P&gt;concatenate p_code+0(1) v_num v_num2 into p_code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 16:25:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482321#M225510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T16:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Work with INTEGER and STRINGS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482322#M225511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this is requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks guys for the answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2006 16:31:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-integer-and-strings/m-p/1482322#M225511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-11T16:31:48Z</dc:date>
    </item>
  </channel>
</rss>

