<?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: Issue with SPLIT statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561160#M1431370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;VALUE = ' 1 2 3 4'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sPLIT VALUE AT SPACE INTO BLANK1 ACTUAL1 BLANK2 ACTUAL2 BLANK3 ACTUAL3 BLANK4 ACTUAL4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your case Split statement splits the string when the space occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is why you are getting the wrong result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify your statement as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VALUE = ' 1 2 3 4'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT VALUE AT SPACE INTO ACTUAL1 ACTUAL2 ACTUAL3 ACTUAL4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you will get the output as you want i.e.&lt;/P&gt;&lt;P&gt;ACTUAL1 = 1&lt;/P&gt;&lt;P&gt;ACTUAL2 = 2&lt;/P&gt;&lt;P&gt;ACTUAL3 = 3&lt;/P&gt;&lt;P&gt;ACTUAL4 = 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details of split statement read F1 help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Feb 2010 06:39:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-19T06:39:09Z</dc:date>
    <item>
      <title>Issue with SPLIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561157#M1431367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VALUE =  ' 1 2 3 4'.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sPLIT VALUE AT SPACE INTO BLANK1 ACTUAL1 BLANK2 ACTUAL2 BLANK3 ACTUAL3 BLANK4 ACTUAL4&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;O/P IS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BLANK1 =&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL1 =  1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BLANK2 =   2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL2 =  3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BLANK3 =   4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL3 =&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BLANK4 =&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL4 =&lt;/STRONG&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;VALUE =  ' 1   3 4'.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sPLIT VALUE AT SPACE INTO BLANK1 ACTUAL1 BLANK2 ACTUAL2 BLANK3 ACTUAL3 BLANK4 ACTUAL4&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;O/P IS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BLANK1 =&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL1 =  1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BLANK2 =&lt;/STRONG&gt;   &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL2 =&lt;/STRONG&gt;  &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BLANK3 =   3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL3 =  4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BLANK4 =&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL4 =&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting strange results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actual this is what im trying to achieve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 4 words(1 or more characters) separted by single space some times the words may be space(just 1space) by itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i expect to get my words in to actuals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 case &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expected the output to be &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL1 = 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL2 = 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL3 = 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL4 = 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expected the output to be &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL1 = 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL2 =&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL3 = 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ACTUAL4 = 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me as to where i'm missing the trick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kajol sindi on Feb 18, 2010 9:51 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 20:51:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561157#M1431367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T20:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with SPLIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561158#M1431368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don´t understand the second case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You say the words are separated by a space and a word can be a space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case, to get the result you are expecting I would imply that the value you are looking is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;VALUE = ' 1  3 4'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;note the two spaces between 1 and 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 21:16:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561158#M1431368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T21:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with SPLIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561159#M1431369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; I think you got confused with SPILT Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT command is used to split a string into different varaibles.This is will be done on the basis character which you specify as pivot point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex:str = "This is text for example".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT  AT SPACE into VAR1 VAR2 VAR3 VAR4 VAR5.&lt;/P&gt;&lt;P&gt;Which will split into:&lt;/P&gt;&lt;P&gt; THIS into VAR1, IS into VAR2, TEXT into VAR3, FOR into VAR4, EXAMPLE into VAR5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will not consider space for splitting into any varaible.SPACE is just considered as a point where should the split occurs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your Split statement should look like this.&lt;/P&gt;&lt;P&gt;VALUE = '1 2 3 4'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT VALUE AT SPACE INTO ACTUAL1 ACTUAL2  ACTUAL3 ACTUAL4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will have the required output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vamsi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 05:49:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561159#M1431369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-19T05:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with SPLIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561160#M1431370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;VALUE = ' 1 2 3 4'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sPLIT VALUE AT SPACE INTO BLANK1 ACTUAL1 BLANK2 ACTUAL2 BLANK3 ACTUAL3 BLANK4 ACTUAL4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your case Split statement splits the string when the space occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is why you are getting the wrong result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify your statement as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VALUE = ' 1 2 3 4'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT VALUE AT SPACE INTO ACTUAL1 ACTUAL2 ACTUAL3 ACTUAL4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you will get the output as you want i.e.&lt;/P&gt;&lt;P&gt;ACTUAL1 = 1&lt;/P&gt;&lt;P&gt;ACTUAL2 = 2&lt;/P&gt;&lt;P&gt;ACTUAL3 = 3&lt;/P&gt;&lt;P&gt;ACTUAL4 = 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details of split statement read F1 help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 06:39:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561160#M1431370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-19T06:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with SPLIT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561161#M1431371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can just split it into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split lv_string at space into table itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 08:36:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-split-statement/m-p/6561161#M1431371</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-02-19T08:36:10Z</dc:date>
    </item>
  </channel>
</rss>

