<?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 To Memory in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662738#M293562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eswar, &lt;/P&gt;&lt;P&gt;  I can download a complete result to excel. thanks&lt;/P&gt;&lt;P&gt;  and then i use FM &amp;lt;b&amp;gt;MONI_CALL_SPOOLSHOW&amp;lt;/b&amp;gt; in order to display the spool on screen. However, I found that the New-page on my report is no longer work.&lt;/P&gt;&lt;P&gt; for example:&lt;/P&gt;&lt;P&gt;__________________________________________________________________&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Section: HOTEL     
Position             H/C as at    H/C During  
                     28.02.2003     Period       
 ADMINISTRATION                                           
 HOTEL MANAGER           1            2       
 ASST. MANAGER           1            1   
 SECRETARY               1            2   

 Total by Department     3            5&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;__________________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before sending as spool, I can display result according to new section such as HOTEL, CLUB, DECK and ENGINE in new page.&lt;/P&gt;&lt;P&gt;But, when I use FM &amp;lt;b&amp;gt;GET_PRINT_PARAMETERS&amp;lt;/b&amp;gt; and followed by &amp;lt;b&amp;gt;NEW-PAGE PRINT ON&amp;lt;/b&amp;gt;. All new section is no longer separated to new page.&lt;/P&gt;&lt;P&gt;May I know how to solve it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Nov 2006 06:47:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-23T06:47:10Z</dc:date>
    <item>
      <title>Exporting List To Memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662734#M293558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am new to ABAP and now customizing a report that need to use &amp;lt;b&amp;gt;SUBMIT (report) Exporting List To Memory. &amp;lt;/b&amp;gt;But I do not understand what is being exported to the called program. Internal table? Therefore, I always encounter &amp;lt;i&amp;gt;NOT_FOUND error&amp;lt;/i&amp;gt; in &amp;lt;b&amp;gt;FM LIST_FROM MEMORY&amp;lt;/b&amp;gt;. &lt;/P&gt;&lt;P&gt;I need to use this because I want to download the result on screen to excel file during background job. (otherwise, only last page of the screen is converted to excel).&lt;/P&gt;&lt;P&gt;please help.. thanks.&lt;/P&gt;&lt;P&gt;____________________________________________________________________&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZTEST_01 NO STANDARD PAGE HEADING.
"selection screen declaration 
" ....
" ....
   START-OF-SELECTION.
   * submit this report with seltab and export to memory
   * seltab store all variants i enter in report ZTEST_01  
   * and pass to ZTEST_02 to fill in. (seltab is not empty)
      SUBMIT ZTEST_02  WITH SELECTION-TABLE seltab
                       EXPORTING LIST TO MEMORY AND RETURN.
  
   END-OF-SELECTION.
       PERFORM display.  " Loop itab and write result on screen
       PERFORM download_to_excel. " if convert result on screen 
                                  " and download to excel file.
       ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;____________________________________________________________________&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"ZTEST_02 is used to get data and process.
REPORT ZTEST_02 NO STANDARD PAGE HEADING.
  TOP-OF-PAGE.
     PERFORM header.

   START-OF-SELECTION.
      GET pernr.
      PERFORM get_data.

    END-OF-SELECTION.
       PERFORM calculation.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;___________________________________________________________________&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;After report ZTEST_02 is processed, ZTEST_01 will perform display to loop a &lt;/P&gt;&lt;P&gt;internal table and display on screen.&lt;/P&gt;&lt;P&gt;On Selection Screen of ZTEST_01, if user check a checkbox &lt;/P&gt;&lt;P&gt;to download result on screen to excel file, perform download will be run.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PERFORM download_to_excel.
  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = abaplist
    EXCEPTIONS
      not_found  = 1
      OTHERS     = 2.
    IF SY-SUBRC &amp;lt;&amp;gt; 0.       " i always get not_found error.
           write: / 'error in LIST_FROM_MEMORY'.
    ENDIF.

   CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index = 0
      TABLES
        listasci   = record
        listobject = abaplist.
    IF sy-subrc = 0.
         ......
    ENDIF.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 01:30:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662734#M293558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T01:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting List To Memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662735#M293559</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;Hope below code can give you some idea to handle you scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: PRIPAR TYPE PRI_PARAMS,
      ARCPAR TYPE ARC_PARAMS,
      LAY    TYPE PRI_PARAMS-PAART,
      LINES  TYPE PRI_PARAMS-LINCT,
      ROWS   TYPE PRI_PARAMS-LINSZ.
DATA: VAL(1).

CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
    DESTINATION            = 'LOCL'
    NO_DIALOG              = 'X'
    IMMEDIATELY            = ' '
  IMPORTING
    OUT_ARCHIVE_PARAMETERS = ARCPAR
    OUT_PARAMETERS         = PRIPAR
    VALID                  = VAL
  EXCEPTIONS
    ARCHIVE_INFO_NOT_FOUND = 1
    INVALID_PRINT_PARAMS   = 2
    INVALID_ARCHIVE_PARAMS = 3
    OTHERS                 = 4.
IF SY-SUBRC &amp;lt;&amp;gt; 0.
*     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
    IN_ARCHIVE_PARAMETERS  = ARCPAR
    IN_PARAMETERS          = PRIPAR
    NO_DIALOG              = 'X'
*      LIST_NAME              = 'TESTING PURPOSE ONLY' "L_LIST
  IMPORTING
    OUT_ARCHIVE_PARAMETERS = ARCPAR
    OUT_PARAMETERS         = PRIPAR
    VALID                  = VAL
  EXCEPTIONS
    ARCHIVE_INFO_NOT_FOUND = 1
    INVALID_PRINT_PARAMS   = 2
    INVALID_ARCHIVE_PARAMS = 3
    OTHERS                 = 4.

IF SY-SUBRC EQ 0.
  NEW-PAGE PRINT ON
  NEW-SECTION
  PARAMETERS PRIPAR
  ARCHIVE PARAMETERS ARCPAR
  NO DIALOG.
ELSE.
  WRITE:/ 'UNABLE TO CREATE SPOOL'.
ENDIF.
WRITE:/ 'FIRST LINE'.
WRITE:/ 'SECOND LINE'.
NEW-PAGE PRINT OFF.
DATA: L_SPOOL LIKE TSP01-RQIDENT.
DATA: BEGIN OF BUFFER OCCURS 10000,
        TEXT(255) TYPE C,
      END OF BUFFER.
DATA: STARTLINE TYPE I, ENDLINE TYPE I, FNSTR TYPE STRING.

STARTLINE = 1. L_SPOOL = SY-SPONO.

REFRESH BUFFER.
ENDLINE = STARTLINE + 9999.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
   EXPORTING
        RQIDENT              = L_SPOOL
        FIRST_LINE           = STARTLINE
        LAST_LINE            = ENDLINE
        DESIRED_TYPE         = 'RAW'
*       IMPORTING
*            REAL_TYPE            =
   TABLES
        BUFFER               = BUFFER
   EXCEPTIONS
        NO_SUCH_JOB          = 1
        JOB_CONTAINS_NO_DATA = 2
        SELECTION_EMPTY      = 3
        NO_PERMISSION        = 4
        CAN_NOT_ACCESS       = 5
        READ_ERROR           = 6
        TYPE_NO_MATCH        = 7
        OTHERS               = 8.
IF SY-SUBRC &amp;lt;&amp;gt; 0.
  EXIT.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now internal table BUFFER holds the data in output, you can use the same to download to an excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 02:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662735#M293559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T02:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting List To Memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662736#M293560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eswar,&lt;/P&gt;&lt;P&gt;  thanks for your prompt reply.&lt;/P&gt;&lt;P&gt;  Will this Buffer stores all the data, excactly like on the screen? &lt;/P&gt;&lt;P&gt;  Should I use FM &amp;lt;b&amp;gt;LIST_TO_ASCI &amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;GUI_DOWNLOAD&amp;lt;/b&amp;gt; to convert it to excel?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 03:30:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662736#M293560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T03:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting List To Memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662737#M293561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through these links and use accordingly&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba50d35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba50d35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://abap4.tripod.com/Output_List_Manipulation.html" target="test_blank"&gt;http://abap4.tripod.com/Output_List_Manipulation.html&lt;/A&gt;&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;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 04:24:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662737#M293561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T04:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting List To Memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662738#M293562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eswar, &lt;/P&gt;&lt;P&gt;  I can download a complete result to excel. thanks&lt;/P&gt;&lt;P&gt;  and then i use FM &amp;lt;b&amp;gt;MONI_CALL_SPOOLSHOW&amp;lt;/b&amp;gt; in order to display the spool on screen. However, I found that the New-page on my report is no longer work.&lt;/P&gt;&lt;P&gt; for example:&lt;/P&gt;&lt;P&gt;__________________________________________________________________&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Section: HOTEL     
Position             H/C as at    H/C During  
                     28.02.2003     Period       
 ADMINISTRATION                                           
 HOTEL MANAGER           1            2       
 ASST. MANAGER           1            1   
 SECRETARY               1            2   

 Total by Department     3            5&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;__________________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before sending as spool, I can display result according to new section such as HOTEL, CLUB, DECK and ENGINE in new page.&lt;/P&gt;&lt;P&gt;But, when I use FM &amp;lt;b&amp;gt;GET_PRINT_PARAMETERS&amp;lt;/b&amp;gt; and followed by &amp;lt;b&amp;gt;NEW-PAGE PRINT ON&amp;lt;/b&amp;gt;. All new section is no longer separated to new page.&lt;/P&gt;&lt;P&gt;May I know how to solve it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 06:47:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662738#M293562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T06:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting List To Memory</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662739#M293563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Huai Ying Tan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can still use NEW-PAGE to split within a spool.&lt;/P&gt;&lt;P&gt;So use this in event like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AT NEW SECTION..
     NEW-PAGE.
ENDAT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will display the list in separate pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 07:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-list-to-memory/m-p/1662739#M293563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T07:47:30Z</dc:date>
    </item>
  </channel>
</rss>

