cancel
Showing results for 
Search instead for 
Did you mean: 

To skip the print preview window of the smartform

Former Member
0 Kudos

Hi,

i don't need the print preview window of the smartform it shoul directly get printed and also the spool should be generated i went thro the previous questions of the same topic i din't get what and why they are exactly doing can anyone help with the code along with the explanation as i am new to smartform.

Thanks in advance kindly help urgent

Accepted Solutions (0)

Answers (5)

Answers (5)

sachin_soni
Active Participant
0 Kudos

Hi,

Declare the following variables !

DATA: control TYPE ssfctrlop ,

output_options TYPE ssfcompop.

DATA: lf_device TYPE tddevice.

Set their properties as follows :

control-preview = ' '. " NO PREVIEW THE OUTPUT OF THE FORM

control-no_dialog = 'X'. " DO NOT SHOW DIALOG

output_options-tddest = 'LP01'. " SPECIFY THE NAME OF DEFAULT PRINTER

output_options-tdimmed = 'X'.

Now in when u call smartform use the output options and control parameters.

CALL FUNCTION g_form_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

control_parameters = control

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

output_options = output_options

user_settings = ' '

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

it_weigh = it_weigh

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Check this link.I am explaining the same in this link.

https://wiki.sdn.sap.com/wiki/pages/pointstab/viewpageversion.action?pageId=36109&version=2

As suggested already, you need to make the change in the code I explained there.

output_options-tdnoprint = ''."No printing from print preview

Former Member
0 Kudos

Hi,

Set the control parameter TDNOPREV = 'X'.

Regards,

Satish

Former Member
0 Kudos

hi,

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,

Omkar.

former_member195698
Active Contributor
0 Kudos

try this.