on 04-17-2007 11:30 AM
how to eliminate pop-up window (for print options) which appears on executing the driver program (report program ) when we convert smart-form output to .pdf format .
In any smartform Form interface you can see the import parameter
"CONTROL_PARAMETERS" OF TYPE "SSFCTRLOP". Also you can see export parameter "JOB_OUTPUT_INFO" OF TYPE "SSFCRESCL"
___________________________________________________________________
For OTF output SSFCTRLOP-GETOTF = X.
If parameter GETOTF is set, SAP Smart Forms only returns the OTF table without printing, displaying, or faxing the form. Therefore, you should use the <b>NO_DIALOG</b> parameter to suppress the spool dialog. The application program can use the field JOB_OUTPUT_INFO-OTFDATA (export parameter) to access the OTF table.
<b>Note:</b> If the GETOTF parameter is set, SAP Smart Forms ignores the setting of the DEVICE parameter of the control structure. You cannot have the OTF table returned to you and send the form to an output device. Furthermore, you cannot have the form returned in both OTF and other output formats in one call of the generated function module.
____________________________________________________________________
Since we are here only to talk about OTF conversion, so look at the field OTFDATA of type TSFOTF.
What I want to tell here is that whatever smartform layout displays is stored in this OTFDATA table.
We just need to pass this JOB_OUTPUT_INFO-OTFDATA to function module 'CONVERT_OTF and finally get the PDF formats for our display.
____________________________________________________________________
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here is the way you should suppress the print preview dialog of smartform
data: ctrl_param type ssfctrlop,
fm_name type rs38l_fnam.
ctrl_param-no_dialog = 'X'.
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
control_parameters = ctrl_param
*output_options = out_option
user_settings = space
tables
itab = itab[]
exceptions
.
.
.
This will work.
Cheers,
Simha.
Reward all the helpful answers...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.