<?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: splitting the value into 2 variables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-value-into-2-variables/m-p/7354540#M1541124</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;Do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab into wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa1-var1 = wa-f1+0(2) -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&amp;gt;XX&lt;/P&gt;&lt;P&gt;wa1-var2 = wa-f1+2(3) -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&amp;gt;123&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append wa1 to itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Oct 2010 12:01:13 GMT</pubDate>
    <dc:creator>former_member386202</dc:creator>
    <dc:date>2010-10-08T12:01:13Z</dc:date>
    <item>
      <title>splitting the value into 2 variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-value-into-2-variables/m-p/7354538#M1541122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;i've an internal table with following entry.&lt;/P&gt;&lt;P&gt;xx123&lt;/P&gt;&lt;P&gt;xx231&lt;/P&gt;&lt;P&gt;xy546&lt;/P&gt;&lt;P&gt;xy987&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to seperate into 2 variables and put in different internal table how to do this&lt;/P&gt;&lt;P&gt;var1 = xx var2 123&lt;/P&gt;&lt;P&gt;var1 = xx var2 231&lt;/P&gt;&lt;P&gt;var1 = xy var&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Oct 2010 11:42:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-value-into-2-variables/m-p/7354538#M1541122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-08T11:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the value into 2 variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-value-into-2-variables/m-p/7354539#M1541123</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;If the length of the value is fixed you can split the value as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 = value+0(2).&lt;/P&gt;&lt;P&gt;var2 = value+2(3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Oct 2010 11:48:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-value-into-2-variables/m-p/7354539#M1541123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-08T11:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the value into 2 variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-value-into-2-variables/m-p/7354540#M1541124</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;Do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab into wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa1-var1 = wa-f1+0(2) -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&amp;gt;XX&lt;/P&gt;&lt;P&gt;wa1-var2 = wa-f1+2(3) -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&amp;gt;123&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append wa1 to itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Oct 2010 12:01:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-value-into-2-variables/m-p/7354540#M1541124</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2010-10-08T12:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the value into 2 variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-value-into-2-variables/m-p/7354541#M1541125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as you are working with flat character-type structured table this is easy&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES t_field TYPE c LENGTH 5.

DATA gt_in TYPE TABLE OF t_field WITH HEADER LINE.
APPEND: 'xx123' TO gt_in,
        'xx231' TO gt_in,
        'xy546' TO gt_in,
        'xy987' TO gt_in.

TYPES: BEGIN OF t_out,
        field TYPE c LENGTH 2,
        field2 TYPE c LENGTH 3,
       END OF t_out.
DATA: gt_out TYPE TABLE OF t_out.

FIELD-SYMBOLS &amp;lt;out_tab&amp;gt; TYPE t_out.

LOOP AT gt_in.
  ASSIGN gt_in TO &amp;lt;out_tab&amp;gt; CASTING.
  APPEND &amp;lt;out_tab&amp;gt; TO gt_out.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please note! Such casting is however not possible in Unicode system if source structure (line type of table GT_IN) has X type or is deep one. Otherwise you can have any target structure assuming the length of both is the same and components are mappable (are of  character type too).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Oct 2010 12:20:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-value-into-2-variables/m-p/7354541#M1541125</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-10-08T12:20:13Z</dc:date>
    </item>
  </channel>
</rss>

