<?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: exporting internal table to memory variable in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393258#M532408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, well maybe you don't need the [],  Naren's solution should work if you are exporting and importing within the same internal session.  So if you are bouceing around different work processes, then no it will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give the memory ids as uppercase, not sure it makes a difference and make sure that T_DATA is defined exactly the same in both programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jun 2007 16:20:40 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-06-07T16:20:40Z</dc:date>
    <item>
      <title>exporting internal table to memory variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393254#M532404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to extract some data within a program into an internal table. Then I need to export the internal table into a memory variable &lt;/P&gt;&lt;P&gt;Then in another program i need to import this memory variable into another internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do the import export into a memory variable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 15:46:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393254#M532404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T15:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: exporting internal table to memory variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393255#M532405</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;You can use EXPORT ..IMPORT..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: t_data type standard table of string.

* Export to memory
EXPORT t_data TO MEMORY ID 'ZMY_ID'.


* Import from memory
IMPORT t_data FROM MEMORY ID 'ZMY_ID'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 15:48:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393255#M532405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T15:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: exporting internal table to memory variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393256#M532406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;export itab[] = itab[] to memory id 'ZTEST'.


import itab[] = itab[] from memory id 'ZTEST'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 15:49:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393256#M532406</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-06-07T15:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: exporting internal table to memory variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393257#M532407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried both the above ways and they dont work. &lt;/P&gt;&lt;P&gt;Using export t_data[] = t_data[] to memory id 'my_id'. &lt;/P&gt;&lt;P&gt;gives error In Unicode programs, the "[" character cannot appear in names, as it		&lt;/P&gt;&lt;P&gt;does here in the name "T_DATA[]".		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORT t_data to MEMORY ID 'my_id'. &lt;/P&gt;&lt;P&gt;IMPORT t_data from MEMORY ID 'my_id'. does not work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 16:17:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393257#M532407</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T16:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: exporting internal table to memory variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393258#M532408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, well maybe you don't need the [],  Naren's solution should work if you are exporting and importing within the same internal session.  So if you are bouceing around different work processes, then no it will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give the memory ids as uppercase, not sure it makes a difference and make sure that T_DATA is defined exactly the same in both programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 16:20:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393258#M532408</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-06-07T16:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: exporting internal table to memory variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393259#M532409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See the simple example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST_AMEM1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : lfa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of i_lfa1 occurs 0 ,&lt;/P&gt;&lt;P&gt;       lifnr like lfa1-lifnr,&lt;/P&gt;&lt;P&gt;       name1 like lfa1-name1,&lt;/P&gt;&lt;P&gt;       land1 like lfa1-land1,&lt;/P&gt;&lt;P&gt;       end of i_lfa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lifnr&lt;/P&gt;&lt;P&gt;       name1&lt;/P&gt;&lt;P&gt;       land1 from lfa1&lt;/P&gt;&lt;P&gt;       into table i_lfa1 up to 100 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Export&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;export i_lfa1 to memory id 'SAP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;submit ztest_amem2 and return.&lt;/P&gt;&lt;P&gt;write:/ 'hello'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZTEST_AMEM2&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST_AMEM2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of j_lfa1 occurs 0,&lt;/P&gt;&lt;P&gt;       lifnr like lfa1-lifnr,&lt;/P&gt;&lt;P&gt;       name1 like lfa1-name1,&lt;/P&gt;&lt;P&gt;       land1 like lfa1-land1,&lt;/P&gt;&lt;P&gt;       end of j_lfa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import i_lfa1 to j_lfa1 from memory id 'SAP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at j_lfa1.&lt;/P&gt;&lt;P&gt;write:/ j_lfa1-lifnr,j_lfa1-name1,j_lfa1-land1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 16:21:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393259#M532409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T16:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: exporting internal table to memory variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393260#M532410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seshu ... your code does not work. Narender has the same problem. &lt;/P&gt;&lt;P&gt;I put sy-subrc after IMPORT, and it outputs 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables : lfa1.
data : begin of i_lfa1 occurs 0 ,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
land1 like lfa1-land1,
end of i_lfa1.

start-of-selection.
select lifnr
name1
land1 from lfa1
into table i_lfa1 up to 100 rows.

* Export
export i_lfa1 to memory id 'SAP'.

submit Z_SD_TEST2 and return.
write:/ 'hello'.


data : begin of j_lfa1 occurs 0,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
land1 like lfa1-land1,
end of j_lfa1.
start-of-selection.

import i_lfa1 to j_lfa1 from memory id 'SAP'.
write sy-subrc.
loop at j_lfa1.
write:/ j_lfa1-lifnr,j_lfa1-name1,j_lfa1-land1.
endloop. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Megan Flores&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Megan Flores&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 16:32:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393260#M532410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T16:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: exporting internal table to memory variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393261#M532411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tested at my system and it works great ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is one program :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report x.&lt;/P&gt;&lt;P&gt;tables : lfa1.&lt;/P&gt;&lt;P&gt;data : begin of i_lfa1 occurs 0 ,&lt;/P&gt;&lt;P&gt;lifnr like lfa1-lifnr,&lt;/P&gt;&lt;P&gt;name1 like lfa1-name1,&lt;/P&gt;&lt;P&gt;land1 like lfa1-land1,&lt;/P&gt;&lt;P&gt;end of i_lfa1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;select lifnr&lt;/P&gt;&lt;P&gt;name1&lt;/P&gt;&lt;P&gt;land1 from lfa1&lt;/P&gt;&lt;P&gt;into table i_lfa1 up to 100 rows.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Export&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;export i_lfa1 to memory id 'SAP'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;submit Z_SD_TEST2 and return.&lt;/P&gt;&lt;P&gt;write:/ 'hello'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to create one more program :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program name : Z_SD_TEST2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this program : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of j_lfa1 occurs 0,&lt;/P&gt;&lt;P&gt;lifnr like lfa1-lifnr,&lt;/P&gt;&lt;P&gt;name1 like lfa1-name1,&lt;/P&gt;&lt;P&gt;land1 like lfa1-land1,&lt;/P&gt;&lt;P&gt;end of j_lfa1.&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;import i_lfa1 to j_lfa1 from memory id 'SAP'.&lt;/P&gt;&lt;P&gt;write sy-subrc.&lt;/P&gt;&lt;P&gt;loop at j_lfa1.&lt;/P&gt;&lt;P&gt;write:/ j_lfa1-lifnr,j_lfa1-name1,j_lfa1-land1.&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen sy-subrc = 0 and even j_lfa1 internal has 100 records..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 16:55:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393261#M532411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T16:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: exporting internal table to memory variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393262#M532412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks .. I have been able to implement this now .. I was running the two programs in different sessions and that is the reason why it was not working. Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 17:45:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-internal-table-to-memory-variable/m-p/2393262#M532412</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T17:45:22Z</dc:date>
    </item>
  </channel>
</rss>

