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

Using a report layout in background mode

Former Member
0 Likes
1,013

Is is possible to apply a saved report layout like you apply to the alv grid to a csv file run in background mode?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
972

I hope ALV Grid does not work in Background, even normal program also wont work in background if you want to operate on presentation server.

Regards,

~Satya

Is is possible to apply a saved report layout like you apply to the alv grid to a csv file run in background mode?

6 REPLIES 6
Read only

former_member194669
Active Contributor
0 Likes
972

Can you please give more details ?

Read only

0 Likes
972

The requirements were to create an alv grid when run in the foreground with a screen parameter for report layout so multiple report layouts could be saved in different variants. Also, if the report is run in the background it should create an excel (csv) file and write it to the application server. The business owner wants to schedule the job to run in batch with about 10 different report layouts. I have everything working in the foreground. I didn't know if it was possible to apply a report layout to the excel file. Thanks for your help!

Read only

0 Likes
972

Hi Cynthia,

As an alternative, you can propose this design to your business owner.

if sy-batch = space.

call function REUSE_ALV_GRID_DISPLAY

else.

call function REUSE_ALV_LIST_DISPLAY

endif.

This way, you will have the desired layout saved to the spool, from where you can download the file as excel sheet also.

Regards,

Ravi

Read only

Former Member
0 Likes
972

Hi Cynthia ,

I can figure out one way :


SUBMIT ZREPORT TO SAP-SPOOL LAYOUT 'ZLAYOUT'
VIA SELECTION-SCREEN
DESTINATION 'locl'
KEEP IN SPOOL 'X'
IMMEDIATELY 'X'
WITHOUT SPOOL DYNPRO
AND RETURN.

This will return the report in your layout to the spool and can be downloaded as well.

Thanks

Naresh

Read only

0 Likes
972

Thanks! I will give this a try.

Read only

Former Member
0 Likes
973

I hope ALV Grid does not work in Background, even normal program also wont work in background if you want to operate on presentation server.

Regards,

~Satya