<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to email Smartforms in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234179#M140210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still not getting it.  Any chance you could post me a complete and simple example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Mar 2006 22:21:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-14T22:21:07Z</dc:date>
    <item>
      <title>How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234168#M140199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to e-mail a smartform and I think I might have most of it figured out.  The part I am confused about is the mail_appl_object and what exactly is required.  I have copied my code below and I am getting the error "The type swc_object is unknown".  I basically copied most of this code from other users on the SDN.   Can someone please help .... what exactly would I need to do?  thx!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;control_parameters TYPE ssfctrlop.   &lt;/P&gt;&lt;P&gt;control_parameters-device = 'MAIL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:	email_recipient     TYPE SWOTOBJID,     &lt;/P&gt;&lt;P&gt;     	email_sender        TYPE SWOTOBJID,     &lt;/P&gt;&lt;P&gt;     	g_mail_app_obj type SWOTOBJID,&lt;/P&gt;&lt;P&gt;	FOLDER TYPE swcobject,            &lt;/P&gt;&lt;P&gt;	BEGIN OF SOFMFOL_KEY,&lt;/P&gt;&lt;P&gt;	FOLDERTYPE LIKE SOFM-FOLTP,&lt;/P&gt;&lt;P&gt;	FOLDERYEAR LIKE SOFM-FOLYR,&lt;/P&gt;&lt;P&gt;	FOLDERNUMBER LIKE SOFM-FOLNO,&lt;/P&gt;&lt;P&gt;	TYPE LIKE SOFM-DOCTP,&lt;/P&gt;&lt;P&gt;	YEAR LIKE SOFM-DOCYR,&lt;/P&gt;&lt;P&gt;	NUMBER LIKE SOFM-DOCNO,&lt;/P&gt;&lt;P&gt;	FORWARDER LIKE SOUB-USRNAM,&lt;/P&gt;&lt;P&gt;	END OF SOFMFOL_KEY,&lt;/P&gt;&lt;P&gt;	BOR_KEY LIKE SWOTOBJID-OBJKEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM mail_recipient_object.&lt;/P&gt;&lt;P&gt;PERFORM mail_sender_object.&lt;/P&gt;&lt;P&gt;PERFORM mail_appl_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Determine Function Module Name of SmartForm&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      FORMNAME = 'ZMY_SMARTFORM'        "SmartForm Name&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      FM_NAME  = func_mod_name            EXCEPTIONS&lt;/P&gt;&lt;P&gt;     OTHERS   = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION func_mod_name&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   CONTROL_PARAMETERS         =  control_parameters&lt;/P&gt;&lt;P&gt;   MAIL_APPL_OBJ              =  g_mail_app_obj&lt;/P&gt;&lt;P&gt;   MAIL_RECIPIENT             =  email_recipient&lt;/P&gt;&lt;P&gt;   MAIL_SENDER                =  email_sender&lt;/P&gt;&lt;P&gt;   USER_SETTINGS              = 'X'&lt;/P&gt;&lt;P&gt;   MTRL_NO                    = icoa_dlvrys-matnr&lt;/P&gt;&lt;P&gt;   MTRL_DESCR                 = icoa_dlvrys-maktx&lt;/P&gt;&lt;P&gt;   CUSTOMER_NO                = icoa_dlvrys-kunnr&lt;/P&gt;&lt;P&gt;   CUSTOMER_NAME              = icoa_dlvrys-name1&lt;/P&gt;&lt;P&gt;   V_MANDT                    = sy-mandt&lt;/P&gt;&lt;P&gt;   V_SYSID                    = sy-sysid&lt;/P&gt;&lt;P&gt;   CERTIFIED_BY               = r_certby&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;    izqm_coa_prpylene          = izqm_coa_prpylene &lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   FORMATTING_ERROR           = 1&lt;/P&gt;&lt;P&gt;   INTERNAL_ERROR             = 2&lt;/P&gt;&lt;P&gt;   SEND_ERROR                 = 3&lt;/P&gt;&lt;P&gt;   USER_CANCELED              = 4&lt;/P&gt;&lt;P&gt;   OTHERS                     = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;&lt;P&gt;**FORM:  mail_recipient_object&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;&lt;P&gt;FORM mail_recipient_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: email_address TYPE SO_NAME.&lt;/P&gt;&lt;P&gt;email_address =  'MyEmail@Address.Com'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   IP_MAILADDR             = email_address         &lt;/P&gt;&lt;P&gt;   IP_TYPE_ID              =  'U'              &lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   EP_RECIPIENT_ID         = email_recipient&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   INVALID_RECIPIENT       = 1&lt;/P&gt;&lt;P&gt;   OTHERS                  = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.    "mail_recipient_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;*FORM:  mail_sender_object&lt;P&gt;&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;&lt;P&gt;FORM mail_sender_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   IP_SENDER            = sy-uname&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   EP_SENDER_ID         = email_sender&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   INVALID_SENDER       = 1&lt;/P&gt;&lt;P&gt;   OTHERS               = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.    "mail_sender_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;* FORM mail_appl_object.&lt;P&gt;&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;&lt;P&gt;FORM mail_appl_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from soud INTO soud&lt;/P&gt;&lt;P&gt;  WHERE sapnam LIKE sy-uname and deleted = ''.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SO_USER_AUTOMATIC_INSERT'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   SAPNAME                       = SY-UNAME&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   NO_INSERT                     = 1&lt;/P&gt;&lt;P&gt;   SAP_NAME_EXIST                = 2&lt;/P&gt;&lt;P&gt;   X_ERROR                       = 3&lt;/P&gt;&lt;P&gt;   SAP_NAME_NOT_EXIST            = 4&lt;/P&gt;&lt;P&gt;   OTHERS                        = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR soud.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR sofmfol_key.&lt;/P&gt;&lt;P&gt;sofmfol_key-type = 'FOL'.&lt;/P&gt;&lt;P&gt;sofmfol_key-year = soud-inbyr.&lt;/P&gt;&lt;P&gt;sofmfol_key-number = soud-inbno.&lt;/P&gt;&lt;P&gt;bor_key = sofmfol_key.&lt;/P&gt;&lt;P&gt;IF NOT bor_key IS INITIAL.&lt;/P&gt;&lt;P&gt;swc_create_object folder 'SOFMFOL' bor_key.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  swc_object_to_persistent folder p_mail_app_obj.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    CLEAR g_mail_app_obj.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  CLEAR g_mail_app_obj.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.  "mail_appl_object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 18:56:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234168#M140199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T18:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234169#M140200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a sample code in attached thread. Have a look &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1278408"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 19:11:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234169#M140200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T19:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234170#M140201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide me your E-mail ID. I will send u the code. It is too big and I can't paste it here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lanka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 19:21:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234170#M140201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T19:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234171#M140202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this weblog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 19:26:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234171#M140202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T19:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234172#M140203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All of this code seems really really involved ... is there not an easier way to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 20:48:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234172#M140203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T20:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234173#M140204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using your solution use "SO_OBJECT_SEND"&lt;/P&gt;&lt;P&gt;once you get the OTF code from smartform call and converted into PDF. This way you can send the attachments&lt;/P&gt;&lt;P&gt;very easily.Or else you can send your smartform output as it is as attachement along with some text in the body.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 21:03:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234173#M140204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T21:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234174#M140205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My preference would be to send the smartform email as an attachment.  Do you have some example code of how to do this?  thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 21:08:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234174#M140205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T21:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234175#M140206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These threads give information to send smartform by mail. Have a look -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="151084"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="233090"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1171290"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 21:28:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234175#M140206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T21:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234176#M140207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Threads you sent are actually the same one I used to build my code ... could perhaps explain what the mail_appl_object is for any why I am getting the error "The type swc_object is unknown".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 21:37:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234176#M140207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T21:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234177#M140208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried this weblog earlier and it worked for me -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure about your error though...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 21:54:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234177#M140208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T21:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234178#M140209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try : OBJECT_TYPE as OTF for Smartforms .&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SO_OBJECT_SEND'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        FOLDER_ID                        = X_SOODK&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        FORWARDER                        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        OBJECT_FL_CHANGE                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        OBJECT_HD_CHANGE                 = X_SOOD1&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        OBJECT_ID                        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   &amp;lt;b&amp;gt;     OBJECT_TYPE                      = 'OTF'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lanka&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 22:00:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234178#M140209</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T22:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234179#M140210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still not getting it.  Any chance you could post me a complete and simple example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2006 22:21:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234179#M140210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-14T22:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234180#M140211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chek these links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Internal Table declarations
 
DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
      i_tline TYPE TABLE OF tline WITH HEADER LINE,
      i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
      i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
* Objects to send mail.
      i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
      i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
      i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
      i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
 
* Work Area declarations
      wa_objhead TYPE soli_tab,
      w_ctrlop TYPE ssfctrlop,
      w_compop TYPE ssfcompop,
      w_return TYPE ssfcrescl,
      wa_doc_chng typE sodocchgi1,
      w_data TYPE sodocchgi1,
      wa_buffer TYPE string,"To convert from 132 to 255
 
* Variables declarations
      v_form_name TYPE rs38l_fnam,
      v_len_in LIKE sood-objlen,
      v_len_out LIKE sood-objlen,
      v_len_outn TYPE i,
      v_lines_txt TYPE i,
      v_lines_bin TYPE i.
 
call function 'SSF_FUNCTION_MODULE_NAME'
     exporting
          formname           = 'ZZZ_TEST1'
     importing
          fm_name            = v_form_name
     exceptions
          no_form            = 1
          no_function_module = 2
          others             = 3.
IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
 
 
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
 
CALL FUNCTION v_form_name
     EXPORTING
          control_parameters = w_ctrlop
          output_options     = w_compop
          user_settings      = 'X'
     IMPORTING
          job_output_info    = w_return
     EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
 
i_otf[] = w_return-otfdata[].
 
call function 'CONVERT_OTF'
       EXPORTING
            format                = 'PDF'
            max_linewidth         = 132
       IMPORTING
            bin_filesize          = v_len_in
       TABLES
            otf                   = i_otf
            lines                 = i_tline
       EXCEPTIONS
            err_max_linewidth     = 1
            err_format            = 2
            err_conv_not_possible = 3
            others                = 4.
*   Fehlerhandling
  if sy-subrc &amp;lt;&amp;gt; 0.
 
  endif.
 
  loop at i_tline.
    translate i_tline using '~'.
    concatenate wa_buffer i_tline into wa_buffer.
  endloop.
 
  translate wa_buffer using '~'.
 
  do.
    i_record = wa_buffer.
    append i_record.
    shift wa_buffer left by 255 places.
    if wa_buffer is initial.
      exit.
    endif.
  enddo.
 
* Attachment
  refresh:
    i_reclist,
    i_objtxt,
    i_objbin,
    i_objpack.
 
  clear wa_objhead.
 
  i_objbin[] = i_record[].
 
 
******* Create Message Body
**** Title and Description
  i_objtxt = 'test with pdf-Attachment!'.
  append i_objtxt.
  describe table i_objtxt lines v_lines_txt.
  read table i_objtxt index v_lines_txt.
  wa_doc_chng-obj_name = 'smartform'.
  wa_doc_chng-expiry_dat = sy-datum + 10.
  wa_doc_chng-obj_descr = 'smartform'.
  wa_doc_chng-sensitivty = 'F'.
  wa_doc_chng-doc_size = v_lines_txt * 255.
 
**** Main Text
*  wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt )
*.
  clear i_objpack-transf_bin.
  i_objpack-head_start = 1.
  i_objpack-head_num = 0.
  i_objpack-body_start = 1.
  i_objpack-body_num = v_lines_txt.
  i_objpack-doc_type = 'RAW'.
  append i_objpack.
 
**** Attachment
* (pdf-Attachment)
  i_objpack-transf_bin = 'X'.
  i_objpack-head_start = 1.
  i_objpack-head_num = 0.
  i_objpack-body_start = 1.
* Länge des Attachment ermitteln
  describe table i_objbin lines v_lines_bin.
  read table i_objbin index v_lines_bin.
  i_objpack-doc_size =  v_lines_bin * 255 .
 
  i_objpack-body_num = v_lines_bin.
  i_objpack-doc_type = 'PDF'.
  i_objpack-obj_name = 'smart'.
  i_objpack-obj_descr = 'test'.
  append i_objpack.
 
  clear i_reclist.
  i_reclist-receiver = 'jayanthi.gayathri@wipro.com'.
  i_reclist-rec_type = 'U'.
  append i_reclist.
 
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
         EXPORTING
              document_data              = wa_doc_chng
              put_in_outbox              = 'X'
         TABLES
              packing_list               = i_objpack
              object_header              = wa_objhead
              CONTENTS_BIN               = i_objbin
              contents_txt               = i_objtxt
              receivers                  = i_reclist
         EXCEPTIONS
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
              parameter_error            = 5
              x_error                    = 6
              enqueue_error              = 7
              others                     = 8.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 04:18:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234180#M140211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T04:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234181#M140212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most of my Problem was that I was missing the &lt;/P&gt;&lt;P&gt;include &amp;lt;cntn01&amp;gt;. statement.  I have copied all of my code just in case it might benefit someone else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables:  soud.&lt;/P&gt;&lt;P&gt;data: control_parameters TYPE ssfctrlop,   &lt;/P&gt;&lt;P&gt;output_options   TYPE ssfcompop,     &lt;/P&gt;&lt;P&gt;EMail_Subject(50) TYPE c.&lt;/P&gt;&lt;P&gt;DATA:	email_recipient     TYPE SWOTOBJID,  &lt;/P&gt;&lt;P&gt;     	email_sender        TYPE SWOTOBJID,  &lt;/P&gt;&lt;P&gt;     	g_mail_app_obj type SWOTOBJID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate text-004 '400000124' into EMail_Subject.&lt;/P&gt;&lt;P&gt;  control_parameters-device = 'MAIL'.&lt;/P&gt;&lt;P&gt;  control_parameters-no_dialog = 'X'.&lt;/P&gt;&lt;P&gt;  control_parameters-preview = space.&lt;/P&gt;&lt;P&gt;  output_options-tdnewid   = 'X'.&lt;/P&gt;&lt;P&gt;  output_options-tdtitle = EMail_Subject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM mail_recipient_object.&lt;/P&gt;&lt;P&gt;PERFORM mail_sender_object.&lt;/P&gt;&lt;P&gt;PERFORM mail_appl_object changing g_mail_app_obj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Determine Function Module Name of SmartForm&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      FORMNAME = 'ZMY_SMARTFORM'        &lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      FM_NAME  = func_mod_name          &lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;     OTHERS   = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION func_mod_name&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   CONTROL_PARAMETERS         =  control_parameters&lt;/P&gt;&lt;P&gt;   MAIL_APPL_OBJ              =  g_mail_app_obj&lt;/P&gt;&lt;P&gt;   MAIL_RECIPIENT             =  email_recipient&lt;/P&gt;&lt;P&gt;   MAIL_SENDER                =  email_sender&lt;/P&gt;&lt;P&gt;   OUTPUT_OPTIONS    	   = output_options&lt;/P&gt;&lt;P&gt;   USER_SETTINGS              = 'X'&lt;/P&gt;&lt;P&gt;   MTRL_NO                    = icoa_dlvrys-matnr&lt;/P&gt;&lt;P&gt;   MTRL_DESCR                 = icoa_dlvrys-maktx&lt;/P&gt;&lt;P&gt;   CUSTOMER_NO                = icoa_dlvrys-kunnr&lt;/P&gt;&lt;P&gt;   CUSTOMER_NAME              = icoa_dlvrys-name1&lt;/P&gt;&lt;P&gt;   V_MANDT                    = sy-mandt&lt;/P&gt;&lt;P&gt;   V_SYSID                    = sy-sysid&lt;/P&gt;&lt;P&gt;   CERTIFIED_BY               = r_certby&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;    izqm_coa_prpylene          = izqm_coa_prpylene &lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   FORMATTING_ERROR           = 1&lt;/P&gt;&lt;P&gt;   INTERNAL_ERROR             = 2&lt;/P&gt;&lt;P&gt;   SEND_ERROR                 = 3&lt;/P&gt;&lt;P&gt;   USER_CANCELED              = 4&lt;/P&gt;&lt;P&gt;   OTHERS                     = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;**FORM:  mail_recipient_object&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;FORM mail_recipient_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: email_address TYPE SO_NAME.&lt;/P&gt;&lt;P&gt;email_address =  'MyEmail@Address.Com'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   IP_MAILADDR             = email_address     &lt;/P&gt;&lt;P&gt;   IP_TYPE_ID              =  'U'              &lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   EP_RECIPIENT_ID         = email_recipient   &lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   INVALID_RECIPIENT       = 1&lt;/P&gt;&lt;P&gt;   OTHERS                  = 2&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;ENDFORM.    "mail_recipient_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;*FORM:  mail_sender_object&lt;P&gt;&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;&lt;P&gt;FORM mail_sender_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   IP_SENDER            = sy-uname&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   EP_SENDER_ID         = email_sender&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   INVALID_SENDER       = 1&lt;/P&gt;&lt;P&gt;   OTHERS               = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.    "mail_sender_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;* FORM mail_appl_object.&lt;P&gt;&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;&lt;P&gt;FORM mail_appl_object changing g_mail_app_obj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  include &amp;lt;cntn01&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: FOLDER TYPE swc_object,&lt;/P&gt;&lt;P&gt;        BEGIN OF SOFMFOL_KEY,&lt;/P&gt;&lt;P&gt;        FOLDERTYPE LIKE SOFM-FOLTP,&lt;/P&gt;&lt;P&gt;        FOLDERYEAR LIKE SOFM-FOLYR,&lt;/P&gt;&lt;P&gt;        FOLDERNUMBER LIKE SOFM-FOLNO,&lt;/P&gt;&lt;P&gt;        TYPE LIKE SOFM-DOCTP,&lt;/P&gt;&lt;P&gt;        YEAR LIKE SOFM-DOCYR,&lt;/P&gt;&lt;P&gt;        NUMBER LIKE SOFM-DOCNO,&lt;/P&gt;&lt;P&gt;        FORWARDER LIKE SOUB-USRNAM,&lt;/P&gt;&lt;P&gt;        END OF SOFMFOL_KEY,&lt;/P&gt;&lt;P&gt;        BOR_KEY LIKE SWOTOBJID-OBJKEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT single * FROM soud WHERE sapnam LIKE sy-uname AND deleted = ' '.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'SO_USER_AUTOMATIC_INSERT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        SAPNAME            = SY-UNAME&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        NO_INSERT          = 1&lt;/P&gt;&lt;P&gt;        SAP_NAME_EXIST     = 2&lt;/P&gt;&lt;P&gt;        X_ERROR            = 3&lt;/P&gt;&lt;P&gt;        SAP_NAME_NOT_EXIST = 4&lt;/P&gt;&lt;P&gt;        OTHERS             = 5.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear sofmfol_key.&lt;/P&gt;&lt;P&gt;  sofmfol_key-type = 'FOL'.&lt;/P&gt;&lt;P&gt;  sofmfol_key-year = soud-inbyr.&lt;/P&gt;&lt;P&gt;  sofmfol_key-number = soud-inbno.&lt;/P&gt;&lt;P&gt;  bor_key = sofmfol_key.&lt;/P&gt;&lt;P&gt;  IF not bor_key is initial.&lt;/P&gt;&lt;P&gt;    swc_create_object folder 'SOFMFOL' bor_key.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      swc_object_to_persistent folder g_mail_app_obj.&lt;/P&gt;&lt;P&gt;      IF sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;        clear g_mail_app_obj.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    clear g_mail_app_obj.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.  "mail_appl_object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 19:56:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234181#M140212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T19:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234182#M140213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Janice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You've been more than kind.  Your code helped me out of my own problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am able to send payment advices by email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ernesto&lt;/P&gt;&lt;P&gt;ZF Sachs Suspension Mexico - SAP Financials.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2006 21:54:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234182#M140213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-06T21:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234183#M140214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SAP gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to send a sample smartform by email by using the code below. When I execute the program system shows below succes message.&lt;/P&gt;&lt;P&gt;"MAIL request 000000000029 created successfully.&lt;/P&gt;&lt;P&gt;Message no. SSFCOMPOSER024"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I can see nothing coming in SCOT/SOST and it doesnt sends any email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything I need to configure in system settings.&lt;/P&gt;&lt;P&gt;Moreover when I try to send any email to extenal email addresses from SAP office system is sending email correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be highly appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Shabbeer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  Z_SF_EX_03                                                  *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  Z_SF_EX_03                              .&lt;/P&gt;&lt;P&gt;tables: soud.&lt;/P&gt;&lt;P&gt;data: carr_id type sbook-carrid,&lt;/P&gt;&lt;P&gt;      fm_name type rs38l_fnam.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     cust_id type scustom-id.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter: p_custid type scustom-id default 1.&lt;/P&gt;&lt;P&gt;select-options: "s_custid for cust_id default 1 to 1,&lt;/P&gt;&lt;P&gt;                s_carrid for carr_id     default 'LH' to 'LH'.&lt;/P&gt;&lt;P&gt;parameter:      p_form   type tdsfname   default 'SF_EXAMPLE_01'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               p_email  type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: customer    type scustom,&lt;/P&gt;&lt;P&gt;      bookings    type ty_bookings,&lt;/P&gt;&lt;P&gt;      connections type ty_connections,&lt;/P&gt;&lt;P&gt;      output_option type ssfcompop,&lt;/P&gt;&lt;P&gt;      zssfcrescl type ssfcrescl,&lt;/P&gt;&lt;P&gt;      zssfcresop type ssfcresop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include &amp;lt;cntn01&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;select single * from scustom&lt;/P&gt;&lt;P&gt;  into customer&lt;/P&gt;&lt;P&gt;  where id eq p_custid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from sbook into table bookings&lt;/P&gt;&lt;P&gt;         where customid eq p_custid&lt;/P&gt;&lt;P&gt;         and   carrid   in s_carrid&lt;/P&gt;&lt;P&gt;         order by primary key.&lt;/P&gt;&lt;P&gt;select * from spfli into table connections&lt;/P&gt;&lt;P&gt;         for all entries in bookings&lt;/P&gt;&lt;P&gt;         where carrid = bookings-carrid&lt;/P&gt;&lt;P&gt;         and   connid = bookings-connid&lt;/P&gt;&lt;P&gt;         order by primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: control_parameters TYPE ssfctrlop,&lt;/P&gt;&lt;P&gt;output_options TYPE ssfcompop,&lt;/P&gt;&lt;P&gt;EMail_Subject(50) TYPE c.&lt;/P&gt;&lt;P&gt;DATA: email_recipient TYPE SWOTOBJID,&lt;/P&gt;&lt;P&gt;email_sender TYPE SWOTOBJID,&lt;/P&gt;&lt;P&gt;g_mail_app_obj type SWOTOBJID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate text-004 '400000124' into EMail_Subject.&lt;/P&gt;&lt;P&gt;control_parameters-device = 'MAIL'.&lt;/P&gt;&lt;P&gt;control_parameters-no_dialog = 'X'.&lt;/P&gt;&lt;P&gt;control_parameters-preview = 'X'."space.&lt;/P&gt;&lt;P&gt;output_options-tdnewid = 'X'.&lt;/P&gt;&lt;P&gt;output_options-tdtitle = EMail_Subject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM mail_recipient_object.&lt;/P&gt;&lt;P&gt;PERFORM mail_sender_object.&lt;/P&gt;&lt;P&gt;PERFORM mail_appl_object changing g_mail_app_obj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Determine Function Module Name of SmartForm&lt;/P&gt;&lt;P&gt;call function 'SSF_FUNCTION_MODULE_NAME'&lt;/P&gt;&lt;P&gt;     exporting  formname           = p_form&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                variant            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                direct_call        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     importing  fm_name            = fm_name&lt;/P&gt;&lt;P&gt;     exceptions no_form            = 1&lt;/P&gt;&lt;P&gt;                no_function_module = 2&lt;/P&gt;&lt;P&gt;                others             = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  error handling&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now call the generated function module&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call function fm_name&lt;/P&gt;&lt;P&gt;         exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                archive_index        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                archive_parameters   =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                   control_parameters   = control_parameters&lt;/P&gt;&lt;P&gt;                     mail_appl_obj        = g_mail_app_obj&lt;/P&gt;&lt;P&gt;                     mail_recipient       = email_recipient&lt;/P&gt;&lt;P&gt;                     mail_sender          = email_sender&lt;/P&gt;&lt;P&gt;                     output_options       = output_options&lt;/P&gt;&lt;P&gt;                     user_settings        = 'X'&lt;/P&gt;&lt;P&gt;                    customer             = customer&lt;/P&gt;&lt;P&gt;                    bookings             = bookings&lt;/P&gt;&lt;P&gt;                    connections          = connections&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     document_output_info =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                 job_output_info      = zssfcrescl&lt;/P&gt;&lt;P&gt;                 job_output_options   = zssfcresop&lt;/P&gt;&lt;P&gt;         exceptions formatting_error     = 1&lt;/P&gt;&lt;P&gt;                    internal_error       = 2&lt;/P&gt;&lt;P&gt;                    send_error           = 3&lt;/P&gt;&lt;P&gt;                    user_canceled        = 4&lt;/P&gt;&lt;P&gt;                    others               = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*break-point.&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;**FORM: mail_recipient_object&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;FORM mail_recipient_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: email_address TYPE SO_NAME.&lt;/P&gt;&lt;P&gt;email_address = 'shabbir_be@yahoo.com'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;IP_MAILADDR = email_address&lt;/P&gt;&lt;P&gt;IP_TYPE_ID = 'U'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;EP_RECIPIENT_ID = email_recipient&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;INVALID_RECIPIENT = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;ENDFORM. "mail_recipient_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;*FORM:&lt;P&gt;&lt;/P&gt;&lt;P&gt;*form mail_sender_object&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;&lt;P&gt;FORM&lt;/P&gt;&lt;P&gt;form mail_sender_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;IP_SENDER = sy-uname&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;EP_SENDER_ID = email_sender&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;INVALID_SENDER = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "mail_sender_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;* FORM&lt;P&gt;&lt;/P&gt;&lt;P&gt;*form mail_appl_object.&lt;/P&gt;&lt;P&gt;**----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------" /&gt;&lt;P&gt;FORM&lt;/P&gt;&lt;P&gt;form mail_appl_object changing g_mail_app_obj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FOLDER TYPE swc_object,&lt;/P&gt;&lt;P&gt;BEGIN OF SOFMFOL_KEY,&lt;/P&gt;&lt;P&gt;FOLDERTYPE LIKE SOFM-FOLTP,&lt;/P&gt;&lt;P&gt;FOLDERYEAR LIKE SOFM-FOLYR,&lt;/P&gt;&lt;P&gt;FOLDERNUMBER LIKE SOFM-FOLNO,&lt;/P&gt;&lt;P&gt;TYPE LIKE SOFM-DOCTP,&lt;/P&gt;&lt;P&gt;YEAR LIKE SOFM-DOCYR,&lt;/P&gt;&lt;P&gt;NUMBER LIKE SOFM-DOCNO,&lt;/P&gt;&lt;P&gt;FORWARDER LIKE SOUB-USRNAM,&lt;/P&gt;&lt;P&gt;END OF SOFMFOL_KEY,&lt;/P&gt;&lt;P&gt;BOR_KEY LIKE SWOTOBJID-OBJKEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT single * FROM soud WHERE sapnam LIKE sy-uname AND deleted = ' '.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SO_USER_AUTOMATIC_INSERT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;SAPNAME = SY-UNAME&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NO_INSERT = 1&lt;/P&gt;&lt;P&gt;SAP_NAME_EXIST = 2&lt;/P&gt;&lt;P&gt;X_ERROR = 3&lt;/P&gt;&lt;P&gt;SAP_NAME_NOT_EXIST = 4&lt;/P&gt;&lt;P&gt;OTHERS = 5.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear sofmfol_key.&lt;/P&gt;&lt;P&gt;sofmfol_key-type = 'FOL'.&lt;/P&gt;&lt;P&gt;sofmfol_key-year = soud-inbyr.&lt;/P&gt;&lt;P&gt;sofmfol_key-number = soud-inbno.&lt;/P&gt;&lt;P&gt;bor_key = sofmfol_key.&lt;/P&gt;&lt;P&gt;IF not bor_key is initial.&lt;/P&gt;&lt;P&gt;swc_create_object folder 'SOFMFOL' bor_key.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;swc_object_to_persistent folder g_mail_app_obj.&lt;/P&gt;&lt;P&gt;IF sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;clear g_mail_app_obj.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;clear g_mail_app_obj.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "mail_appl_object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2006 05:13:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234183#M140214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-26T05:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234184#M140215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I add text in the body of the email generated through a smartform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 11:12:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234184#M140215</guid>
      <dc:creator>sushant_singh</dc:creator>
      <dc:date>2007-03-19T11:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to email Smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234185#M140216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shabeer: Use COMMIT WORK after your smartform call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sushant Singh:&lt;/P&gt;&lt;P&gt;I am also having the same issue as you are having ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to add text to the body of the email ? Anybody ....your help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Surya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 18:26:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-email-smartforms/m-p/1234185#M140216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T18:26:45Z</dc:date>
    </item>
  </channel>
</rss>

