cancel
Showing results for 
Search instead for 
Did you mean: 

avoid dialog window display

Former Member
0 Kudos

Dear all,

I have one button in alv when i click it a smartform will be called.

My requirement is when i click the print button the smartform will directly go to print without displaying the dialog window(for asking print and print preview).

How to avoid the display of the window?

Regards

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

please code it like below, pass values to required paramters like below:

DATA : l_t_control LIKE ssfctrlop,

l_t_out TYPE ssfcompop.

l_t_out-tddest = 'LOCL'.

l_t_control-no_dialog = 'X'. ---> To avoid that window we should this parameter...

l_t_control-preview = 'X'.

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

.

IF sy-subrc = 0.

CALL FUNCTION l_f_fname

EXPORTING

control_parameters = l_t_control

output_options = l_t_out

user_settings = space ---> To avoid that window we should this parameter...

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

Edited by: vishnu Pavan on Jun 27, 2009 5:56 AM

Former Member
0 Kudos

Hi,

Please set the following paramaters in control parameters option and pass this to smartform.

SSFCTRLOP-No_Dialog = 'X'.

SSFCTRLOP-Preview = ' '. (Space)

Hope this will work.

Regards,

Prashant

Former Member
0 Kudos

Hi

The above solution is corrext.

This can also be achieved by configuring the output device for the user. Ask the basis guys to suppress the dialog for the particular output device you are using. There is some parameter where you can assign PRINT IMMEDIATELY value.

Regards

Vijai

Former Member
0 Kudos

Hi

You need to pass 'X' to "no dialog" parameter of the generated function module Control structure (ie control_parameters import field of your generated FM).

You also need to pass the spool control parmenters to the output_options import parameters of your generated function module.

Regards

Kiran.