<?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: string operations in internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306525#M160263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  what u can do is check the lenth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lit_data_tab.&lt;/P&gt;&lt;P&gt;lit_data_3&lt;/P&gt;&lt;P&gt;lit_data_4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_char3 type char3.&lt;/P&gt;&lt;P&gt;lv_char4 type char4.&lt;/P&gt;&lt;P&gt;lv_length type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lit_data_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_length = STRLEN ( lit_data_tab-value ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if lv_length = 3.&lt;/P&gt;&lt;P&gt;   lv_char3 = lit_data_tab-value .&lt;/P&gt;&lt;P&gt;   append lv_char3 to lv_char3 type char3.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;   lv_char4 = lit_data_tab-value .&lt;/P&gt;&lt;P&gt;   append lv_char4 to lv_char3 type char4.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u want &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;numa  numb&lt;/P&gt;&lt;P&gt;003   0003.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then u have to loop in one table and modify other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is any one table should contains both the field.&lt;/P&gt;&lt;P&gt;read the table with one field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mark helpfull answers&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Manoj Gupta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 May 2006 07:17:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-31T07:17:34Z</dc:date>
    <item>
      <title>string operations in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306520#M160258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear friends..&lt;/P&gt;&lt;P&gt;        Good morning.&lt;/P&gt;&lt;P&gt;                    I wish to know.. how i segregate the field from a database table to internal table into two different internal table field. say for example.&lt;/P&gt;&lt;P&gt;i have db table tab1 which has field number&lt;/P&gt;&lt;P&gt;tab1 -&amp;gt; number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i have another internal table itab1 whic has two fields numa and numb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tab1 -&amp;gt; numa&lt;/P&gt;&lt;P&gt;     -&amp;gt; numb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have value in tab1-&amp;gt;number is 001 and 0001&lt;/P&gt;&lt;P&gt;i wish to segregate this two values in to internal table&lt;/P&gt;&lt;P&gt;if the value is 001 then it should be into 001 -&amp;gt; numa&lt;/P&gt;&lt;P&gt;if the value is 0001 then it should be into 0001-&amp;gt; numb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i dont know how to perform the string operations in internal table.. would you like to tell me how i fix this problem any suggetion, article, code will be great help of mine..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanking you&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Naim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2006 06:49:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306520#M160258</guid>
      <dc:creator>naimkhans_babi</dc:creator>
      <dc:date>2006-05-31T06:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306521#M160259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can select everything into one internal table n then segregate them&lt;/P&gt;&lt;P&gt;chk this code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select from tab1 to itab.( itab contains only one field for numa &amp;amp; numb )&lt;/P&gt;&lt;P&gt;loop at itab .&lt;/P&gt;&lt;P&gt;move-corresponding itab to itab1.&lt;/P&gt;&lt;P&gt;if tab1 = '001'.&lt;/P&gt;&lt;P&gt;itab1-numa = itab-tab1.&lt;/P&gt;&lt;P&gt;clear itab1-numb.&lt;/P&gt;&lt;P&gt;elseif tab1 = '0001'.&lt;/P&gt;&lt;P&gt;itab-numb = itab-tab1.&lt;/P&gt;&lt;P&gt;clear itab1-numa.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;append itab1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;this shud work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Bikash  Agarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2006 06:55:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306521#M160259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-31T06:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306522#M160260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understood your problem properly, you have two internal tables and from one you want to move values to another base on some conditions. For that you can make use of control break statments in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop the itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on change of itab1-number.&lt;/P&gt;&lt;P&gt;case  itab1-number&lt;/P&gt;&lt;P&gt; when'001'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Do the logic for '001'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; when '0001'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Do the logic for '0001'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;end of change&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Believe this will help you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt; Thomas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2006 06:58:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306522#M160260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-31T06:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306523#M160261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : Itab2 like table of tab1 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data  : begin of  itab1, &lt;/P&gt;&lt;P&gt; --&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;  numa(10) type c,&lt;/P&gt;&lt;P&gt;  numb(10) type c,&lt;/P&gt;&lt;P&gt;end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from tab1 into table itab2 where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2.&lt;/P&gt;&lt;P&gt;  move corresponding itab2 to itab1.&lt;/P&gt;&lt;P&gt;  if itab2-number = '001'.&lt;/P&gt;&lt;P&gt;    move itab2-number to itab1-numa &lt;/P&gt;&lt;P&gt;  elseif itab2-number = '0001'.&lt;/P&gt;&lt;P&gt;    move itab2-number to itab1-numb. &lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  append itab2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work if number, num1 and num2 are character fields only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Susmitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2006 07:05:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306523#M160261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-31T07:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306524#M160262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx bikash and thomas..&lt;/P&gt;&lt;P&gt;           for your valuable reply.&lt;/P&gt;&lt;P&gt;    here i dont know the excat sequence of numbers &lt;/P&gt;&lt;P&gt;i know this is numa should have 3 charecter only and numb should have 4 charecters so from the colum number i need to check as it is one column only and has different values :&lt;/P&gt;&lt;P&gt;0001&lt;/P&gt;&lt;P&gt;002&lt;/P&gt;&lt;P&gt;0005&lt;/P&gt;&lt;P&gt;004&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so all the values wich are in lenght of three charecters should be goes to numa and the value whic are in lenght of 4 charecters should be goes to numb...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i cant set values statically.... that is the problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Naim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2006 07:10:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306524#M160262</guid>
      <dc:creator>naimkhans_babi</dc:creator>
      <dc:date>2006-05-31T07:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306525#M160263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  what u can do is check the lenth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lit_data_tab.&lt;/P&gt;&lt;P&gt;lit_data_3&lt;/P&gt;&lt;P&gt;lit_data_4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_char3 type char3.&lt;/P&gt;&lt;P&gt;lv_char4 type char4.&lt;/P&gt;&lt;P&gt;lv_length type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lit_data_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_length = STRLEN ( lit_data_tab-value ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if lv_length = 3.&lt;/P&gt;&lt;P&gt;   lv_char3 = lit_data_tab-value .&lt;/P&gt;&lt;P&gt;   append lv_char3 to lv_char3 type char3.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;   lv_char4 = lit_data_tab-value .&lt;/P&gt;&lt;P&gt;   append lv_char4 to lv_char3 type char4.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u want &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;numa  numb&lt;/P&gt;&lt;P&gt;003   0003.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then u have to loop in one table and modify other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is any one table should contains both the field.&lt;/P&gt;&lt;P&gt;read the table with one field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mark helpfull answers&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Manoj Gupta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2006 07:17:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306525#M160263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-31T07:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: string operations in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306526#M160264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naim,&lt;/P&gt;&lt;P&gt;in that case, for my previous reply,&lt;/P&gt;&lt;P&gt;in the where condition u can use..&lt;/P&gt;&lt;P&gt;if strlen(tab1) = '4'.&lt;/P&gt;&lt;P&gt;move to numb&lt;/P&gt;&lt;P&gt;elseif strlen(tab1) = '3'.&lt;/P&gt;&lt;P&gt;move to numa.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2006 07:47:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-operations-in-internal-table/m-p/1306526#M160264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-31T07:47:10Z</dc:date>
    </item>
  </channel>
</rss>

