<?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 field in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512448#M844892</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;i have field type char40 (name) with 4 words and space between them &lt;/P&gt;&lt;P&gt;what is the best way to part the word to 4 different fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name &lt;/P&gt;&lt;P&gt;abc  defg  aaaa bbbb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i wont&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field1 - abc&lt;/P&gt;&lt;P&gt;field2 - defg&lt;/P&gt;&lt;P&gt;field3 - aaaa&lt;/P&gt;&lt;P&gt;field4 - bbbb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Mar 2008 12:27:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-11T12:27:11Z</dc:date>
    <item>
      <title>split field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512448#M844892</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;i have field type char40 (name) with 4 words and space between them &lt;/P&gt;&lt;P&gt;what is the best way to part the word to 4 different fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name &lt;/P&gt;&lt;P&gt;abc  defg  aaaa bbbb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i wont&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field1 - abc&lt;/P&gt;&lt;P&gt;field2 - defg&lt;/P&gt;&lt;P&gt;field3 - aaaa&lt;/P&gt;&lt;P&gt;field4 - bbbb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 12:27:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512448#M844892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T12:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: split field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512449#M844893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Key word SPLIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: str1 TYPE string, &lt;/P&gt;&lt;P&gt;      str2 TYPE string, &lt;/P&gt;&lt;P&gt;      str3 TYPE string, &lt;/P&gt;&lt;P&gt;      itab TYPE TABLE OF string, &lt;/P&gt;&lt;P&gt;      text TYPE string. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text = 'What a drag it is getting old'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT text AT space INTO: str1 str2 str3, &lt;/P&gt;&lt;P&gt;                          TABLE itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vinayak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 12:30:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512449#M844893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T12:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: split field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512450#M844894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;          field(20),&lt;/P&gt;&lt;P&gt;         end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT name at ' ' into itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(OR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: f1(20), f2(20), f3(20), f4(20).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Split name at ' ' into f1 f2 f3 f4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;awrd points if useful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bhupal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 12:30:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512450#M844894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T12:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: split field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512451#M844895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please Use the code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: NAMES(40)    TYPE C VALUE 'abc defg aaaa bbbb',&lt;/P&gt;&lt;P&gt;      ONE(10)      TYPE C,&lt;/P&gt;&lt;P&gt;      TWO(10)      TYPE C,&lt;/P&gt;&lt;P&gt;      THREE(10)    TYPE C,&lt;/P&gt;&lt;P&gt;      FOUR(10)     TYPE C.&lt;/P&gt;&lt;P&gt;SPLIT NAMES AT ' ' INTO ONE TWO THREE FOUR.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;  ONE , TWO , THREE , FOUR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 12:35:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512451#M844895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T12:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: split field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512452#M844896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending on if you have a known number of words or not, both options shown here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
  text40(40).

DATA:
  f1(40),
  f2(40),
  f3(40),
  f4(40).

DATA:
  BEGIN OF out_rec,
    fld(40),
  END OF out_rec,
  it_tab LIKE STANDARD TABLE OF out_rec.

START-OF-SELECTION.

  text40 = 'Field1 Field2 Field3 Field4'.

  SPLIT text40 AT space INTO f1 f2 f3 f4.

  REFRESH it_tab.

  SPLIT text40 AT space INTO TABLE it_tab.

  WRITE:/ f1, f2, f3, f4.

  LOOP AT it_tab INTO out_rec.
    WRITE:/ out_rec-fld.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 12:36:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512452#M844896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T12:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: split field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512453#M844897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
"If your filed always contains 4 fields separated by space
"then use following method otherwise use TABLE.

DATA: name1 TYPE string,
      name2 TYPE string,
      name3 TYPE string,
      name4 TYPE string,
      name  TYPE string.

name = 'abc defg aaaa bbbb'.

SPLIT name AT space INTO : name1
                           name2
                           name3
                           name4.

WRITE :/ name1,
       / name2,
       / name2,
       / name4.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 12:40:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512453#M844897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T12:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: split field</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512454#M844898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split name at space into field1 field2 field3 field4.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 12:41:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-field/m-p/3512454#M844898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T12:41:32Z</dc:date>
    </item>
  </channel>
</rss>

