Single spool Output_options (SMART FORM)
HI Guys,
I have a problem with the output_options values in
my smart form report. Whenever I run the report which
has more than a row, it prints in single spool without any
problem. If there is a single row, report does not print
anything at all.
I am attaching my code here . please help me.
Regards,
Harsha
SORT itab BY gpag avm_nr inv_no pos_nr.
control_parametres-no_open = 'X'.
control_parametres-no_close = 'X'.
output_options-tddest = 'LOCL'.
control_parametres-no_dialog = 'X'.
control_parametres-device = 'PRINTER'.
control_parametres-preview = ' '.
output_options-tdnewid = 'X'.
output_options-tdimmed = 'X'.
output_options-tddelete = 'X'.
AT FIRST.
control_parametres-no_open = ' '.
ENDAT.
AT NEW inv_no.
CLEAR sf_tab.
REFRESH sf_tab.
ENDAT.
MOVE-CORRESPONDING itab TO sf_tab.
APPEND sf_tab.
AT END OF inv_no.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMASF_TIMES_JOB_INVOICE'
IMPORTING
fm_name = fm_name.
CALL FUNCTION fm_name
EXPORTING
control_parameters = control_parametres
output_options = output_options
user_settings = ' '
TABLES
itab = sf_tab
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDAT.
ENDLOOP.