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: 

Setting layout to a report in background job

RafaelVieira
Active Participant
0 Kudos

Hi.

Does anybody knows how I set layouts dynamically to a report output, given that such report is scheduled to run once a day in a background job?

It would work for me, either: through SM36 or coding JOB_OPEN / JOB_SUBMIT / JOB_CLOSE (or any other option, if available).

My requirement is to execute every night few reports, each with their corresponding variants and layouts.

Something like:

RUN <report1> VARIANT <variant1> LAYOUT <layout1> JOB <job>. (it would output and xls file).

RUN <report2> VARIANT <variant2> LAYOUT <layout1> JOB <job>. (it would output another xls file).

RUN <report3> VARIANT <variant3> LAYOUT <layout2> JOB <job>. (it would output a 3rd xls file).

How should I do to inform variant and layout parameters?

Thank you.

Rafael.

3 REPLIES 3

ThomasZloch
Active Contributor
0 Kudos

If the layout is another parameter on the selection screen (as in many SAP standard reports), then this sounds like normal job scheduling business to me.

I see the challenge rather in creating .xls files in background mode...

Thomas

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos
I see the challenge rather in creating .xls files in background mode...

If creating XLSX files is acceptable, it may be worth to look into this:

http://wiki.sdn.sap.com/wiki/display/ABAP/abap2xlsx

Never used it myself yet, but it looks promising.

0 Kudos

I think I didn't make myself clear in my explanation. Sorry about that.

My question is, I can create a new field in selection-screen specifically to layout and it would work. However, as I'm running it in background, the ALV will not be shown and the output file must be the export of the ALV with the layout (if in XLS, it'd be even better, but in .CSV would work as well). I just don't think it would work with a .TXT output, because there's no way to reflect the layout in a .TXT file.

Is there any way of having the ALV inside the output file (saved in the server, in background processing)?

Thank you so much!

Edited by: rvsilvax on Nov 30, 2011 3:45 PM