on 03-23-2007 5:13 AM
Hi ,
I am sending a smartform output as a attachment in email using FM SO_NEW_DOCUMENT_ATT_SEND_API1. I don't want the dialog screen
for print options to appear while executing the print program.
How can i remove it.
Thanks ,
Sushant
hi,
make ITCPO-TDNOPRINT = 'X' .or. ' '.
pass this structure to the options parameters in your function module.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI The parameter control_parameters-GETOTF = 'X'. is must for the requirement.
Sushant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naresh ,
I am using the same parameters , but the screen is still appearing .
The parameters I am using are:
control_parameters-GETOTF = 'X'.
control_parameters-no_dialog = 'X'.
output_options-TDNOPREV = 'X'.
The smartform FM , I am using is :
CALL FUNCTION '/1BCDWB/SF00000410'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = output_options
USER_SETTINGS = 'X'
ZCHECK_HEADER = ZCHECK_HEADER
ZCHECK_GENERAL = ZCHECK_GENERAL
ZFORM_TYPE = 'c'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = job_out_info
JOB_OUTPUT_OPTIONS =
TABLES
ZCHECK_DETAIL_REM = ZCHECK_DETAIL_REM
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.
hello Sushanth,
it should work...
even i used the same paramters in soany programs...
these are the varaible u ahve passed for other program...
Once check in the debugginmode whethere this value is populating in the control parameters... r u callin the smartform in any other part of the porgram
st_control_parameters-device = c_printer. "Output device
st_control_parameters-no_dialog = c_x. "SAP Smart Forms: General Indicator
st_output_options-tdtitle = text-011. "Free goods credit notes'
st_output_options-tdnewid = c_x. "create new spool dataset
* ST_OUTPUT_OPTIONS-TDCOPIES = C_N_1. "one copy Commented by SM0001
st_output_options-tddest = p_prntr. "name of printer
st_output_options-tdnoprev = space. "no preview
st_output_options-tdcover = space. "no cover page
st_output_options-tddataset = p_prntr. "dataset name
st_output_options-tdsuffix2 = space. "name of report variant
* ST_OUTPUT_OPTIONS-TDIMMED = C_Y. "print immediately? Commented by SM0001
st_output_options-tddelete = space. "do not delete after print
*****************Insert by SM0001 on 17/10/2006
IF p_tmod = c_2.
st_output_options-tdarmod = c_3.
ELSEIF p_tmod = c_1.
st_output_options-tdcopies = c_n_1. "one copy
st_output_options-tdimmed = c_y. "print immediately?
ELSEIF p_tmod = c_3.
st_output_options-tdarmod = c_3.
st_output_options-tdcopies = c_n_1. "one copy
st_output_options-tdimmed = c_y. "print immediately?
ENDIF.
hi
u r using the correct parameters only.. wht i am asking u is r u calling the smartform somewhere else or only once...!!!
st_control_parameters-device = c_printer. "Output device
st_control_parameters-no_dialog = c_x. "SAP Smart Forms: General Indicator
st_control_parameters-GETOTF = 'X'.
st_output_options-tdnoprev = space. "no preview
Hi Sushant,
Here is the way you should suppress the print preview dialog of smartform
data: ctrl_param type ssfctrlop,
fm_name type rs38l_fnam.
<b>ctrl_param-no_dialog = 'X'.</b>
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = gv_form
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
call function fm_name
exporting
<b>control_parameters = ctrl_param</b>
*output_options = out_option
<b>user_settings = space</b>
tables
itab = itab[]
exceptions
.
.
.
This will work.
Regards,
SP.
HI
W_CTRLOP-NO_DIALOG = 'X'. "COTROLE PARAMETERS
CALL FUNCTION V_FORM_NAME
EXPORTING
CONTROL_PARAMETERS = W_CTRLOP
OUTPUT_OPTIONS = W_COMPOP
USER_SETTINGS = 'X'
IMPORTING
JOB_OUTPUT_INFO = W_RETURN
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.
check field called No print preview in options of that FM
ITCPO.
Regards
prabhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.