08-22-2007 10:02 AM
I have a requirement to develop a ALV report. This should display the ALV in forground and should create a spool in the background. How do i do that ?
My requirement is this.
As soon as they give TCode, i should display the popup asking whether they want to execute in background or foreground. Depends on the option they choose, i have to develop the report.I know the foreground execution..I want a sample report to execute in background.
08-22-2007 10:06 AM
Hi,
You can create ALV reports that can be executed in the background. You will have to use docking container instead of the traditional custom container. Just have a look at the code..
<b>data: or_doc type ref to cl_gui_docking_container .
if cl_gui_alv_grid=>offline( ) is initial.
create object or_custom_container
exporting container_name = c_container.
create object or_grid
exporting i_parent = or_custom_container.
else .
create object or_grid
exporting i_parent = or_doc .
endif .</b>
We can use SY-BATCH is 'X' to check if the program is being executed in background or not.
Thanks...
Preetham S
08-22-2007 10:09 AM
You can use the function module REUSE_ALV_GRID_DISPLAY to develop the ALV report. The option to execute the report in foreground/background is provided by SAP. You need not do anything for that.
Please mark points if the solution was useful.
Regards,
Manoj
08-22-2007 10:22 AM
Hi ,
If we execute the ALV reports in background we will get a short dump saying if the person is using OO ALV.
<b>Fatal error: GUI cannot be reached</b>
Thanks...
Preetham S