<?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: splitting the string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998274#M955278</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;  You can use split at space for splitting the string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Veeresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jun 2008 07:25:07 GMT</pubDate>
    <dc:creator>former_member673464</dc:creator>
    <dc:date>2008-06-13T07:25:07Z</dc:date>
    <item>
      <title>splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998273#M955277</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;am working of smart forms am getting all the data n using the sum statement am getting the total in G_dmbtr am passing it to the functional module and its giving me the amount in words . now i had to split the string into two line&lt;/P&gt;&lt;P&gt;while spliting i had to take care tht it wont split &lt;/P&gt;&lt;P&gt;for ex    billion   in the first line BILL and in the second line&lt;/P&gt;&lt;P&gt;lion   like tht &lt;/P&gt;&lt;P&gt;pls let me know the way&lt;/P&gt;&lt;P&gt;thanks in advance&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;DATA:&lt;/P&gt;&lt;P&gt;      l_spell type spell.&lt;/P&gt;&lt;P&gt;data: var(2) type c, " for S$&lt;/P&gt;&lt;P&gt;      var2(5) type c, " for Cents&lt;/P&gt;&lt;P&gt;      var3(4) type c. " for only&lt;/P&gt;&lt;P&gt;      var = 'S$'.&lt;/P&gt;&lt;P&gt;      var2 = 'Cents'.&lt;/P&gt;&lt;P&gt;      var3 = 'ONLY'.&lt;/P&gt;&lt;P&gt;PARAMETERS: g_dmbtr(20) type c.&lt;/P&gt;&lt;P&gt;data: g_amt_in_txt1 type string,&lt;/P&gt;&lt;P&gt;      G_AMT_IN_TXT2 type string,&lt;/P&gt;&lt;P&gt;      G_AMT_IN_TXT3 type string,&lt;/P&gt;&lt;P&gt;      G_AMT_IN_TXT  type string.&lt;/P&gt;&lt;P&gt;*BREAK-POINT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SPELL_AMOUNT'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   AMOUNT          = G_DMBTR&lt;/P&gt;&lt;P&gt;   CURRENCY        = 'SGD'&lt;/P&gt;&lt;P&gt;   LANGUAGE        = SY-LANGU&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   IN_WORDS        = l_spell&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   NOT_FOUND       = 1&lt;/P&gt;&lt;P&gt;   TOO_LARGE       = 2&lt;/P&gt;&lt;P&gt;   OTHERS          = 3&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;if l_spell-DECWORD = 'ZERO'.&lt;/P&gt;&lt;P&gt;  CONCATENATE var l_spell-word var3 into  g_amt_in_txt1&lt;/P&gt;&lt;P&gt; separated by space.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;************moving S$ into l_spell-word&lt;/P&gt;&lt;P&gt;  CONCATENATE var l_spell-word into G_AMT_IN_TXT2&lt;/P&gt;&lt;P&gt;   SEPARATED BY space.  "string with S$ and dollars&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;moving  .23(twenty three) cents into l_spell-decword&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE l_spell-DECWORD var2 into G_AMT_IN_TXT3&lt;/P&gt;&lt;P&gt;  SEPARATED BY space.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="10" type="ul"&gt;&lt;P&gt;this is for concatinating both the above strings&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE G_AMT_IN_TXT2 G_AMT_IN_TXT3 into G_AMT_IN_TXT&lt;/P&gt;&lt;P&gt;  SEPARATED BY ' and '.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  write:/ g_amt_in_txt.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 07:22:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998273#M955277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T07:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998274#M955278</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;  You can use split at space for splitting the string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Veeresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 07:25:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998274#M955278</guid>
      <dc:creator>former_member673464</dc:creator>
      <dc:date>2008-06-13T07:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998275#M955279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pls give me a small example how to do it&lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;uday&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 07:35:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998275#M955279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T07:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998276#M955280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SPLIT f AT g INTO TABLE itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

TYPES: BEGIN OF ITAB_TYPE, 
        WORD(20), 
      END   OF ITAB_TYPE. 

DATA: ITAB TYPE STANDARD TABLE OF ITAB_TYPE WITH 
                NON-UNIQUE DEFAULT KEY INITIAL SIZE 5. 

SPLIT 'STOP Two STOP Three STOP   ' AT 'STOP' INTO TABLE ITAB. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB now has three rows. The first is empty, the second contains ' Two', and the third ' Three'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, you should split at SPACE.&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;Saket&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 07:40:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998276#M955280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T07:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998277#M955281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can split the string into an internal table of string type data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split DATA at space INTO T_TABLE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 07:41:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998277#M955281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T07:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998278#M955282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Annavarapu,&lt;/P&gt;&lt;P&gt;Try this.This will work.&lt;/P&gt;&lt;P&gt;Suppose the string is str.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : str(255) value 'Type a reply to the thread using the form below',&lt;/P&gt;&lt;P&gt;      str1 type string,&lt;/P&gt;&lt;P&gt;      str2 type string,&lt;/P&gt;&lt;P&gt;       i1 type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i1 = 20.&lt;/P&gt;&lt;P&gt;if str+i1 is not initial.&lt;/P&gt;&lt;P&gt;if str+i1(1) = ''.&lt;/P&gt;&lt;P&gt;   str1 = str(i1).&lt;/P&gt;&lt;P&gt;   str2 = str+i1.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;   do.&lt;/P&gt;&lt;P&gt;      i1 = i1 + 1.&lt;/P&gt;&lt;P&gt;      if str+i1(1) = ''.&lt;/P&gt;&lt;P&gt;         str1 = str(i1).&lt;/P&gt;&lt;P&gt;         str2 = str+i1.&lt;/P&gt;&lt;P&gt;         exit.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;   enddo.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if found useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Megha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 07:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998278#M955282</guid>
      <dc:creator>megha_h</dc:creator>
      <dc:date>2008-06-13T07:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998279#M955283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: str1 type string.&lt;/P&gt;&lt;P&gt;data: str2 type string.&lt;/P&gt;&lt;P&gt;data: str type string value 'one two three four five six seven eight nine ten eleven twelve thirteen'.&lt;/P&gt;&lt;P&gt;data: len type i,&lt;/P&gt;&lt;P&gt;      del(1) value '',&lt;/P&gt;&lt;P&gt;pos type i.&lt;/P&gt;&lt;P&gt;len = STRLEN( str ).&lt;/P&gt;&lt;P&gt;pos =  len - 15.&lt;/P&gt;&lt;P&gt;write:/ len.&lt;/P&gt;&lt;P&gt;write:/ pos.&lt;/P&gt;&lt;P&gt;do len times.&lt;/P&gt;&lt;P&gt;   if space BETWEEN pos and len.&lt;/P&gt;&lt;P&gt;     if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  split str at del into str1 str2.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;write:/ str , 'this is string',&lt;/P&gt;&lt;P&gt;      / str1,&lt;/P&gt;&lt;P&gt;      / str2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;pls correct me&lt;/P&gt;&lt;P&gt;how to do it&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;uday&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 09:50:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998279#M955283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T09:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998280#M955284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uday,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if space BETWEEN pos and len.&lt;/P&gt;&lt;P&gt;split str at del into str1 str2.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it should work without do loop also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Megha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 11:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998280#M955284</guid>
      <dc:creator>megha_h</dc:creator>
      <dc:date>2008-06-13T11:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998281#M955285</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;Use CALL FUNCTION 'RKD_WORD_WRAP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raju Chitale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 11:40:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998281#M955285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T11:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998282#M955286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EHS00_WORDWRAP02&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2008 11:56:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998282#M955286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-13T11:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998283#M955287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;can u give me an example pls, &lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;uday&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 01:34:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998283#M955287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T01:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998284#M955288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;rkd_word_wrap is working fine but the length is only 35.&lt;/P&gt;&lt;P&gt;am going to try EHS00_WORDWRAP02&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;uday&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 01:59:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998284#M955288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T01:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998285#M955289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;thanks a lot to each n everyone who responded thanks a lot&lt;/P&gt;&lt;P&gt;raju the one u suggested is working fine&lt;/P&gt;&lt;P&gt;done a good job thanks a lot&lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;uday&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2008 02:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998285#M955289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-16T02:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998286#M955290</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;this is how it is solved once again thks to all of  u&lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;uday&lt;/P&gt;&lt;P&gt;TABLES: payr_fi, spell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;     fr_line1(50),&lt;/P&gt;&lt;P&gt; end of itab.&lt;/P&gt;&lt;P&gt;PARAMETERS:&lt;/P&gt;&lt;P&gt;            lang      LIKE sy-langu            DEFAULT sy-langu NO-DISPLAY,    "language&lt;/P&gt;&lt;P&gt;            curr      LIKE payr_fi-waers       DEFAULT 'SGD' NO-DISPLAY,  " currency&lt;/P&gt;&lt;P&gt;            amount    LIKE payr_fi-rwbtr       DEFAULT '123456789.12'.  " AMOUNT       1000.66&lt;/P&gt;&lt;P&gt;DATA: doll TYPE string, " this is for  dollars&lt;/P&gt;&lt;P&gt;     cent TYPE string,  "  this is for cents&lt;/P&gt;&lt;P&gt;     str5 type string value 'Cents', " this is for Cents&lt;/P&gt;&lt;P&gt;     str6 type string, " this is for final output&lt;/P&gt;&lt;P&gt;     str7 type string value 'only',&lt;/P&gt;&lt;P&gt;     str8 type string,&lt;/P&gt;&lt;P&gt;     str9 type string,&lt;/P&gt;&lt;P&gt;     i_char(100) type c.&lt;/P&gt;&lt;P&gt;data: i_char1 type CHAR512.        " this is for  word wrap02 function module&lt;/P&gt;&lt;P&gt;data: fr_line(75) type c,&lt;/P&gt;&lt;P&gt;     sr_line(100) type c.&lt;/P&gt;&lt;P&gt;data: l_var1(50) type c,&lt;/P&gt;&lt;P&gt;      l_var2(200) type c.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'SPELL_AMOUNT'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;     language = lang&lt;/P&gt;&lt;P&gt;     currency = curr&lt;/P&gt;&lt;P&gt;     amount   = amount&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     in_words = spell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MOVE spell-word TO doll.&lt;/P&gt;&lt;P&gt; MOVE spell-decword TO cent.&lt;/P&gt;&lt;P&gt;CONCATENATE str5 cent str7 into str8 SEPARATED BY space.&lt;/P&gt;&lt;P&gt; CONCATENATE doll str8 into str9 SEPARATED BY '  AND  '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move str9 to i_char1.&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'IQAPI_WORD_WRAP'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;     textline                  = i_char1&lt;/P&gt;&lt;P&gt;    DELIMITER                 = ' '&lt;/P&gt;&lt;P&gt;    OUTPUTLEN                 = 50&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    OUT_LINE1                 = fr_line&lt;/P&gt;&lt;P&gt;    OUT_LINE2                 = sr_line&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OUT_LINE3                 =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    OUT_LINES                 = itab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OUTPUTLEN_TOO_LARGE       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OTHERS                    = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           .&lt;/P&gt;&lt;P&gt; IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;  loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-tabix = 1.&lt;/P&gt;&lt;P&gt;      l_var1 = itab-fr_line1.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      concatenate l_var2 itab-fr_line1 into l_var2.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write:/ l_var1.&lt;/P&gt;&lt;P&gt;  write:/ l_var2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 05:52:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-string/m-p/3998286#M955290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T05:52:00Z</dc:date>
    </item>
  </channel>
</rss>

