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: 

Running Report as a background job

VB09104
Active Participant
0 Kudos

hello all,

i have a report which when executed as a background job it do not give me any output.Running in Foreground does provide ALV output.

The job runs, but no output is sent to a spooler. If I request cover sheet on the background job, I do get the cover sheet to the spooler, but no report results.

any solution?

regards,

vikas..

1 ACCEPTED SOLUTION

former_member223537
Active Contributor
0 Kudos

Hi Vikas,

ALV Grid output should come as ALV List output in background.

SAP does support ALV in background.

1. goto SM37, execute.

2. Tick the checkbox for your job.

in the command window type JDBG

3. It will start debugger... Debug the code till the ALV FM call & check whether data is retrieved or what else is the problem.

Best regards,

Prashant

8 REPLIES 8

JozsefSzikszai
Active Contributor
0 Kudos

hi Vikas,

ALV does not work in background, that could be the reason...

ec

0 Kudos

hello Eric,

thanks for your reply.

is that only ALV-GRID do not work for background, i meant if i use LIST display can i do this?

regards,

vikas

0 Kudos

I think it will do, but it is easy to try, because you just change GRID to LIST in the function call (except if you use some special features)

0 Kudos

thanks Eric,

yes i do have alredy some functionality with GRID display like hotspot and event handling.

but if i write another logic to display ALV in LIST format what condition need to be checked whether to show GRID or LIST?

vikas..

0 Kudos

?????

0 Kudos

you have to check sy-batch, if it is X than it means that program runs in background, so you can call the LIST display with limited functionality, if sy-batch is empty, than it means that it runs in foreground, so you can call the GRID display with full functionality.

0 Kudos

You can use this.....

CALL METHOD CL_SALV_TABLE=>FACTORY

EXPORTING

LIST_DISPLAY = ABAP_TRUE

  • R_CONTAINER =

  • CONTAINER_NAME =

  • IMPORTING

  • R_SALV_TABLE =

CHANGING

T_TABLE =

For more help...

http://help.sap.com/saphelp_nw70/helpdata/en/bc/e5eb40c4f8712ae10000000a155106/frameset.htm

former_member223537
Active Contributor
0 Kudos

Hi Vikas,

ALV Grid output should come as ALV List output in background.

SAP does support ALV in background.

1. goto SM37, execute.

2. Tick the checkbox for your job.

in the command window type JDBG

3. It will start debugger... Debug the code till the ALV FM call & check whether data is retrieved or what else is the problem.

Best regards,

Prashant