cancel
Showing results for 
Search instead for 
Did you mean: 

eliminating pop-up windows.

Former Member
0 Kudos

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 .

Accepted Solutions (0)

Answers (2)

Answers (2)

Swetabh
Explorer
0 Kudos

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.

____________________________________________________________________

Simha_
Employee
Employee
0 Kudos

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...

Former Member
0 Kudos

HI Simha,

I have set control parameters and the user settings.But still its not working.

What should I do to eliminate that window.

Regards,

Ranjith.