Skip to Content
0
Former Member
Aug 26, 2008 at 07:46 AM

direct printing of smartform

19 Views

hi evrybody

How to avoid the print popup for smartform?

I want to print directly without preview and popup

I dnt know wats the error in my code

see my code:

  • Get the function module name of the smartform.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = '/EU000/FI_PRINT_DEBIT_NOTE'

IMPORTING

fm_name = g_fm_name.

gw_options-tdnoprev = ' '.

gw_options-tddest = ' '.

gw_options-tdprinter = 'LOCL'.

gw_options-tdnewid = 'X'.

gw_options-tdimmed = 'X'.

gw_control-preview = ' '.

gw_control-no_dialog = 'X'.

  • For all the documents

LOOP AT gi_all_data INTO gw_all_data.

write: text-006, text-007, text-008.

  • Call the smarform

CALL FUNCTION g_fm_name

EXPORTING

gw_all_data = gw_all_data

user_settings = ' '

output_options = gw_options

control_parameters = gw_control.

ENDLOOP.