01-10-2017 7:01 AM
Hi experts,
When printing from VL03N, I have use no_dialog to suppress the print pop up from smartforms.
ls_control_param-no_dialog = 'X'.
* Enable print preview
IF sy-ucomm = 'VIEW'.
ls_control_param-preview = 'X'.
ENDIF.
* call smartform delivery note
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
* mail_appl_obj =
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = space
is_dlv_delnote = ls_dlv_delnote
is_nast = nast
* IMPORTING
* document_output_info =
* job_output_info =
* job_output_options =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
* error handling
cf_retcode = sy-subrc.
PERFORM protocol_update.
* get SmartForm protocoll and store it in the NAST protocoll
PERFORM add_smfrm_prot. "INS_HP_335958
ENDIF.
But the printer setting is retrieved from user setting instead of the Print Option from output pop-up, how am I able to the print option from here? Thank you.