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

Generate Spoool from classical report output

Former Member
0 Likes
761

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

3 REPLIES 3
Read only

Former Member
0 Likes
565

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

Read only

Former Member
0 Likes
565

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

Read only

former_member404244
Active Contributor
0 Likes
565

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