on 06-01-2009 7:21 AM
Hi all
how can we assign a default output device to a smart form so that the every time we execute a smartform it doesnt ask for a output device?
thanks in advance....
Hi
First see what your default out put device is.
That you can see in SU3>Default>OutputDevice.
Suppose it is set as 'PRINTER' .
Then in ur print program you have to write the logic as below.
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'.
.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
try this
data : p_form type tdsfname,
wk_form type rs38l_fnam,
control type ssfctrlop,
options type ssfcompop.
start-of-selection.
p_form = <formname>.
call function 'SSF_FUNCTION_MODULE_NAME'
importing
formname = p_form
exporting
fm = wk_form
control-preview = 'X'.
control-no_open = 'X'.
control-no_close = 'X'.
options-tddest = 'PrinterName'. ---> sets the default printer name
call function 'SSF_OPEN'
importing
control_parameters = control
output_options = options
loop
call function wk_form
endloop.
call function 'SSF_CLOSE'.
call function 'SSF_READ_ERRORS'.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go to System--->User Profile -
>Own Data ---> In Defaults Tab -> Spool Control-> give u r O/P Device
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the CALL UNCTION of smartform FM, set output options parameter to set the printer name.The O/p options isof the type SSFCOMPPOP which has the field TDDEST. Set TDDEST field to ur default printer
~As in forum
PS - Search forum before posting query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Populate CONTROL_PARAMETERS and pass to samrtfrom FM
DEVICE = SY-PDEST
NO_DIALOG = 'X'
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.