<?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 Split text dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762841#M905289</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 have a string containing N number of characters example:&lt;/P&gt;&lt;P&gt;A111/123/B4567/200/888&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say my field can only accomodate 10 characters and the rest have to be split to the next line (or flows to the next line in the case of a smartform).&lt;/P&gt;&lt;P&gt;However i do not want it to be split in an incomplete manner:&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;A111/123/B4&lt;/P&gt;&lt;P&gt;567/200/888&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that "B4567" is split incorrectly.&lt;/P&gt;&lt;P&gt;I need it to be like (every '/' indicates a unique text section):&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;A111/123/&lt;/P&gt;&lt;P&gt;B4567/200/&lt;/P&gt;&lt;P&gt;888&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone has any idea on how to accomplish this?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 May 2008 10:19:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-05T10:19:28Z</dc:date>
    <item>
      <title>Split text dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762841#M905289</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 have a string containing N number of characters example:&lt;/P&gt;&lt;P&gt;A111/123/B4567/200/888&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say my field can only accomodate 10 characters and the rest have to be split to the next line (or flows to the next line in the case of a smartform).&lt;/P&gt;&lt;P&gt;However i do not want it to be split in an incomplete manner:&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;A111/123/B4&lt;/P&gt;&lt;P&gt;567/200/888&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that "B4567" is split incorrectly.&lt;/P&gt;&lt;P&gt;I need it to be like (every '/' indicates a unique text section):&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;A111/123/&lt;/P&gt;&lt;P&gt;B4567/200/&lt;/P&gt;&lt;P&gt;888&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone has any idea on how to accomplish this?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 10:19:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762841#M905289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T10:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Split text dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762842#M905290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well you need to code that with offset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just make sure you only split when the last sign before the split is a /.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 10:28:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762842#M905290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T10:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Split text dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762843#M905291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: text(100) type c,&lt;/P&gt;&lt;P&gt;        text_1(10) type c,&lt;/P&gt;&lt;P&gt;        text_2(10) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text2 = 'A111/123/B4'&lt;/P&gt;&lt;P&gt;text3 = '567/200/888'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate text2 text3 to text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text_1 = text(10).&lt;/P&gt;&lt;P&gt;text_2 = text(10)+10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.............&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 10:30:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762843#M905291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T10:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Split text dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762844#M905292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with the below code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants c_slash type c value '/'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data v_act(250) type c.&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;           line(250) type c,&lt;/P&gt;&lt;P&gt;        end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_act = 'A111/123/B4567/200/888'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split v_act at c_slash into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  write: / itab-line.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 10:36:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762844#M905292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T10:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Split text dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762845#M905293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not want it to split at every single occurence of '/'. That's why this is abit tricky.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 10:39:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762845#M905293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T10:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Split text dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762846#M905294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;split it at every single occurance of '/' into an internal table and then concatenate 1st and 2nd , 3rd and 4th... according to ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 10:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762846#M905294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T10:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Split text dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762847#M905295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: slen(5) TYPE c,&lt;/P&gt;&lt;P&gt;      itab  TYPE TABLE OF string WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      itab1 TYPE TABLE OF string WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      text TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text = `A111/123/B4567/200/888/2386/842/8`.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT text AT '/' INTO TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;  IF sy-tabix = 1.&lt;/P&gt;&lt;P&gt;    itab1 = itab.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    CONCATENATE itab1 itab INTO itab1 SEPARATED BY '/'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  slen = STRLEN( itab1 ).&lt;/P&gt;&lt;P&gt;  IF slen &amp;gt;= 10.&lt;/P&gt;&lt;P&gt;    IF itab1+10(1) = '/'.&lt;/P&gt;&lt;P&gt;      APPEND itab1.&lt;/P&gt;&lt;P&gt;      CLEAR itab1.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      REPLACE ALL OCCURRENCES OF itab IN itab1 WITH space.&lt;/P&gt;&lt;P&gt;      APPEND itab1.&lt;/P&gt;&lt;P&gt;      CLEAR itab1.&lt;/P&gt;&lt;P&gt;      itab1 = itab.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  AT LAST.&lt;/P&gt;&lt;P&gt;    APPEND itab1.&lt;/P&gt;&lt;P&gt;    CLEAR itab1.&lt;/P&gt;&lt;P&gt;  ENDAT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: /1 'String: ', text.&lt;/P&gt;&lt;P&gt;LOOP AT itab1.&lt;/P&gt;&lt;P&gt;  WRITE :/1 itab1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2008 11:45:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-text-dynamically/m-p/3762847#M905295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-05T11:45:56Z</dc:date>
    </item>
  </channel>
</rss>

