on 06-02-2009 11:58 AM
Hi,
I am calling the smartform from the report and in this process I am using "SSF_FUNCTION_MODULE_NAME" function module to get the dynamic name of the FM generated and using this I am calling the smartform.
Now, the user wants to supress the print dialog box and wants to enter the output device on the selection screen of the report(used to call the smartform).
Is there any way to supress the Print dialog box and directly pass the output device name from selection screen to the smartform.
Please help.
Thanks,
Vishal.
Hi,
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = l_c_form
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = l_f_fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
data :l_t_out TYPE ssfcompop,
l_t_control LIKE ssfctrlop.
Here pass the Selection screen printer name to the below variable*
l_t_out-tddest = p_print.
IF sy-subrc = 0.
CALL FUNCTION l_f_fname
EXPORTING
archive_index = toa_dara
ARCHIVE_INDEX_TAB = TSFDARA
archive_parameters = arc_params
control_parameters = l_t_control
output_options = l_t_out
user_settings = space "This should be passed as space then only it works
p_langu = p_langu
TABLES
g_t_item = g_t_final
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Hope it helps!!
Rgds,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = l_c_form
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = l_f_fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
data :l_t_out TYPE ssfcompop,
l_t_control LIKE ssfctrlop.
Here pass the Selection screen printer name to the below variable*
l_t_out-tddest = p_print.
IF sy-subrc = 0.
l_t_control-no_dialog = 'X'. "<----
CALL FUNCTION l_f_fname
EXPORTING
archive_index = toa_dara
ARCHIVE_INDEX_TAB = TSFDARA
archive_parameters = arc_params
control_parameters = l_t_control
output_options = l_t_out
user_settings = space "This should be passed as space then only it works
p_langu = p_langu
TABLES
g_t_item = g_t_final
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
U make sure to transfer all data, not only the print: l_t_out-tddest = p_print.
For example: print is immidietaly? nwe spool? and so....
Hi,
data: function_module_name type rs38l_fnam,
ssfctrlop type ssfctrlop,
ssfcompop type ssfcompop.
*print operations
ssfctrlop-device = printer.
ssfctrlop-no_dialog = x.
ssfcompop-tdnewid = x.
ssfcompop-tddelete = x.
ssfcompop-tddest = locl.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = form
importing
fm_name = function_module_name
exceptions
no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
endif.
call function function_module_name
exporting
control_parameters = ssfctrlop
output_options = ssfcompop
user_settings = ' '
bukrs = bukrs
tables
data_cust = data_display
exceptions
exceptions = 1
formatting_error = 2
internal_error = 3
send_error = 4
user_canceled = 5.
regards,
PP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_SMARTFORM'
IMPORTING
FM_NAME = WF_FUNCMODULENAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
CLEAR: WA_CONTROL_PARAMETERS.
WA_CONTROL_PARAMETERS-GETOTF = 'X'.
WA_CONTROL_PARAMETERS-LANGU = 'E'.
WA_CONTROL_PARAMETERS-DEVICE = 'PRINTER'.
WA_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
WA_CONTROL_PARAMETERS-PREVIEW = SPACE.
CALL FUNCTION WF_FUNCMODULENAME
EXPORTING
CONTROL_PARAMETERS = WA_CONTROL_PARAMETERS "Control Params
OUTPUT_OPTIONS = WA_OUTPUT_OPT "Output Options
WF_CARRID = WF_CARRID
WF_CONNID = WF_CONNID
WF_FLDATE = WF_FLDATE
IMPORTING
DOCUMENT_OUTPUT_INFO = WA_DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = WA_JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = WA_JOB_OUTPUT_OPTIONS
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
The no_dialog parameter solves your purpose.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<copy&paste_removed_by_moderator>
Edited by: Julius Bussche on Jun 3, 2009 7:54 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In addition to Max:
In smartform FM, there is an import parameter to define the print parameters (type PRI_PARAMS).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HIi
try to check the parameter of fm of smartfom, there's one where u can set no dialog:
CONTROL_PARAMETERS (like SSFCTRLOP):
* Set no dialog
SSFCTRLOP-NO_DIALOG = 'X'.
CONTROL_PARAMETERS = SSFCTRLOP-NO_DIALOG
max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.