Skip to Content
0
Former Member
Jun 02, 2009 at 01:43 PM

Multiple ALV reports not working in batch mode

14 Views

All,

I have a report that creates a detail and a summary ALV report in one program.

When run in the foreground it works great - runs the ALV detail first and displays it and you arrow back and then the runs the ALV summary report and displays it.

But when run in the background - I get the ALV detail report sent to the spooler but nothing for the ALV summary report. Well I do get a second report sent to the spooler but it does not have any data displayed.

I ran this in debug mode - faking out the program to believe it was in Batch Mode.

Everything appears to look correct when it does the call to ALV - the outtab table has the summary data in it.

Here is the calls to ALV:

  • Function Module to display report in ALV List Format

IF l_detail = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = l_repid

i_callback_user_command = c_ucomm

i_grid_title = p_title

i_grid_settings = w_alv_grid

is_layout = w_alv_layout

it_fieldcat = w_alv_field

it_sort = w_alv_sort

i_default = 'X'

i_save = ' '

it_events = w_alv_event

is_print = w_alv_print

TABLES

t_outtab = t_detail

EXCEPTIONS

program_error = 1

OTHERS = 2.

ELSEIF l_summry = 'X'.

  • be sure th file has the new SNO values assigned B4 calling!

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = l_repid

i_callback_user_command = c_ucomm

i_grid_title = p_title

i_grid_settings = w_alv_grid

is_layout = w_alv_layout

it_fieldcat = w_alv_field

it_sort = w_alv_sort

i_default = 'X'

i_save = ' '

it_events = w_alv_event

is_print = w_alv_print

TABLES

t_outtab = t_summry

EXCEPTIONS

program_error = 1

OTHERS = 2.

ENDIF.

Maybe there something I should be calling or clearing out in the above parms when trying to create to spoolfiles from ALV in background mode.

Any suggestions are most apprecaited.

Thanks.

Scott