<?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: Split up the string with whole word in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575658#M1433609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its fine...found one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SWA_STRING_SPLIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jan 2010 15:30:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-29T15:30:45Z</dc:date>
    <item>
      <title>Split up the string with whole word</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575656#M1433607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Friends,&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;    I have a string with 150 charcters.&lt;/P&gt;&lt;P&gt;    I want to split it up in 50-50-50 charcaters but the requirement is the word should not be broken.&lt;/P&gt;&lt;P&gt;    So the 150 characters field can be adjusted.&lt;/P&gt;&lt;P&gt;    and if there is no space in 150 characters then it should split exactly 50-50-50.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;    Is there any function module available for that?&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;    Regards,&lt;/P&gt;&lt;P&gt;    RH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 15:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575656#M1433607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-29T15:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Split up the string with whole word</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575657#M1433608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please search SE37 using '&lt;STRONG&gt;word&lt;/STRONG&gt;wrap*'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 15:23:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575657#M1433608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-29T15:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Split up the string with whole word</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575658#M1433609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its fine...found one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SWA_STRING_SPLIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 15:30:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575658#M1433609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-29T15:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Split up the string with whole word</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575659#M1433610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 15:31:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575659#M1433610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-29T15:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Split up the string with whole word</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575660#M1433611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make the necessary changes,&lt;/P&gt;&lt;P&gt;Its only a logic.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA:len TYPE i,
     lv_index TYPE i,
     lv_offset TYPE i,
     lv_rev_index TYPE i,
     lv_rev_2 type i,
     lv_string TYPE string.


lv_string = 'VADVvsndcvbjvbvbvmbzc zdnfdb hzdfhjkahf sdbfbsdjkf sd f f jzdhfjk'.


len = STRLEN( lv_string ).
lv_offset = 50.
lv_index = 1.

DO.
    IF lv_string+lv_offset(lv_index) = ' '.
      WRITE / lv_string+lv_index(lv_offset).
      lv_index = lv_offset.
    ELSE.
      lv_rev_index = lv_offset - 2.
      DO.
        IF lv_string+lv_rev_index(1) = ' '.
          WRITE / lv_string+lv_offset(lv_rev_index).
          lv_offset = lv_rev_index.
          EXIT.
        ENDIF.
        lv_rev_index = lv_rev_index - 1.
      ENDDO.
    ENDIF.
    IF sy-index = len.
      EXIT.
    ENDIF.
ENDDO.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 16:16:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-up-the-string-with-whole-word/m-p/6575660#M1433611</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-01-29T16:16:36Z</dc:date>
    </item>
  </channel>
</rss>

