cancel
Showing results for 
Search instead for 
Did you mean: 

How to send theform to spool instead of printer?

Former Member
0 Kudos

Hi gurus,

Please tell me how to send the form to spool instead of printer?

Points are rewarded for useful answers.

Please let me know at the earliest.

regards

RAj.

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

In OPEN_FORM you will see a parameter called DIALOG,

The parameter DIALOG can be used to control whether a dialog box appears before output to the printer. The user can set various spool parameters for the output in this window.

Regards,

Sairam

Former Member
0 Kudos

Do we print later on what we send it to spool?

Answers (2)

Answers (2)

Former Member
0 Kudos

How can we set same for smartforms

Former Member
0 Kudos

You can use option in smartform:

DATA: p_out LIKE ssfcompop,

p_ctrl LIKE ssfctrlop.

CLEAR: p_out,

p_ctrl.

p_out-tdnoprev = 'X'.

p_out-tdnoprint = 'X'.

p_out-tdnoarch = 'X'.

p_out-tddelete = 'X'.

p_out-tddest = p_dest.

p_out-tdnewid = ''.

p_out-tdimmed = ' '.

p_out-tdcopies = 1.

p_out-tddataset = sy-repid.

p_out-tddelete = ' '.

CALL FUNCTION fm_name

EXPORTING

inv_header = tmp_header

<b>output_options = p_out

control_parameters = p_ctrl</b>

user_settings = ' '

TABLES

t_item = tmp_item

t_price = tmp_price

t_partner = tmp_partner

t_docflow = tmp_docflow

t_beer_item = tmp_beer_item

t_wine_item = tmp_wine_item.

Thanks

Seshu

Former Member
0 Kudos

what is the P_DEST in above program this is of reference what?

Former Member
0 Kudos

p_dest is the printer name ( Parameter in selection-screen )

Thanks

Seshu

Former Member
0 Kudos

There is no selection screen in my program, when ever the transaction runs, it should sent to spool directly, not to printer.

so ,what can i give in place of p_dest in above code.

Regards

RAj.

Former Member
0 Kudos

See the below simple program and it creates spool ,use SP01 Transaction to see output.

&----


*& Report ZTESTSPOOL

*&

&----


*&

*&

&----


REPORT ztestspool.

DATA : arc_params TYPE arc_params,

v_print_parms TYPE pri_params,

w_valid TYPE char1,

w_valid_spool TYPE char1.

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

lc_locl TYPE sypdest VALUE 'LOCL', " Destination

c_x TYPE char1 VALUE 'X'.

  • Setup the Print Parmaters

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

authority = space

immediately = space

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.

NEW-PAGE PRINT ON PARAMETERS v_print_parms NO DIALOG.

*PERFORM display_output.

write 😕 'This is test for spool generation'.

NEW-PAGE PRINT OFF.

*write 😕 'This is test for spool generation', sy-SPONO.

Thanks

Seshu

Former Member
0 Kudos

Do we print later on what we sent to spool?

former_member196280
Active Contributor
0 Kudos

Yes, we have to print it later from spool, goto SP01 or SP02

Rgds,

Sairam