<?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: Can we create multiple Smartform attachments on one e-mail? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122886#M109385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to create spool, transform this spool into PDF, and use the function module : SO_OBJECT_SEND to send the mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgd&lt;/P&gt;&lt;P&gt;Frédéric&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Feb 2006 16:03:27 GMT</pubDate>
    <dc:creator>FredericGirod</dc:creator>
    <dc:date>2006-02-23T16:03:27Z</dc:date>
    <item>
      <title>Can we create multiple Smartform attachments on one e-mail?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122885#M109384</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;I have a requirement to attach two different Smartforms as two separate attachments on the same e-mail for external send. Combining the forms into one attachment will not solve the requirement.&lt;/P&gt;&lt;P&gt;Has anyone ever done this? Does anyone know how to?&lt;/P&gt;&lt;P&gt;Please be aware that I am quite new to Smartforms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All suggestions appreciated.&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2006 16:00:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122885#M109384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-23T16:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create multiple Smartform attachments on one e-mail?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122886#M109385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to create spool, transform this spool into PDF, and use the function module : SO_OBJECT_SEND to send the mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgd&lt;/P&gt;&lt;P&gt;Frédéric&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2006 16:03:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122886#M109385</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2006-02-23T16:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create multiple Smartform attachments on one e-mail?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122887#M109386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response Frederic, but wouldn't that generate a single PDF attachment? We need each form in it's own attachment, but on one mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2006 16:18:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122887#M109386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-23T16:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create multiple Smartform attachments on one e-mail?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122888#M109387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In our attempts to email smartforms we were unable to do much with the email interface on the smartforms, other than email a single form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our solution has been to call the smartform not as email but as otf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We then convert the otf and to pdf and attach what we need to the message and send using SO_NEW_DOCUMENT_ATT_SEND_API1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search the forum for the fm  or check the fm documentation for sample code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 01:44:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122888#M109387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T01:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create multiple Smartform attachments on one e-mail?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122889#M109388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the ideas all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you've confirmed my understanding that because the driver is the document we are in effect attaching the e-mail to the document, and cannot therefore attach further documents to the same mail.&lt;/P&gt;&lt;P&gt;Unless someone else knows different...............&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 09:54:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122889#M109388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T09:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create multiple Smartform attachments on one e-mail?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122890#M109389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could send multiple files with the function SO_SEND_OBJECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look the internal table PACKING_LIST, each lines will be a file name. &lt;/P&gt;&lt;P&gt;The file will be store in the internal table ATT_COND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I send you a little part of a code to send one file. I think you will understand how to play with this function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  move '/sap_interfaces/D27/pzr_00/data/test/logo100ans.jpeg'
       to v_file.
  open dataset v_file for input in binary mode.
  do.
    read dataset v_file into v_buff length v_length.
    v_total_length = v_length + v_total_length.
    move v_buff+0(v_length) to fic_attach-line+0(v_length).
    append fic_attach.
    if sy-subrc ne space.
      exit.
    endif.
  enddo.
  describe table fic_attach lines v_num.
  describe field fic_attach-line length v_len.
  move : 'Logo' to packing_list-objdes ,
         'Logo' to packing_list-objnam ,
         '1'    to packing_list-body_start ,
         'raw'  to packing_list-objtp ,
         'GIF'  to packing_list-file_ext .
*  packing_list-body_num = v_num - 1.
  packing_list-body_num = v_num.
*  packing_list-objlen   = ( v_num - 1 ) * v_len.
  packing_list-objlen   =  v_num * v_len.
*  packing_list-objlen   = v_total_length.
  append packing_list.


* Send mail.
  call function 'SO_OBJECT_SEND'
       exporting
           object_hd_change           = object_hd_change
           object_type                = 'RAW'
           owner                      = sy-uname
       tables
           objcont                    = itab_html
           objpara                    = objpara
           receivers                  = receivers
           packing_list               = packing_list
           att_cont                   = fic_attach
       exceptions
           others                     = 01.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgd&lt;/P&gt;&lt;P&gt;Frédéric&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 12:44:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-we-create-multiple-smartform-attachments-on-one-e-mail/m-p/1122890#M109389</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2006-02-24T12:44:04Z</dc:date>
    </item>
  </channel>
</rss>

