<?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: string in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478066#M836106</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. SPLIT Canada41890-01  AT a INTO h1 ... hn. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you can split the string Canada41890-01  in to 2 parts h1 and h2 at delimeter a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. SPLIT f AT g INTO TABLE itab. &lt;/P&gt;&lt;P&gt;you can even add it as directly into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;syntax:&lt;/P&gt;&lt;P&gt;SPLIT c AT &amp;lt;del&amp;gt; INTO c1 ... cn.&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;SPLIT c AT &amp;lt;del&amp;gt; INTO table &amp;lt;internal table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where, del = delimeter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of wa,&lt;/P&gt;&lt;P&gt;text type string,&lt;/P&gt;&lt;P&gt;end of wa.&lt;/P&gt;&lt;P&gt;data: itab like table of wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: st type string value 'I am new to ABAP'.&lt;/P&gt;&lt;P&gt;data: st1 type string,&lt;/P&gt;&lt;P&gt;st2 type string,&lt;/P&gt;&lt;P&gt;st3 type string,&lt;/P&gt;&lt;P&gt;st4 type string,&lt;/P&gt;&lt;P&gt;st5 type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split st at space into st1 st2 st3 st4 st5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split st at space into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandru&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chandra Prakash on Mar 5, 2008 12:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Mar 2008 06:49:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-05T06:49:22Z</dc:date>
    <item>
      <title>string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478063#M836103</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 want to split text like below&lt;/P&gt;&lt;P&gt;Canada41890-01 into Canada 41890-01 how to do that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 06:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478063#M836103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T06:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478064#M836104</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;SPLIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Splits a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT &amp;lt;c&amp;gt; AT &amp;lt;del&amp;gt; INTO &amp;lt;c1&amp;gt;... &amp;lt;cn&amp;gt; INTO TABLE &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt;                  [IN BYTE MODE|IN CHARACTER MODE].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement searches the character field &amp;lt;c&amp;gt; for delimiter strings &amp;lt;del&amp;gt; and the parts before and after the delimiters are placed in the target fields &amp;lt;c1&amp;gt; ...&amp;gt; &amp;#133; &amp;lt;cn&amp;gt;, or into a new line of the internal table &amp;lt;itab&amp;gt;. In Unicode programs, you must specify whether the statement is a character or byte operation, using the IN BYTE MODE or IN CHARACTER MODE (default) additions&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;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 06:46:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478064#M836104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T06:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478065#M836105</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;Variable&lt;EM&gt;8(6) Variable&lt;/EM&gt;6(8)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shibin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 06:49:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478065#M836105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T06:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478066#M836106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. SPLIT Canada41890-01  AT a INTO h1 ... hn. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you can split the string Canada41890-01  in to 2 parts h1 and h2 at delimeter a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. SPLIT f AT g INTO TABLE itab. &lt;/P&gt;&lt;P&gt;you can even add it as directly into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;syntax:&lt;/P&gt;&lt;P&gt;SPLIT c AT &amp;lt;del&amp;gt; INTO c1 ... cn.&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;SPLIT c AT &amp;lt;del&amp;gt; INTO table &amp;lt;internal table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where, del = delimeter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of wa,&lt;/P&gt;&lt;P&gt;text type string,&lt;/P&gt;&lt;P&gt;end of wa.&lt;/P&gt;&lt;P&gt;data: itab like table of wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: st type string value 'I am new to ABAP'.&lt;/P&gt;&lt;P&gt;data: st1 type string,&lt;/P&gt;&lt;P&gt;st2 type string,&lt;/P&gt;&lt;P&gt;st3 type string,&lt;/P&gt;&lt;P&gt;st4 type string,&lt;/P&gt;&lt;P&gt;st5 type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split st at space into st1 st2 st3 st4 st5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split st at space into table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandru&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chandra Prakash on Mar 5, 2008 12:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 06:49:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478066#M836106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T06:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478067#M836107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the function module   &lt;STRONG&gt;'G_SPLIT_LINE'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CLEAR str_len .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str_len = strlen( w_string ) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF str_len GT split_len .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'G_SPLIT_LINE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;   input_line = w_string&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;   export_lines = split_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Updating the internal table of structure TLINE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT split_tab .&lt;/P&gt;&lt;P&gt;   MOVE split_tab-txt_line TO txt_tab-tdline .&lt;/P&gt;&lt;P&gt;   APPEND txt_tab .&lt;/P&gt;&lt;P&gt;ENDLOOP .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;do reward if useful&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 06:54:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478067#M836107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T06:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478068#M836108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;jim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If text has constant value like  first 6 chars next intergers then we can use directly &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : v_char(100) TYPE C VALUE &lt;/P&gt;&lt;P&gt;            'Canada41890-01 into Canada 41890-01',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            v_char1(10) ,&lt;/P&gt;&lt;P&gt;            v_char2(20) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_char1  =   v_char+0(6).&lt;/P&gt;&lt;P&gt;v_char2 =  v_char+6(8).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CONCATENATE v_char1 v_char2 INTO v_char SEPERATED BY &lt;/P&gt;&lt;P&gt; space.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 06:59:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478068#M836108</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T06:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478069#M836109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;v_str = 'Canada41890-01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_str1 = v_str+0(6).&lt;/P&gt;&lt;P&gt;v_str2 = v_str+6(8).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 07:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478069#M836109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T07:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: string</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478070#M836110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG&gt;JIM&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  v_char(32) TYPE c,&lt;/P&gt;&lt;P&gt;  v_char1(16) TYPE c,&lt;/P&gt;&lt;P&gt;  v_char2(16) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_char = 'Canada41890-01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_char1 = v_char+0(6).&lt;/P&gt;&lt;P&gt;v_char2 = v_char+6(8).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR v_char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE v_char1 v_char2 INTO v_char &lt;/P&gt;&lt;P&gt;SEPARATED BY space.&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>Wed, 05 Mar 2008 07:13:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string/m-p/3478070#M836110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T07:13:06Z</dc:date>
    </item>
  </channel>
</rss>

