cancel
Showing results for 
Search instead for 
Did you mean: 

Print only to spool

Former Member
0 Kudos

Hi Experts,

I need to print smartform from z_program only to spool, not directly to the printer. How do I need to maintain parameters of function module?

Thanks&regards,

Jirka

Accepted Solutions (0)

Answers (1)

Answers (1)

naimesh_patel
Active Contributor
0 Kudos

Set the Output Options like:


data:   wa_comp TYPE ssfcompop.

  wa_comp-tdnewid = 'X'.

      CALL FUNCTION lf_fm_name1
        EXPORTING
          output_options     = wa_comp
..

Regards,

Naimesh Patel

Former Member
0 Kudos

Hi,

thanks for quick respond. How can I avoid print dialog? Do I need to specify printer in printing programm or is it possible to specify printer when I want to print from spool request?

Thx.

Jirka

naimesh_patel
Active Contributor
0 Kudos

Explore the importing parameters control_parameters and output_options in the smartform FM.


  DATA: wa_cnt TYPE ssfctrlop, 
        wa_comp TYPE ssfcompop.

* to avoid print dialog
  wa_cnt-no_dialog = c_x.

* Printer
  wa_comp-tddest = 'LOCL'.

* New Spool request
  wa_comp-tdnewid = 'X'.

Regards,

Naimesh Patel