<?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: Problem in Importing Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199416#M1203050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When u use 'Export' and 'Import' statements, it refers local sap memory.&lt;/P&gt;&lt;P&gt;So u need to use SUBMIT ZIMPORT_TEST AND RETURN  statement immediately after 'Export'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report ZEXPORT_TEST.&lt;/P&gt;&lt;P&gt;EXPORT IT TO MEMORY ID 'EAI1'.   &amp;lt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; Exported to common local sap memory&lt;/P&gt;&lt;P&gt;SUBMIT ZIMPORT_TEST AND RETURN . &amp;lt;---- Controls goes to next program, within same session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report ZIMPORT_TEST.&lt;/P&gt;&lt;P&gt;IMPORT IT from MEMORY ID 'EAI1'.  &amp;lt;----&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; Imports data from common local sap memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to run two independent reports one exporting, another importing, then u have to use &lt;/P&gt;&lt;P&gt;'SET' and 'GET' parameter concept which refers global sap memory.&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: Sap Fan on Feb 27, 2009 4:56 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sap Fan on Feb 27, 2009 4:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Feb 2009 03:56:30 GMT</pubDate>
    <dc:creator>awin_prabhu</dc:creator>
    <dc:date>2009-02-27T03:56:30Z</dc:date>
    <item>
      <title>Problem in Importing Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199412#M1203046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am exporting Internal table from Program1 as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZEXPORT_TEST                            .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ITAB,&lt;/P&gt;&lt;P&gt;      MATNR TYPE MARA-MATNR,&lt;/P&gt;&lt;P&gt;      MATKL TYPE MARA-MATKL,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:IT TYPE TABLE OF ITAB .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR MATKL FROM MARA INTO TABLE IT UP TO 10 ROWS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORT IT TO MEMORY ID 'EAI1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:/'Exported Successfully'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I am Importing same internal table into  program2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZIMPORT_TEST  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ITAB,&lt;/P&gt;&lt;P&gt;      MATNR TYPE MARA-MATNR,&lt;/P&gt;&lt;P&gt;      MATKL TYPE MARA-MATKL,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:IT  TYPE TABLE OF ITAB,&lt;/P&gt;&lt;P&gt;     IT1 TYPE TABLE OF ITAB,&lt;/P&gt;&lt;P&gt;     WA TYPE ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORT IT1 FROM MEMORY ID 'EAI1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT[] = IT1[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT INTO WA.&lt;/P&gt;&lt;P&gt;  WRITE:/ wa-matnr,&lt;/P&gt;&lt;P&gt;        / WA-MATKL.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:/'Imported Successfully'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But progam1 exporting correctly the return code is 0 but program2 is not importing sucessfully return code is 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help me to import.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 02:16:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199412#M1203046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T02:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Importing Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199413#M1203047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Murugaperumal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to try below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;import IT = IT  FROM MEMORY ID 'EAI1'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here your &lt;U&gt;destination IT&lt;/U&gt; should be same as &lt;U&gt;source internal table&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope  it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 03:07:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199413#M1203047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T03:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Importing Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199414#M1203048</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;The internal table (object) name must be the same when exporting and importing. You are exporting internal table &lt;STRONG&gt;IT&lt;/STRONG&gt; to the ABAP memory but want to import internal table &lt;STRONG&gt;IT1&lt;/STRONG&gt; from the ABAP memory!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this (in the second program):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  zsctest2.

TYPES: BEGIN OF itab,
        matnr TYPE mara-matnr,
        matkl TYPE mara-matkl,
       END OF itab.

DATA:  it  TYPE TABLE OF itab,
       wa  TYPE itab.

IMPORT it FROM MEMORY ID 'EAI1'.

LOOP AT it INTO wa.
  WRITE:/ wa-matnr,
          wa-matkl.
ENDLOOP.

CHECK sy-subrc = 0.
SKIP.
WRITE:/'Imported Successfully'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 03:07:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199414#M1203048</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2009-02-27T03:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Importing Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199415#M1203049</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;instead of changing the variable name of the internal table from it1 to it....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use the following syntax,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import it to it1 from memory id 'MID'.&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;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 03:19:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199415#M1203049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T03:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in Importing Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199416#M1203050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When u use 'Export' and 'Import' statements, it refers local sap memory.&lt;/P&gt;&lt;P&gt;So u need to use SUBMIT ZIMPORT_TEST AND RETURN  statement immediately after 'Export'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report ZEXPORT_TEST.&lt;/P&gt;&lt;P&gt;EXPORT IT TO MEMORY ID 'EAI1'.   &amp;lt; -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; Exported to common local sap memory&lt;/P&gt;&lt;P&gt;SUBMIT ZIMPORT_TEST AND RETURN . &amp;lt;---- Controls goes to next program, within same session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report ZIMPORT_TEST.&lt;/P&gt;&lt;P&gt;IMPORT IT from MEMORY ID 'EAI1'.  &amp;lt;----&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; Imports data from common local sap memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to run two independent reports one exporting, another importing, then u have to use &lt;/P&gt;&lt;P&gt;'SET' and 'GET' parameter concept which refers global sap memory.&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: Sap Fan on Feb 27, 2009 4:56 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sap Fan on Feb 27, 2009 4:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 03:56:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-importing-internal-table/m-p/5199416#M1203050</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2009-02-27T03:56:30Z</dc:date>
    </item>
  </channel>
</rss>

