<?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 list from memory in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193463#M129036</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this sample program I had laying around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0003 .

data: begin of listout occurs 0,
      line(1024) type c,
      end of listout.

* Submit the report and export list to memory
submit z_your_report exporting list to memory
            and return.

* Get list from memory and convert to ascii
perform retrieve_list_from_memory tables listout.

loop at listout.
  write:/ listout.
endloop.

************************************************************************
* RETRIEVE_LIST_FROM_MEMORY
************************************************************************
form retrieve_list_from_memory tables reportlines.

  data: list like abaplist occurs 0 with header line.
  data: txtlines(1024) type c occurs 0 with header line.

  clear list.  refresh list.
  clear reportlines. refresh reportlines.

  call function 'LIST_FROM_MEMORY'
       tables
            listobject = list
       exceptions
            not_found  = 1
            others     = 2.

  check sy-subrc = 0.

  call function 'LIST_TO_ASCI'
       tables
            listobject         = list
            listasci           = txtlines
       exceptions
            empty_list         = 1
            list_index_invalid = 2
            others             = 3.

  check sy-subrc = 0.

  reportlines[] = txtlines[].

  call function 'LIST_FREE_MEMORY'.

endform.


&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>Fri, 10 Feb 2006 13:50:59 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-02-10T13:50:59Z</dc:date>
    <item>
      <title>Exporting list from memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193458#M129031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i want to know how to retrieve the list that has been saved using exporting list from memory....how to use list_from_memory module??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2006 13:41:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193458#M129031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-10T13:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting list from memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193459#M129032</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 EXPORT TO MEMORY &amp;amp; use LIST_FROM_MEMORY to import the list into an itab from memory. You have to then use 'LIST_TO_ASCI' to use the data in the Program &amp;amp; ofcourse close the deal with the function call  'LIST_FREE_MEMORY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suresh Datti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2006 13:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193459#M129032</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-02-10T13:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting list from memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193460#M129033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sruthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data   : P_LIST like ABAPLIST occurs 1 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      call function 'LIST_FROM_MEMORY'&lt;/P&gt;&lt;P&gt;        tables&lt;/P&gt;&lt;P&gt;          LISTOBJECT = P_LIST.&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;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2006 13:46:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193460#M129033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-10T13:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting list from memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193461#M129034</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;Once you submit the report using sumit .. exporting list to memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA  BEGIN OF itab_list OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE abaplist.&lt;/P&gt;&lt;P&gt;DATA  END OF itab_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'LIST_FROM_MEMORY'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    listobject = itab_list&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    not_found  = 4&lt;/P&gt;&lt;P&gt;    OTHERS     = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also refer following link :&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/rep_submit.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/rep_submit.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2006 13:47:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193461#M129034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-10T13:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting list from memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193462#M129035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is from 'F1' on Submit statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 3 &lt;/P&gt;&lt;P&gt;... EXPORTING LIST TO MEMORY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;This addition stores the basic list for the program accessed in the ABAP Memory. It can only be used together with the addition AND RETURN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The list is stored in the ABAP Memory as an internal table of the row type ABAPLIST, ABAPLIST being a structured data type in the ABAP Dictionary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The calling program can access the list stored once program access is completed, using function modules belonging to the function group SLST. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module LIST_FROM_MEMORY loads the list from the ABAP Memory to an internal table of the row type ABAPLIST. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module WRITE_LIST inserts the content of an internal table of the row type ABAPLIST in the current list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module DISPLAY_LIST displays the content of an internal table of the row type ABAPLIST in a separate list screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;The addition can only work provided the function key Enter is not linked to a function code in the GUI status last defined for the program accessed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Once the program report has been accessed, the list stored there in the ABAP Memory is read by means of function modules and inserted in the current list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA list_tab TYPE TABLE OF abaplist. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT report EXPORTING LIST TO MEMORY &lt;/P&gt;&lt;P&gt;              AND RETURN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'LIST_FROM_MEMORY' &lt;/P&gt;&lt;P&gt;  TABLES &lt;/P&gt;&lt;P&gt;    listobject = list_tab &lt;/P&gt;&lt;P&gt;  EXCEPTIONS &lt;/P&gt;&lt;P&gt;    not_found  = 1 &lt;/P&gt;&lt;P&gt;    OTHERS     = 2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WRITE_LIST' &lt;/P&gt;&lt;P&gt;    TABLES &lt;/P&gt;&lt;P&gt;      listobject = list_tab. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2006 13:47:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193462#M129035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-10T13:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting list from memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193463#M129036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this sample program I had laying around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0003 .

data: begin of listout occurs 0,
      line(1024) type c,
      end of listout.

* Submit the report and export list to memory
submit z_your_report exporting list to memory
            and return.

* Get list from memory and convert to ascii
perform retrieve_list_from_memory tables listout.

loop at listout.
  write:/ listout.
endloop.

************************************************************************
* RETRIEVE_LIST_FROM_MEMORY
************************************************************************
form retrieve_list_from_memory tables reportlines.

  data: list like abaplist occurs 0 with header line.
  data: txtlines(1024) type c occurs 0 with header line.

  clear list.  refresh list.
  clear reportlines. refresh reportlines.

  call function 'LIST_FROM_MEMORY'
       tables
            listobject = list
       exceptions
            not_found  = 1
            others     = 2.

  check sy-subrc = 0.

  call function 'LIST_TO_ASCI'
       tables
            listobject         = list
            listasci           = txtlines
       exceptions
            empty_list         = 1
            list_index_invalid = 2
            others             = 3.

  check sy-subrc = 0.

  reportlines[] = txtlines[].

  call function 'LIST_FREE_MEMORY'.

endform.


&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>Fri, 10 Feb 2006 13:50:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193463#M129036</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-02-10T13:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting list from memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193464#M129037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Sruthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;list_from_memory module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Func desc: Prepared list import from memory &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Desc:  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report report01.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;data listtab like listobject occurs 1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Either other report &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;has exported the list to memory, or&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;submit report02... &lt;/P&gt;&lt;P&gt;       exporting list to memory and return. &lt;/P&gt;&lt;P&gt;call function 'LIST_FROM_MEMORY' &lt;/P&gt;&lt;P&gt;     tables listobject = listtab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;process listtab &lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;P&gt;Vinoth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2006 13:52:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-from-memory/m-p/1193464#M129037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-10T13:52:04Z</dc:date>
    </item>
  </channel>
</rss>

