Skip to Content
author's profile photo Former Member
Former Member

sending smartform output by mail


My requirement is to send smartform output by mail to external mail ids to a given TO:,CC:,BCC: and subject. This smartform is getting triggered by a custom report and not by any standard transaction.

Please give me suggestions how to do this.


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 27, 2004 at 06:03 PM

    This actually quite easy to do with SMARTFORMs. First you will want to fill the control_parameters exporting option for the call to your SMARTForms function module. You want to set the getotf field to 'X'. This will cause the function call to return the raw OTF data as part of the job_output_info importing parameter.

    Example 1

    if email = 'X'.

    control-getotf = 'X'.

    move 'X' to control-no_dialog.


    ****Call the Smart Form generated function module

    move-corresponding job_output_options to output_options.

    call function fm_name


    control_parameters = control

    output_options = output_options

    edidc = edidc

    header = header


    job_output_info = job_output_info

    job_output_options = job_output_options


    schedules = schedules[]

    htext = htext[]

    itext = itext[] .

    You can then convert the OTF to PDF using function CONVERT_OTF and send it as a binary attachement using SO_NEW_DOCUMENT_ATT_SEND_API1. There have been other posts on this forum that detail these steps. There are also some parameters to the SmartForms function call for Mail_appl_obj, mail_recipient, and mail_sender. I have never used these however, because I like the greater control that this approach gives you. Often I am generating more than one output that I want to separate into different file attachments on the same E-Mail.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.