<?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 Multiple Attachments in SO_OBJECT_SEND in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652292#M611462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I hope someone could help me with this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement calls for the reports in smartform to be generated into pdf, and then emailed to the specific user.  Now, so far managed to generate my smartform into pdf using the function module CONVERT_OTF:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
      FORMAT                      = 'PDF'
      MAX_LINEWIDTH               = 132
    IMPORTING
      BIN_FILESIZE                = w_bin_filesize
    TABLES
      otf                         = t_otf
      lines                       = t_pdf_tab
    EXCEPTIONS
      ERR_MAX_LINEWIDTH           = 1
      ERR_FORMAT                  = 2
      ERR_CONV_NOT_POSSIBLE       = 3
      ERR_BAD_OTF                 = 4
      OTHERS                      = 5&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I need to attach more than 1 reports to my email.  Checking several reference codes, I saw that I need to place the contents of &amp;lt;b&amp;gt;t_pdf_tab&amp;lt;/b&amp;gt; into the &amp;lt;b&amp;gt;OBJCONT&amp;lt;/b&amp;gt; parameter of SO_OBJECT_SEND.  How will I be able to attach my second, third, etc. reports to the email?  Is appending the lines of t_pdf_tab of each smartform to an internal table and pass it to OBJCONT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.  Points for any helpful answer.  Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Aug 2007 05:43:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-09T05:43:21Z</dc:date>
    <item>
      <title>Multiple Attachments in SO_OBJECT_SEND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652292#M611462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I hope someone could help me with this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement calls for the reports in smartform to be generated into pdf, and then emailed to the specific user.  Now, so far managed to generate my smartform into pdf using the function module CONVERT_OTF:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
      FORMAT                      = 'PDF'
      MAX_LINEWIDTH               = 132
    IMPORTING
      BIN_FILESIZE                = w_bin_filesize
    TABLES
      otf                         = t_otf
      lines                       = t_pdf_tab
    EXCEPTIONS
      ERR_MAX_LINEWIDTH           = 1
      ERR_FORMAT                  = 2
      ERR_CONV_NOT_POSSIBLE       = 3
      ERR_BAD_OTF                 = 4
      OTHERS                      = 5&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I need to attach more than 1 reports to my email.  Checking several reference codes, I saw that I need to place the contents of &amp;lt;b&amp;gt;t_pdf_tab&amp;lt;/b&amp;gt; into the &amp;lt;b&amp;gt;OBJCONT&amp;lt;/b&amp;gt; parameter of SO_OBJECT_SEND.  How will I be able to attach my second, third, etc. reports to the email?  Is appending the lines of t_pdf_tab of each smartform to an internal table and pass it to OBJCONT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.  Points for any helpful answer.  Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 05:43:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652292#M611462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-09T05:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Attachments in SO_OBJECT_SEND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652293#M611463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maple,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sending you the example code.&lt;/P&gt;&lt;P&gt;please go through it you will get the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************1st attachment data  taken into lt_objbin1 &lt;/P&gt;&lt;P&gt;Loop at ITAB.&lt;/P&gt;&lt;P&gt;Append lt_objbin1 .&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****1st Attachemnt&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Write Packing List (Attachment)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    l_att_type = 'txt'.&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE lt_objbin1 LINES l_tab_lines.&lt;/P&gt;&lt;P&gt;    READ TABLE lt_objbin1 INDEX l_tab_lines.&lt;/P&gt;&lt;P&gt;    lt_objpack1-doc_size = ( l_tab_lines - 1 ) * 255&lt;/P&gt;&lt;P&gt;                                    + STRLEN( lt_objbin1 ).&lt;/P&gt;&lt;P&gt;    lt_objpack1-transf_bin = 'X'.&lt;/P&gt;&lt;P&gt;    lt_objpack1-head_start = 1.&lt;/P&gt;&lt;P&gt;    lt_objpack1-head_num = 0.&lt;/P&gt;&lt;P&gt;    lt_objpack1-body_start = 1.&lt;/P&gt;&lt;P&gt;    lt_objpack1-body_num = l_tab_lines.&lt;/P&gt;&lt;P&gt;    lt_objpack1-doc_type = l_att_type.&lt;/P&gt;&lt;P&gt;    lt_objpack1-obj_name = 'Cost allocation file'.&lt;/P&gt;&lt;P&gt;    lt_objpack1-obj_descr = 'Cost allocation file'.&lt;/P&gt;&lt;P&gt;    APPEND lt_objpack1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******lt_objbin1 is the attachment table. here in the 1st line size is from  0 to l_tab_lines  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************2nd Attachment data taken into itab2.&lt;/P&gt;&lt;P&gt;Loop at ITAB.&lt;/P&gt;&lt;P&gt;Append lt_objbin1 .&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******************2nd Attachment&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Write Packing List (Attachment)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    l_att_type = 'txt'.&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE lt_objbin1 LINES l_tab_lines1.&lt;/P&gt;&lt;P&gt;    l_tab_lines2 = l_tab_lines1 - l_tab_lines.&lt;/P&gt;&lt;P&gt;    READ TABLE lt_objbin INDEX l_tab_lines2.&lt;/P&gt;&lt;P&gt;lt_objpack1-doc_size = ( l_tab_lines2 - 1 ) * 255 + STRLEN( lt_objbin1 )&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;    lt_objpack1-transf_bin = 'X'.&lt;/P&gt;&lt;P&gt;    lt_objpack1-head_start = l_tab_lines2.&lt;/P&gt;&lt;P&gt;    lt_objpack1-head_num = 0.&lt;/P&gt;&lt;P&gt;    lt_objpack1-body_start = l_tab_lines + 1.&lt;/P&gt;&lt;P&gt;    lt_objpack1-body_num = l_tab_lines2.&lt;/P&gt;&lt;P&gt;    lt_objpack1-doc_type = l_att_type.&lt;/P&gt;&lt;P&gt;    lt_objpack1-obj_name = 'Success file '.&lt;/P&gt;&lt;P&gt;    lt_objpack1-obj_descr = 'Success file '.&lt;/P&gt;&lt;P&gt;    APPEND lt_objpack1.&lt;/P&gt;&lt;P&gt;*****************Here the line size is from l_tab_lines + 1 to l_tab_lines2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the variables must be declared properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me know if you need anymore clarifications on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if u find this suggestion helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yuvaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 12:09:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652293#M611463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-09T12:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Attachments in SO_OBJECT_SEND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652294#M611464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Yuvaraj!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the tip.  I have another question, though.  When you attach the ITAB contents to lt_objbin1, do you still need to perform the TABLE_COMPRESS function?  If yes, what will be the parameters?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 23:19:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652294#M611464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-09T23:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Attachments in SO_OBJECT_SEND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652295#M611465</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;Check this &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1449617"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 23:32:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652295#M611465</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-08-09T23:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Attachments in SO_OBJECT_SEND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652296#M611466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maple,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case no need to perform the TABLE_COMPRESS function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used it and using this code only I have sent two attachments as text files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lel me know if u still need any clarification on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yuvaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2007 06:40:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652296#M611466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-10T06:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Attachments in SO_OBJECT_SEND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652297#M611467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did not use SO_OBJECT_SEND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Used instead the following classes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cl_bcs&lt;/P&gt;&lt;P&gt;cl_document_bcs&lt;/P&gt;&lt;P&gt;cl_sapuser_bcs&lt;/P&gt;&lt;P&gt;cl_cam_address_bcs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2007 08:29:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-attachments-in-so-object-send/m-p/2652297#M611467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-10T08:29:12Z</dc:date>
    </item>
  </channel>
</rss>

