Application Development and Automation 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: 
Read only

ALV Grid problem in background

Former Member
0 Likes
423

Hello all,

When I schedule normal ALV Grid report in background I am getting "GUI can't be reached" in spool.

Any solution for this....?

Thanks a lot..

Apps.

Hello all,

When I schedule normal ALV Grid report in background I am getting "GUI can't be reached" in spool.

Any solution for this....?

Thanks a lot..

Apps.

1 REPLY 1
Read only

former_member156446
Active Contributor
0 Likes
370

Have a look at example code: BCALV_GRID_01, where they suppress the error by catching it...

If you are using the ABAP Grid Control (OO object), you can still create the ALV list as a spool listing for the background job.

The easiest way to do this is to put all the create object statements and method calls for the custom container and ALV grid object inside a subroutine (for example, present_grid).

All that is required is a simple check of the sy-batch variable to determine if the program is being executed in the foreground or background.

e.g. if sy-batch is initial.

call screen 0100.

else.

perform present_grid.

endif.

In a PBO module of screen 0100, the subroutine present_grid is also performed.

The set_table_for_first_display method will be invoked in the routine present_grid, however, due to the job being executed in the background, the ALV list output will be written as spool output for the background job.