on 03-20-2008 7:59 AM
DATA: wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop.
This is the code i'm using to generate SF. i want to generate PDF using this SF. so i don't want to display the dialogbox for "print". This is urgent.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_ctrlop-preview = 'X'.
wa_outopt-tdnoprev = 'X'.
Invoking SF *********************
CALL FUNCTION form_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = wa_ctrlop
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = wa_outopt
user_settings = 'X'
mydate = p_date
reason = p_rea
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otfdata
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
.
Hi,
If you want to avoid the printer dialogue window do follow the below procedure:
DATA : device TYPE ssfctrlop,
ws_form_fname TYPE rs38l_fnam.
INITIALIZATION .
device-no_dialog = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Smartform Name'
IMPORTING
fm_name = ws_form_fname.
CALL FUNCTION ws_form_fname
EXPORTING
control_parameters = device
IMPORTING
job_output_info = ls_output_info
TABLES
i_final_ap = i_final_ap.
You will need to set the field DEVICE to PRINTER in structure CONTROL_PARAMETERS, as well as filling the print parameter in OUTPUT_OPTIONS.
Define a structure ls_output_info of type SSFCRESCL, and then pass it.
I believe even this is not required, just the structure device needs to be modified with the value 'X' ..along with the value for the device as printer (device-device = 'PRINTER').
Regards,
Narendra.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is the modified code. but still the dialog box comes.
DATA: wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop,
t_otfdata TYPE ssfcrescl.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_ctrlop-preview = 'X'.
wa_ctrlop-preview = 'PRINTER'.
wa_outopt-tdnoprev = 'X'.
wa_outopt-print = 'X'.
CALL FUNCTION form_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = wa_ctrlop
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = wa_outopt
user_settings = 'X'
mydate = p_date
reason = p_rea
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otfdata
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.