2006 Dec 04 2:23 PM
Hii everybody,
I am not able to generate the background spool list for this report. When executed in background, the job shows successful execution, but when I see spool status, it shows waiting and the spool has incomplete list. The bottom part of the spool list has all vertical lines... Any guesses what might be the problem? I am able to see the output when report ran in foreground. It is an ALV grid report.
PLese reply me fast as it is urgent.
M A
2006 Dec 04 2:26 PM
YOu cannot get the correct output if you use GRID ALV and run it in background.
Background mode and ALV GRID doesn't go together.
YOu have to use an alv list to get the output in background mode.
like:
if sy-batch = 'X'.
call function 'REuse_alv_list_display'
else.
call function 'REUSE_ALV_GRID_DISPLAY'
endif.
Hii everybody,
I am not able to generate the background spool list for this report. When executed in background, the job shows successful execution, but when I see spool status, it shows waiting and the spool has incomplete list. The bottom part of the spool list has all vertical lines... Any guesses what might be the problem? I am able to see the output when report ran in foreground. It is an ALV grid report.
PLese reply me fast as it is urgent.
M A
2006 Dec 04 2:26 PM
YOu cannot get the correct output if you use GRID ALV and run it in background.
Background mode and ALV GRID doesn't go together.
YOu have to use an alv list to get the output in background mode.
like:
if sy-batch = 'X'.
call function 'REuse_alv_list_display'
else.
call function 'REUSE_ALV_GRID_DISPLAY'
endif.
2006 Dec 04 2:34 PM
2006 Dec 04 3:08 PM
Ravi-
Can you please let me know how is this checkbox named "Printout with date, title and Page number" in the display tabstrip of change layout option is checked by default? I am using normal ALV grid/list function modules.
Thanks
M A
2006 Dec 04 2:26 PM
generally ALV in foreground works fine...in background it sometimes gives problem...instead of ALV try using normal report and execute in background...This will generate complete spool list.
2006 Dec 04 2:27 PM
HI,
Just wait for some more time to generate the Spool 100%, then see the spool,
Regards
Sudheer
2006 Dec 04 2:27 PM
Hi Ahmed,
if you are on Lower Versions, then Try to Call the ALV_LIST_DISPLAY FM instead of Grid in Background.
which version you are in.
if sy-batch = 'X'.
call 'LISTFM'.
else.
Call "GRIDFM'.
endif.
if you are below 4.7 or equal 4.7 try the above solution.
Regards
Vijay
2006 Dec 04 2:29 PM
Hope you have end spool writing with new-page print off.
form write_to_spool.
data : l_params type pri_params, "new spool params
l_destination type pri_params-pdest value 'LOCL'. "printer name
*Get the print parameters.
call function 'GET_PRINT_PARAMETERS'
EXPORTING
copies = 1
department = 'SYSTEM'
destination = l_destination
expiration = 2
immediately = ' '
layout = 'X_65_255'
line_count = 65
line_size = 255
list_name = 'XYZ'
list_text = 'ABC'
mode = ' '
new_list_id = 'X'
no_dialog = 'X'
receiver = 'SAP*'
release = 'X'
sap_cover_page = 'X'
user = sy-uname
IMPORTING
out_parameters = l_params
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
case sy-subrc.
when 1.
raise get_print_info_not_found.
when 2.
raise get_print_invalid_prt_params.
when 3.
raise get_print_invalid_arch_params.
when 4.
raise get_print_others.
endcase.
*start spool writing.
new-page print on parameters l_params no dialog.
uline.
skip.
write your contents
uline.
*end spool writing.
new-page print off.
endform. " write_to_spool