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: 

ALV

0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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=&gtoffline( ) 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

Former Member
0 Kudos

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

0 Kudos

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