2019 Mar 23 7:15 AM
Hi Guru,Im having a tcode AR02. Im having a requirement to enhance the existing program... so that when ever we click the execute button it has to extract the tcode output data to excel sheet on desktop or AL11 folder.
P.S. GUI_DOWNLOAD won't work as it will get the data from internal table. In the SAP standard program there are many includes like for header, columns, alv grid etc. I need to get the same out put which we see in tcode after alv etc in my excel sheet.
Can some one plese help.
Hi Guru,Im having a tcode AR02. Im having a requirement to enhance the existing program... so that when ever we click the execute button it has to extract the tcode output data to excel sheet on desktop or AL11 folder.
P.S. GUI_DOWNLOAD won't work as it will get the data from internal table. In the SAP standard program there are many includes like for header, columns, alv grid etc. I need to get the same out put which we see in tcode after alv etc in my excel sheet.
Can some one plese help.
2019 Mar 23 8:24 AM
Hi,
Try , FM LIST_FROM_MEMORY for getting data from standard.
2019 Mar 23 9:16 AM
2019 Mar 24 8:34 AM
You mean export the ALV table to Excel file? Isn't there a standard Export button already?
2019 Mar 25 1:45 AM
I dont think there is enhancement point to do what you want, its just a simple report with start, end selection. even there is, you have to write your own code to extract the result from report to excel with the same layout ( like color, header, summarize...).maybe you can write a Z report to submit that tcode, get ALV data and layout configuration using CL_SALV_BS_RUNTIME_INFO and rebuild it with abap2xlsx, ooxml...
2019 Mar 25 7:19 AM
hi,
1. Create a custom program, Inside call your standard program by Submit statement
For more info..
Get your standard program output by using class: CL_SALV_BS_RUNTIME_INFO
http://zevolving.com/2015/07/salv-table-22-get-data-directly-after-submit/
2. In your custom program you need to design the excel download format including header, line items, and color similar to the standard output using OLE Method.
https://wiki.scn.sap.com/wiki/display/SI/OLE+concept+for+downloading+the+report+output+into+excel
2019 Mar 25 7:52 AM
There is a paramter on AR02 'Use ALV grid' to generate an ALV grid, why didn't your users check it, if users actually refuse to export the data themselves then copy the selection-screen in a z-report, submit standard report, with 'P_GRID = abap_true', wrapped with CL_SALV_BS_RUNTIME_INFO and export the returned data yourself (many threads/discussions are already available so use search tool)
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |