10-09-2007 8:40 AM
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..
10-09-2007 9:38 AM
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
10-09-2007 8:49 AM
hi Vikas,
ALV does not work in background, that could be the reason...
ec
10-09-2007 8:52 AM
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
10-09-2007 8:56 AM
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)
10-09-2007 9:01 AM
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..
10-09-2007 9:09 AM
10-09-2007 9:25 AM
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.
10-09-2007 9:29 AM
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
10-09-2007 9:38 AM
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