<?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: About split command....? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391804#M531982</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;To split a character string into two or more smaller strings, use the SPLIT statement as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SPLIT &amp;lt;c&amp;gt; AT &amp;lt;del&amp;gt; INTO &amp;lt;c1&amp;gt; ... &amp;lt;cn&amp;gt;.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system searches the field &amp;lt;c&amp;gt; for the separator &amp;lt;del&amp;gt;. The parts before and after the separator are placed in the target fields &amp;lt;c1&amp;gt; ... &amp;lt;cn&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: STRING(60),
P1(20) VALUE '++++++++++++++++++++',
P2(20) VALUE '++++++++++++++++++++',
P3(20) VALUE '++++++++++++++++++++',
P4(20) VALUE '++++++++++++++++++++',
DEL(3) VALUE '***'.

STRING = ' Part 1 *** Part 2 *** Part 3 *** Part 4 *** Part 5'.
WRITE STRING.

SPLIT STRING AT DEL INTO P1 P2 P3 P4.

WRITE / P1.
WRITE / P2.
WRITE / P3.
WRITE / P4.

&amp;lt;b&amp;gt;The output appears as follows:&amp;lt;/b&amp;gt;

Part 1 *** Part 2 *** Part 3 *** Part 4 *** Part 5

Part 1

Part 2

Part 3

Part 4 *** Part 5&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ashokreddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2007 07:33:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-18T07:33:07Z</dc:date>
    <item>
      <title>About split command....?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391803#M531981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kindly let me know how to use the split command, pls give me one example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aksitha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 07:25:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391803#M531981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T07:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: About split command....?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391804#M531982</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;To split a character string into two or more smaller strings, use the SPLIT statement as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SPLIT &amp;lt;c&amp;gt; AT &amp;lt;del&amp;gt; INTO &amp;lt;c1&amp;gt; ... &amp;lt;cn&amp;gt;.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system searches the field &amp;lt;c&amp;gt; for the separator &amp;lt;del&amp;gt;. The parts before and after the separator are placed in the target fields &amp;lt;c1&amp;gt; ... &amp;lt;cn&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: STRING(60),
P1(20) VALUE '++++++++++++++++++++',
P2(20) VALUE '++++++++++++++++++++',
P3(20) VALUE '++++++++++++++++++++',
P4(20) VALUE '++++++++++++++++++++',
DEL(3) VALUE '***'.

STRING = ' Part 1 *** Part 2 *** Part 3 *** Part 4 *** Part 5'.
WRITE STRING.

SPLIT STRING AT DEL INTO P1 P2 P3 P4.

WRITE / P1.
WRITE / P2.
WRITE / P3.
WRITE / P4.

&amp;lt;b&amp;gt;The output appears as follows:&amp;lt;/b&amp;gt;

Part 1 *** Part 2 *** Part 3 *** Part 4 *** Part 5

Part 1

Part 2

Part 3

Part 4 *** Part 5&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ashokreddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 07:33:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391804#M531982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T07:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: About split command....?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391805#M531983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;           OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    PERFORM messaging USING 'E' '001' text-e10 p_file space space.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;      READ DATASET P_file INTO WA .&lt;/P&gt;&lt;P&gt;      IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      REPLACE ALL OCCURRENCES OF '"' IN WA WITH ''.&lt;/P&gt;&lt;P&gt;      CONDENSE WA NO-GAPS.&lt;/P&gt;&lt;P&gt;      SPLIT WA AT CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB&lt;/P&gt;&lt;P&gt;      INTO wa_infile.&lt;/P&gt;&lt;P&gt;      append wa_infile to it_infile.&lt;/P&gt;&lt;P&gt;      clear wa_infile.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;  endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 07:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391805#M531983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T07:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: About split command....?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391806#M531984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : itab type table of string with header line.&lt;/P&gt;&lt;P&gt;Data : str type string value 'ABC DEF GHI'.&lt;/P&gt;&lt;P&gt;SPLIT str AT space INTO TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the itab will have 3 entris 1)ABC 2)DEF 3)GHI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward for all uaseful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 07:42:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391806#M531984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T07:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: About split command....?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391807#M531985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: str1 TYPE string, 
      str2 TYPE string, 
      str3 TYPE string, 
      itab TYPE TABLE OF string, 
      text TYPE string. 

text = `What a drag it is getting old`. 

SPLIT text AT space INTO: str1 str2 str3, 
                          TABLE itab. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The text field text is separated at its blank characters, into the three strings str1, str2, and str3, and then into an internal table with the line type string. As the three strings are not sufficient for all seven parts, after the separation, str3 contains "drag it is getting old", while the internal table contains seven lines; one for each word in text. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points  if it is usefull ...&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 09:21:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-split-command/m-p/2391807#M531985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T09:21:11Z</dc:date>
    </item>
  </channel>
</rss>

