Application Development 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: 

Save ALV grid to local excel-file in background

bernd_speckmann
Contributor
0 Kudos

Hi,

i want to save a alv grid to an excel-file on a local fileshare using an background job..

Does anybody know how this works?

Thanks ahead

8 REPLIES 8

Former Member
0 Kudos

Hi Bernd,

It is not possible.

Regards,

Atish

JozsefSzikszai
Active Contributor
0 Kudos

hi Bernd,

this is not possible. When a program run in background, it means that it runs on SAP server and has not much idea about what is outside SAP server...

ec

rainer_hbenthal
Active Contributor
0 Kudos

This is not possible. No GUI => no connection to the presentation server. You can only export the data to the application server.

0 Kudos

OK, how can i export the data to the application server as an xls-file?

0 Kudos

The only way of doing this is to convert it to an csv file component by component. This file is then readable by excel.

former_member223537
Active Contributor
0 Kudos


DATA: file TYPE string VALUE `flights.dat`, 
      wa   TYPE spfli. 

FIELD-SYMBOLS TYPE x. 

OPEN DATASET file FOR OUTPUT IN BINARY MODE. 

SELECT * 
       FROM spfli 
       INTO wa. 
  ASSIGN wa TO CASTING. 
  TRANSFER TO file. 
ENDSELECT. 

CLOSE DATASET file. 

<b>The binary data from database table SPFLI is transferred to a binary file flights.dat</b>

0 Kudos

Hi Prashant,

After the code is executed, How will I see the flights.dat file ?

Regards,

Vishwa.

0 Kudos

use transaction AL11