cancel
Showing results for 
Search instead for 
Did you mean: 

How to print directly without anything not even a print preview smartform

Former Member
0 Kudos

Hello everybody,

How to print directly without even displaying what is getting printed ,ie no preview on screen , It should just say it has been printed.

Thanks.

Message was edited by:

Khaleel S.Mohammed

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Khaleel,

Please set the parameter dialog = 'X' in the functional moduole 'open_form' in your print program.

For Example:

call function 'OPEN_FORM'

exporting

device = 'PRINTER'

dialog = 'X'

form = ' '

options = itcpo

importing

result = itcpp

exceptions

form = 5.

if sy-subrc eq 0.

write: / 'This has been printed'.

endif.

Hope this helps.

Please reward points if useful.

Thanks,

Srinivasa

Former Member
0 Kudos

Hi,

Try this code in the print program.

Data: lwa_ssfctrlop TYPE ssfctrlop,

lwa_ssfcompop TYPE ssfcompop.

lwa_ssfcompop-tddest = nast-ldest.

lwa_ssfctrlop-no_dialog = 'X'.

lwa_ssfctrlop-preview = ' '.

CALL FUNCTION 'ZMMS_PRCHS_ORDER'

EXPORTING

control_parameters = lwa_ssfctrlop

output_options = lwa_ssfcompop

user_settings = space

gv_bukrs = lv_bukrs

............ = ................

............ = ................

............ = ................

Answers (2)

Answers (2)

former_member196280
Active Contributor
0 Kudos

To print directly, without any preview...

output_opt type ssfcompop

control_param-no_dialog = ''.

control_param-preview = ''.

control_param-getotf = ''.

output_opt-tddest = 'LOCL'.

output_opt-tdimmed = 'X'.

output_opt-tdnewid = 'X'.

output_opt-tdnoprint = ''.

output_opt-tdnoprev = 'X'.

In open form (SAP scripts)

Pass this parameter.

OPTIONS = output_opt

For (smartforms)

Pass it to your smartform function module

output_options = output_opt

Regards,

SaiRam

Former Member
0 Kudos

Hi Khaleel,

In the driver program pass the following parameters to the Calling FM

Structure: SSFCTRLOP

fileds:

DEVICE = <Device Name>

NO_DIALOG = 'X'.

preview = SPACE

This will directly go to print.

Regards,

Lijo Joseph