<?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: Operations on text strings in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837217#M664373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well rajesh's solution is good enough for your requirement, do the same thing for projects and personal details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2007 06:15:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-19T06:15:07Z</dc:date>
    <item>
      <title>Operations on text strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837211#M664367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;      I have a situation wherein i have to compare the text strings and if it matches i want to copy the below lines to an internal table until it faces some other keyword. Let me explain in detail, I have an internal table like this,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;summary&lt;/P&gt;&lt;P&gt;    xxxxxx&lt;/P&gt;&lt;P&gt;    yyyyyyy&lt;/P&gt;&lt;P&gt;    zzzzzzz&lt;/P&gt;&lt;P&gt;project&lt;/P&gt;&lt;P&gt;    aaaaaa&lt;/P&gt;&lt;P&gt;    bbbbbb&lt;/P&gt;&lt;P&gt;    cccccc&lt;/P&gt;&lt;P&gt;    dddddd&lt;/P&gt;&lt;P&gt;Now i want to search for summary in the above itab and i want to copy the contents under summary(3 lines here) to another internal table until it encounters project. And I want do same for project also. Pls help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points assured&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Tharanatha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 05:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837211#M664367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T05:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on text strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837212#M664368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your requirement is still not clear, see again if you can edit your question and add some more info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 05:39:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837212#M664368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T05:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on text strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837213#M664369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this the sort of thing you need?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zlocal_jc_split_internal_table.

start-of-selection.
  perform split.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  split
*&amp;amp;---------------------------------------------------------------------*
form split.

  data:
    l_text(10)          type c,
    l_which_tab(1)      type c,
    lt_data             like l_text occurs 10,
    lt_summ             like l_text occurs 10,
    lt_proj             like l_text occurs 10.

  perform data_load  "load sample data into memory
    tables
      lt_data.

  loop at lt_data into l_text.
*
*" Flag which table to write to
*
    case l_text.
      when 'summary'.
        l_which_tab = 'S'.
        continue.
      when 'project'.
        l_which_tab = 'P'.
        continue.
*" etc
    endcase.
*
*" Add the data to the appropriate table
*
    case l_which_tab.
      when 'S'.
        append l_text to lt_summ.
      when 'P'.
        append l_text to lt_proj.
    endcase.

  endloop.
*
*" End - lt_summ and lt_proj will be filled
*
break-point.  "check it worked!!

endform.                    "split

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  data_load
*&amp;amp;---------------------------------------------------------------------*
form data_load
  tables
    ot_data.

  clear: ot_data, ot_data[].

  append 'summary' to ot_data.
  append 'xxxxxx'  to ot_data.
  append 'yyyyyyy' to ot_data.
  append 'zzzzzzz' to ot_data.
  append 'project' to ot_data.
  append 'aaaaaa'  to ot_data.
  append 'bbbbbb'  to ot_data.
  append 'cccccc'  to ot_data.
  append 'dddddd'  to ot_data.

endform.                    "data_load&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 05:52:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837213#M664369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T05:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on text strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837214#M664370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tripat Pal,&lt;/P&gt;&lt;P&gt;     The thing is I have a text file like a resume. I want to to extract the contents under projects heading to an internal table and the summary contents to another internal table and personal details to another internal table. Now assume i have uploaded the resume to an internal table, now i want to search the internal table for projects and copy the contents of the projects into another internal table and similarly for the summary and personal details. Hope you have understood my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Tharanatha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 05:54:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837214#M664370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T05:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on text strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837215#M664371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i am right, you need to split your internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;take one internal table with all the keywords you are searching for&lt;/P&gt;&lt;P&gt;loop through your main table and search for any of those keywords&lt;/P&gt;&lt;P&gt;if found, then start appending from sytabix + 1 (you may need a variable to store sy-tabix + 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but before appending, check if it exists in the keyword table&lt;/P&gt;&lt;P&gt;if it doesnt then append it&lt;/P&gt;&lt;P&gt;else ignore it and append the next statement in the required table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;note: I think you would need one internal table for each keyword&lt;/P&gt;&lt;P&gt;ie: one for summary, one for project etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 05:56:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837215#M664371</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2007-09-19T05:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on text strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837216#M664372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CLEAR itab.&lt;/P&gt;&lt;P&gt;READ TABLE itab WITH KEY string = 'summary'.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;w_tabix = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;LOOP AT itab FROM w_tabix.&lt;/P&gt;&lt;P&gt;IF itab-string EQ 'project'.&lt;/P&gt;&lt;P&gt;  EXIT.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  APPEND itab to itab1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 05:57:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837216#M664372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T05:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on text strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837217#M664373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well rajesh's solution is good enough for your requirement, do the same thing for projects and personal details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 06:15:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837217#M664373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T06:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on text strings</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837218#M664374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;!!! Check this code !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_struct ,&lt;/P&gt;&lt;P&gt;          sv_string TYPE string,&lt;/P&gt;&lt;P&gt;        END OF ty_struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab_struct1 TYPE TABLE OF ty_struct,&lt;/P&gt;&lt;P&gt;       wa_struct1 LIKE LINE OF itab_struct1,&lt;/P&gt;&lt;P&gt;       itab_struct2 TYPE TABLE OF ty_struct,&lt;/P&gt;&lt;P&gt;       wa_struct2 LIKE LINE OF itab_struct2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        wa_struct1-sv_string = 'efghijkl'.&lt;/P&gt;&lt;P&gt;        APPEND wa_struct1 to itab_struct1.&lt;/P&gt;&lt;P&gt;        wa_struct1-sv_string = 'hmgkdhfl'.&lt;/P&gt;&lt;P&gt;        APPEND wa_struct1 to itab_struct1.&lt;/P&gt;&lt;P&gt;        wa_struct1-sv_string = 'summary'.&lt;/P&gt;&lt;P&gt;        APPEND wa_struct1 to itab_struct1.&lt;/P&gt;&lt;P&gt;        wa_struct1-sv_string = 'xxxxxxx'.&lt;/P&gt;&lt;P&gt;        APPEND wa_struct1 to itab_struct1.&lt;/P&gt;&lt;P&gt;        wa_struct1-sv_string = 'yyyyyyy'.&lt;/P&gt;&lt;P&gt;        APPEND wa_struct1 to itab_struct1.&lt;/P&gt;&lt;P&gt;        wa_struct1-sv_string = 'zzzzzzz'.&lt;/P&gt;&lt;P&gt;        APPEND wa_struct1 to itab_struct1.&lt;/P&gt;&lt;P&gt;        wa_struct1-sv_string = 'project'.&lt;/P&gt;&lt;P&gt;        APPEND wa_struct1 to itab_struct1.&lt;/P&gt;&lt;P&gt;        wa_struct1-sv_string = 'aaaaaaa'.&lt;/P&gt;&lt;P&gt;        APPEND wa_struct1 to itab_struct1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_string1 TYPE string,&lt;/P&gt;&lt;P&gt;       lv_string2 like lv_string1,&lt;/P&gt;&lt;P&gt;       summary_index TYPE I,&lt;/P&gt;&lt;P&gt;       project_index TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_string1 = 'summary'.&lt;/P&gt;&lt;P&gt;lv_string2 = 'project'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE itab_struct1 INTO wa_struct1 WITH TABLE KEY sv_string = 'summary'.&lt;/P&gt;&lt;P&gt;IF sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  summary_index = sy-tabix.&lt;/P&gt;&lt;P&gt;  summary_index = summary_index + 1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE itab_struct1 INTO wa_struct1 WITH TABLE KEY sv_string = 'project'.&lt;/P&gt;&lt;P&gt;IF sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  project_index = sy-tabix.&lt;/P&gt;&lt;P&gt;  project_index = project_index - 1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        LOOP AT itab_struct1 INTO wa_struct1  FROM summary_index to project_index.&lt;/P&gt;&lt;P&gt;          APPEND wa_struct1 to itab_struct2.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        WRITE : 'Done'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward Points If Useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 06:55:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-text-strings/m-p/2837218#M664374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T06:55:15Z</dc:date>
    </item>
  </channel>
</rss>

