Application Development 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: 

Generation of a spool request when displaying a list

Former Member
0 Kudos

Hi,

I implemented a report which displays a log after it run. I implemented the log as normal list output using the write command. When the report is run in background SAP generates a spool request containing the log. Is it possible to generate the spool request automatically when the user runs the report in dialog mode?

Thanks in advance and regards,

Martin

6 REPLIES 6

Former Member
0 Kudos

Hi,

It should not create spool request in dialog mode, will create only at Back ground only.

Regards,

Sunil

0 Kudos

I know that the normal system behavior does not generate a spool request in dialog, but i would like to force the generation.

Regards,

Martin

0 Kudos

Hello,

You can try NEW-PAGE PRINT ON stmt, it will generate your spool in online mode !!!

BR,

Suhas

Edited by: Suhas Saha on Jan 15, 2009 1:40 PM

0 Kudos

The suggested command forces the print output but not the generation of the spool request. I don't want to print the log, I just want to create a spool request containing the log.

Thanks and regards,

Martin

0 Kudos

Hello Martin,

You have to use NO DIALOG addition with the stmt. Please do an F1 on NO DIALOG, it will help.

BR,

Suhas

former_member404244
Active Contributor
0 Kudos

Hi,

check the below sample code and try..

FORM sub_print_parameters .

CONSTANTS : lc_x(1) TYPE c VALUE 'X'.

  • Declaration of local constants

CONSTANTS : lc_paart LIKE sy-paart VALUE 'X_65_132', " Paper Format

lc_locl TYPE sypdest VALUE 'LOCA', " Destination

lc_linsz LIKE sy-linsz VALUE '132'. "Constant for line size

  • Setup the Print Parmaters

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

authority = space

immediately = lc_x

new_list_id = lc_x

no_dialog = lc_x

user = sy-uname

IMPORTING

out_parameters = gv_print_parms

EXCEPTIONS

archive_info_not_found = 1

invalid_print_params = 2

invalid_archive_params = 3

OTHERS = 4.

IF sy-subrc NE 0.

CLEAR : gv_print_parms.

ENDIF.

  • The printer destination has to be set up

IF gv_print_parms-pdest = space.

gv_print_parms-pdest = lc_locl.

ENDIF.

  • Explicitly set line width, and output format so that

  • the PDF conversion comes out OK

gv_print_parms-linsz = lc_linsz.

gv_print_parms-paart = lc_paart.

ENDFORM. " SUB_PRINT_PARAMETERS

then

NEW-PAGE PRINT ON PARAMETERS gv_print_parms NO DIALOG .

write 😕 < what ever u want to print in the spool>.

NEW-PAGE PRINT OFF.

Regards,

Nagaraj