2007 Jun 18 8:34 AM
Hi ,
I have created a report with classical output.
for that i want to generate spool.
is there any FM or other way of generating spool from the output
Hi ,
I have created a report with classical output.
for that i want to generate spool.
is there any FM or other way of generating spool from the output
2007 Jun 18 8:36 AM
Hi
Write the code
new-page print on
line-size 160
line-count 58
no-title
no-heading
destination 'LOCL'
immediately ' '
new list identification 'X'
no dialog.
and take the spool id
spoolid = spdel-rqident = sy-spono.
Reward points for useful Answers
Regards
Anji
2007 Jun 18 10:06 AM
hi anji,
thanks for the reply, but i am not able to generate spool from that
i want that after executing the report when i go to SP01 i want to see the spool.
but as of now after using ur piece of code, print conditions get updated in print options but then i have to follow path menu - list - print- continue. then only spool gets genetared.
kindly let me know what to do...
with thanks in advance
2007 Jun 18 10:13 AM
Hi,
Declaration of local constants
CONSTANTS : lc_paart LIKE sy-paart VALUE 'X_65_132', " Paper Format
lc_locl TYPE sypdest VALUE 'LOCL'. " Destination
If print option is selected.
IF p_print IS NOT INITIAL.
MOVE c_x TO v_print.
ELSE.
CLEAR v_print.
ENDIF.
Setup the Print Parmaters
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
authority = space
immediately = v_print
new_list_id = c_x
no_dialog = c_x
user = sy-uname
IMPORTING
out_parameters = v_print_parms
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc NE 0.
CLEAR : v_print_parms.
ENDIF.
The printer destination has to be set up
IF v_print_parms-pdest = space.
v_print_parms-pdest = lc_locl.
ENDIF.
Explicitly set line width, and output format so that
the PDF conversion comes out OK
v_print_parms-linsz = c_linsz.
v_print_parms-paart = lc_paart.
Then u need write like this..
NEW-PAGE PRINT ON PARAMETERS v_print_parms NO DIALOG.
Perform output_display.
NEW-PAGE PRINT OFF.
Regards,
Nagaraj