<?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: Spliting the data at '##' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677027#M1099922</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;Try with following code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:
begin of wa,
data type string,
end of wa.

data:
itab like standard table of wa with header line.

split p_content at '##' into itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Navneeth K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Oct 2008 11:37:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-17T11:37:45Z</dc:date>
    <item>
      <title>Spliting the data at '##'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677026#M1099921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to pick the data form CSV file using BSP and upload the data in SNC DB table, Following are the steps used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Data is picked from BSP using upload ?= cl_htmlb_manager=&amp;gt;get_data( request = request id = 'FileUpload' name = 'fileUpload' ).&lt;/P&gt;&lt;P&gt;2) Above step gives the data in XString format. Next step is to convert the data from XString to string type. For which i have used    CALL FUNCTION 'CRM_IC_XML_XSTRING2STRING'&lt;/P&gt;&lt;P&gt;         EXPORTING inxstring = filexstring&lt;/P&gt;&lt;P&gt;         IMPORTING outstring = filestring.&lt;/P&gt;&lt;P&gt;3) I'm passing the above string (data in filestring) from BSP to a FM where i can update the SNC DB table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now Complete data of CSV file is in a single string type variable(say p_content) in which every row of CSV file is separated by '##', so to update the DB table i'm trying to split the string variable(p_content) at '##'. but split is not working in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Split works properly when i test my logic by hardcoding the above data in FM, but doesn't work when content is passed dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me some workaround to rectify the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tarun Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 11:35:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677026#M1099921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T11:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting the data at '##'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677027#M1099922</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;Try with following code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:
begin of wa,
data type string,
end of wa.

data:
itab like standard table of wa with header line.

split p_content at '##' into itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Navneeth K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 11:37:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677027#M1099922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T11:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting the data at '##'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677028#M1099923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can split using the CR_LF(carrage rerurn and line feed = '##' )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so split at &lt;STRONG&gt;cl_abap_char_utilities=&amp;gt;cr_lf&lt;/STRONG&gt; and you will get each row separately.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 11:37:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677028#M1099923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T11:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting the data at '##'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677029#M1099924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tarun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this class, even i faced one time same problem. I got solved by using this class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class CL_ABAP_CHAR_UTILITIES definition load.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;split text at CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB into it_txt-time&lt;/P&gt;&lt;P&gt;it_txt-date it_txt-num  it_txt-num1 it_txt-event_id it_txt-usrname&lt;/P&gt;&lt;P&gt;it_txt-servername in character mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;shankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 11:38:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677029#M1099924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T11:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting the data at '##'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677030#M1099925</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;Check this example .. Hope this will help you.&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;      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##drag `. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT text AT '##' INTO: str1 str2, TABLE itab.&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, 17 Oct 2008 11:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677030#M1099925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-17T11:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting the data at '##'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677031#M1099926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;For this sort of problem we need to carriage return and line feed.&lt;/P&gt;&lt;P&gt;This is the abap class we need to mention at the starting of the program .&lt;/P&gt;&lt;P&gt;class CL_ABAP_CHAR_UTILITIES definition load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT TEXT cl_abap_char_utilites=&amp;gt;horizontal_tab&lt;/P&gt;&lt;P&gt;WITH space INTO text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bharani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 11:43:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677031#M1099926</guid>
      <dc:creator>BH2408</dc:creator>
      <dc:date>2008-10-17T11:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Spliting the data at '##'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677032#M1099927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot   Vijay Babu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your suggestion was helpful.&lt;/P&gt;&lt;P&gt;Split worked using:&lt;/P&gt;&lt;P&gt;SPLIT l_string at cl_abap_char_utilities=&amp;gt;cr_lf INTO l_temp l_temp1 in CHARACTER MODE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 03:46:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spliting-the-data-at/m-p/4677032#M1099927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-20T03:46:28Z</dc:date>
    </item>
  </channel>
</rss>

