Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP -Tcode Excel download

venkatesh_veera2
Participant
0 Likes
3,844

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.

6 REPLIES 6
Read only

VenkatRamesh_V
Active Contributor
0 Likes
2,419

Hi,

Try , FM LIST_FROM_MEMORY for getting data from standard.

Read only

matt
Active Contributor
0 Likes
2,419

abab2xlsx

Google it.

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,419

You mean export the ALV table to Excel file? Isn't there a standard Export button already?

Read only

DoanManhQuynh
Active Contributor
2,419

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...

Read only

bala_sikkal
Explorer
2,419

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

Read only

RaymondGiuseppi
Active Contributor
2,419

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)