Hi guys
i am trying to pass a printer name entered by the user on the selection screen to the smartform for printing. However in the Print Preview it does not show the printer name specified instead it always shows the Printer as LOCL. Below is the code i have used. Can you suggest me how to achieve this ?
data : l_ctrl type SSFCTRLOP,
l_output type SSFCOMPOP.
l_ctrl-preview = 'X'.
l_output-TDDEST = P_PRINT.
l_output-tdnoprint = ' '.
call function l_fm_name
exporting
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = l_ctrl
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = l_output
USER_SETTINGS = 'X'
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.