<?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: Get ALV_OUTPUT table from Custom program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051975#M89456</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What Rich was asking is, does the SAP standard report displays an ALV grid or or an ALV list output? If the standard SAP program is displaying the output in a grid, then it is not possible to export it to memory and then read it. But if it is displaying it in ALV list format, then you can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember, by exporting list to memory, you are exporting a formatted output, not the internal table. Your import will give you only data in a long string. You will have write some parsing code to read it into an internal table with fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2005 17:26:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-10-11T17:26:40Z</dc:date>
    <item>
      <title>Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051970#M89451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a sap program that display the table in ALV_OUTPUT. I want to create custom program to call the sap program and get the resulting ALV_OUTPUT table back into my custom program without modifying the sap program. Any help will be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2005 17:12:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051970#M89451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-11T17:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051971#M89452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does it present to the user as a ALV Grid or a classical ALV list.  If a list,  then you might be able to SUBMIT the report and EXPORT LIST TO MEMEORY.  Then retrieve the LIST_FROM_MEMORY.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is a ALV grid,  then I'm afraid you are out of luck.&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>Tue, 11 Oct 2005 17:17:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051971#M89452</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-10-11T17:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051972#M89453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to get the ALV_OUTPUT into an internal table first then use custom code to add it to another internal table, then download it to excel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2005 17:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051972#M89453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-11T17:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051973#M89454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is the code to call the sap program       &lt;/P&gt;&lt;P&gt;SUBMIT rhpe_expired_quali&lt;/P&gt;&lt;P&gt;           WITH pchplvar = pchplvar&lt;/P&gt;&lt;P&gt;           WITH pchotype = pchotype&lt;/P&gt;&lt;P&gt;           WITH pchobjid IN pchobjid&lt;/P&gt;&lt;P&gt;           WITH pchbegda = se_begd&lt;/P&gt;&lt;P&gt;           WITH pchendda = se_endd&lt;/P&gt;&lt;P&gt;           WITH h_qual = h_qual&lt;/P&gt;&lt;P&gt;           WITH h_events = h_events&lt;/P&gt;&lt;P&gt;           AND RETURN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2005 17:23:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051973#M89454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-11T17:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051974#M89455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample program illistrating how to pull a list.  This submits the program behind transaction MMBE and brings the list back, then displays the internal table.  Enter any valid material number and execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0002.


data: begin of listout occurs 0,
      line(1024) type c,
      end of listout.

parameters: p_matnr type mara-matnr.

ranges: r_matnr for mara-matnr.

start-of-selection.

  r_matnr-sign   = 'I'.
  r_matnr-option = 'EQ'.
  r_matnr-low  = p_matnr.
  append r_matnr.

* Submit the report and export list to memory
  submit RMMMBEST exporting list to memory

              with ms_matnr-low in r_matnr
              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>Tue, 11 Oct 2005 17:25:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051974#M89455</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-10-11T17:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051975#M89456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What Rich was asking is, does the SAP standard report displays an ALV grid or or an ALV list output? If the standard SAP program is displaying the output in a grid, then it is not possible to export it to memory and then read it. But if it is displaying it in ALV list format, then you can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember, by exporting list to memory, you are exporting a formatted output, not the internal table. Your import will give you only data in a long string. You will have write some parsing code to read it into an internal table with fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2005 17:26:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051975#M89456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-11T17:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051976#M89457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's alv list. and thanks for all the help. I'll try it out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2005 17:29:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051976#M89457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-11T17:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051977#M89458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just looked at the program in my system.  It uses the REUSE_ALV_GRID_DISPLAY function module to display the data.  In dialog mode it is an ALV grid.  But when ran in background it write to the spool as a list.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if it will work or not,  give a try and let us know.&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>Tue, 11 Oct 2005 17:34:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051977#M89458</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-10-11T17:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051978#M89459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried it with one of our custom programs,  it doesn't work.&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>Tue, 11 Oct 2005 17:39:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051978#M89459</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-10-11T17:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051979#M89460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It didn't work.  The sap program still shows on the screen and the alv_output table didn't get copy over to the custom program. Do you have any other suggestions? Anything that help will be great.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2005 21:05:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051979#M89460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-11T21:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get ALV_OUTPUT table from Custom program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051980#M89461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The only other thing would be to copy the program into a "Z" program,  then comment out the call to the ALV and just pass the ALV_OUTPUT to a memory id.  The import it in your other program.  Or you could comment out the call to ALV and just write it out with basic WRITE statements,  then you would be able to use the EXPORT LIST TO MEMORY code.&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>Tue, 11 Oct 2005 23:49:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-alv-output-table-from-custom-program/m-p/1051980#M89461</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-10-11T23:49:11Z</dc:date>
    </item>
  </channel>
</rss>

