Skip to Content
avatar image
Former Member

How to email a smartform?

In the form interface of my form, I am passing the recipients email in MAIL_RECIPIENT and the current user's email in the MAIL_SENDER parameters. I need my form to be emailed once its processed. During runtime it gives errors. Does anyone have any experience in sending a smartform via email?

Also has anyone tried dynamically to show JPG files in the smartforms. I entered a fieldname using &, in the Graphics window but it gives compile errors. This field is filled in the program.

<MOVED BY MODERATOR TO THE CORRECT FORUM>

Edited by: Alvaro Tejada Galindo on Dec 26, 2008 11:15 AM

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

14 Answers

  • avatar image
    Former Member
    Dec 11, 2013 at 09:25 AM

    Dear Kshitij

    Please check below link you will Definitely your Solution

    Sending Mail using Oo (2) - Smartforms

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Moulika,

      check at this line, if you really got the table filled with data to convert. If not, you have to check the smartforms error.

      ** Convert the OTF to PDF.

      CALL FUNCTION 'CONVERT_OTF_2_PDF'

      These you can easiliy check by using transaction Smartform_trace (perhaps its smartforms_trace, I don't know yet exactly)

      Did you set a breakpoint at the message raising yet? That would be very helpful to find the issue.

      And please, share your error-message (class + Message) with us. It is really hard to suggest things by just having a few infos.

      ~Florian

  • avatar image
    Former Member
    Oct 14, 2004 at 06:51 PM

    Well what I've used several times is the function CONVERT_OTFSPOOLJOB_2_PDF to convert the smartform spool output to a pdf and attach this one to the email. Unfortunately you have to transfer the output table of the function to a mail attachable format (the function returns a table of type tline, the email function SO_NEW_DOCUMENT_ATT_SEND_API1 needs a table of type solisti1).

    Hope it helps...

    Regards

    Roger

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Roger, thanks for your reply. Unfortunately I do not want to use the API1 fm. I would like to use the internal email parameters supplied with SMARTFORMS. Also I'm trying to show a graphic dynamically with no success so far. If that's not possible then show the URL of the graphic in a hypertext format.

  • Oct 26, 2004 at 02:27 PM

    I would also like to see some example code of how to email a smartform using the function generated by smartforms.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      please cold you post an example?

      I need to send a PO smartforms by email and it continue not to work. I am able to print, send fax but not email. I'm working on a 4.6c

      thank you all!

  • avatar image
    Former Member
    Jan 26, 2005 at 08:06 PM

    Is this in 4.6C? If not does anybody have any hints for me on how to email a smartform in 4.6C?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Do you want to mail to a sap-user or to an external internet mail address?

      - For sap-user as recipient you will have to change the

      parameter for <b>ip_type_id</b> of the

      function 'CREATE_RECIPIENT_OBJ_PPF' to either <b>B

      </b> or <b>O</b>.

      - the internet mail address has to be in complete form like name@company.com, in variable g_mail (as in my coding snippet)

  • avatar image
    Former Member
    Mar 15, 2005 at 03:28 PM

    I've got it working now - thanks for your help! One last question. I have already defined distribution lists in SAP. Is there somewhere that I can enter the distirbution list name to send the e-mail to rather than the individual e-mail addresses?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 15, 2005 at 04:47 PM

    I forgot to mention that under call function 'CREATE_RECIPIENT_OBJ_PPF', I tried entering the distribution list under IP_MAILADDR and 'S' under IP_TYPE_ID, but this did not seem to work.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      well I've never used a distribution list in this context but you may better use 'C' for general distribution list or 'P' for personal distribution list because I can't find any 'S' for IP_TYPE_ID in the value range of that domain.

  • avatar image
    Former Member
    Mar 16, 2005 at 02:38 PM

    That was a typo on my part, I did try a 'C' and it doesn't work. Any other suggestions on how I can use this for a distribution list would be appreciated.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 06, 2005 at 06:42 PM

    Hi All,

    I am able to get mail in SAP Inbox (IP type ID B)with Smartform body but when I use external mail (IP type ID U), User gets e-mail to company mail Id but not smartform attachment - form is missing.

    I would appreciate any help.

    Thanks in advance.

    -Bharat

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 16, 2005 at 03:15 PM

    Hi all,

    I also would like to send a smartform via email, I changed my code based on Olaf's example, got no error, just a

    "MAIL request 00000000000xx created successfully"

    message. (xx -> an increasing number)

    And nothing happens.

    I checked the TA SCOT to see any mail movement/error occurs or not. But there is neither error, nor successfully mail send.

    What could be the problem?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Peter,

      you need to run the program RSCONN01 with variant INT.

      Best way is to make it as periodic job.

      You could check your outgoing E-mails via TA SOST (if you got the authoritiy)

      Hope it works

      Olaf

  • avatar image
    Former Member
    Aug 11, 2005 at 11:39 AM

    Hello people,

    thank i advance for this posts, i have implemented in my system and works very well, but i have a question, can i use a distribution list for the recepient?

    Thanks

    AOL

    Add comment
    10|10000 characters needed characters exceeded