Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Jul 02, 2009 at 02:32 PM

    Hi,

    Pass the OUTPUT_OPTIONS apart from the Control Parameters

    OUTPUT_OPTIONS-TDDEST = 'LOCAL_PRINTER'.

    OUTPUT_OPTIONS-TDIMMED = 'X'

    Refer to this link..smartform-doubt

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 02, 2009 at 02:54 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 03, 2009 at 01:48 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 03, 2009 at 07:41 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 03, 2009 at 11:59 AM

    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

    Add comment
    10|10000 characters needed characters exceeded