We have a requirement to change output device settings on the fly in a program. For instance, in case A, we would like to use the output device as it was originally configured in SPAD. However, in case B, we would like to override the output device's access method and host dynamically in code.
Is there any function module or technique that can change these output device properties via code at runtime (printtime)?
By default you will get the output device which you have configured in SPAD.
If you want different output device then you need to write write ABAP code and Pass the required output device during runtime. While calling the function module that is generated after creating the smartform you need to pass the Output device name to the control parameters and output parameters.
Try out this.. The "wa_output_opti
p_output_option
p_output_option
p_output_option
p_output_option
p_output_option
p_output_option
p_output_option
wa_ctrl-no_dial
deactivate the popup window
p_control_param
p_control_param
wa_output_optio
wa_output_optio
wa_output_optio
wa_output_optio
wa_ctrl-no_dial
CALL FUNCTION '/1BCDWB/SF0000
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_T
ARCHIVE_PARAMET
CONTROL_PARAMET
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = p_output_option
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT
JOB_OUTPUT_INFO
JOB_OUTPUT_OPTI
TABLES
wt_header = wi_itab1
wt_personal = wi_itab2
wt_payroll = wi_itab3
wt_absence = wi_itab4
EXCEPTIONS
FORMATTING_ERRO
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.
0 Comments:
Post a Comment