cancel
Showing results for 
Search instead for 
Did you mean: 

How to suppres dialog in SMARTFORM processing (aim is mail sending only)

barbara_bendjama
Explorer
0 Kudos

Hi,

My task is to send mail, from SMARTFORM without any dialog. I have specified the following when caling the Smartform funcion module

ls_control_parameters-no_dialog = 'X'.

lrs_control_parameters-getotf = 'X'.

CALL FUNCTION lv_function_name

EXPORTING

CONTROL_PARAMETERS = ls_control_parameters

USER_SETTINGS = ' '

IMPORTING

DOCUMENT_OUTPUT_INFO = ls_document_output_info

JOB_OUTPUT_INFO = ls_job_output_info

JOB_OUTPUT_OPTIONS = ls_job_output_options

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

but still get the popup for Print options.

Could you please help me finding out which settings is missing to get rid of any dialog?

Kind regards,

barbara

Accepted Solutions (0)

Answers (5)

Answers (5)

barbara_bendjama
Explorer
0 Kudos

Hi all,

To get rid of the dialog, I have to set the DEVICE and precise the TDDEST.

If I choose a TDDEST which doies not exist in table TSP03, an error occurs and I cannot get the smartform.

How can I be sure, that the name I will enter as a constant will exist on customer system?

I do not have any dialog for this process and will always use it for mail sending only.

I try to speicy DEVICE = 'MAIL', but it does not help either.

Thanks for feedback.

Barbara

Former Member
0 Kudos

these lines should do the trick:

l_control_parameters-no_dialog = 'X'.

l_control_parameters-preview = ' '.

l_control_parameters-no_open = ' '.

l_control_parameters-no_close = ' '.

l_control_parameters-device = 'PRINTER'.

l_control_parameters-getotf = 'X'.

regards,

Guido

Former Member
0 Kudos

Hi,

I think u should also pass the Printer name to the Output Options of the Function Module for suppressing the dialog window.

by passing the printer name during runtime the dialog takes the Printer name of what u passed and suppresses the dialog window...

better u put a selection screen paramter for printer which should Obligatory, so depends on the user requirement they can pass the required printer name.

DATA : l_t_control LIKE ssfctrlop,

l_t_out TYPE ssfcompop.

l_t_out-tddest = 'LOCL'. ---> Make this as selection screen paramter, if it is not a constant value

l_t_control-no_dialog = 'X'.

CALL FUNCTION fm_name ---->Calling Smartform FM

EXPORTING

control_parameters = l_t_control

output_options = l_t_out

user_settings = space ----> U should also pass this, to suppress the dialog

customer = customer

bookings = bookings

connections = connections

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

Hope it helps!!

Rgds,

Pavan

barbara_bendjama
Explorer
0 Kudos

Hi,

Thanks for the quick anawer.

Changing the settings as described suppress the dialog, but I then get an error in the function module.

Sy-subrc = 3 SEND_ERROR

Does this meains something for you?

Barbara

Former Member
0 Kudos

Hi,

Refer to this link..[Smartform Send via Email|https://wiki.sdn.sap.com/wiki/display/ABAP/SmartformSendvia+Email]

former_member205763
Active Contributor
0 Kudos

setting getotf = x is enough if u are still getting then chk the user settings parameter , try setting it blank and then X try both ways and see if any works

Former Member
0 Kudos

Hi,

Pass the OUTPUT_OPTIONS apart from the Control Parameters

OUTPUT_OPTIONS-TDDEST = 'LOCAL_PRINTER'.

OUTPUT_OPTIONS-TDIMMED = 'X'

Refer to this link..