<?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 can I send multiple attachments using SO_DYNP_OBJECT_SEND? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472271#M1651435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Old post, but just for anyone looking at this going forward, the object length is calculated incorrectly and you might get corrupt files this way. When you calculate the length don't just take the number of lines * 255 as the last line might not (and most likely won't) have a length of 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So use :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gs_packing_list-objlen&amp;nbsp;&amp;nbsp;&amp;nbsp; = ( lines( gt_att_cont) - 1 ) * 255 + strlen( gt_att_cont[ lines( gt_att_cont ) ]-line ). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Sep 2016 22:45:28 GMT</pubDate>
    <dc:creator>wouter_venhuizen2</dc:creator>
    <dc:date>2016-09-08T22:45:28Z</dc:date>
    <item>
      <title>How can I send multiple attachments using SO_DYNP_OBJECT_SEND?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472267#M1651431</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;I hope someone can offer advice on my problem.&lt;/P&gt;&lt;P&gt;My requirement is to allow users to select one or more documents from an ALV grid.  I am then required to send these documents to multiple users via email using function module SO_DYNP_OBJECT_SEND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can successfully send one document as an attachment.  However, I can't seem to figure out how to send multiple documents as attachments using SO_DYNP_OBJECT_SEND.  Is this done in the packing list?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some way to tell the program where the 1st attachment ends and the 2nd attachment starts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My attachment content is in i_att_cont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL FUNCTION 'SO_DYNP_OBJECT_SEND'
    EXPORTING
      object_hd_change = l_title
      object_type      = 'RAW'
      raw_editor       = abap_true
      starting_at_x    = '5'
      starting_at_y    = '1'
      ending_at_x      = '120'
      ending_at_y      = '20'
      edit_title       = 'X'
      external_commit  = abap_true
    TABLES
      objcont          = i_objcont
      rec_tab          = i_rec_tab
      packing_list     = i_packing_list
      att_cont         = i_att_cont
      exclude_fcode    = i_exclude_fcode
    EXCEPTIONS
      object_not_sent  = 1
      owner_not_exist  = 2
      parameter_error  = 3
      OTHERS           = 4.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you require more information, please let me know.  I will be happy to provide it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 15:51:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472267#M1651431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-05T15:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can I send multiple attachments using SO_DYNP_OBJECT_SEND?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472268#M1651432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jennifer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure with this fm possible.Can you go through this [Multiple Attachments|http://wiki.sdn.sap.com/wiki/display/Snippets/Send&lt;EM&gt;Mail&lt;/EM&gt;having&lt;EM&gt;Multiple&lt;/EM&gt;Files&lt;EM&gt;as&lt;/EM&gt;Attachment&lt;EM&gt;using&lt;/EM&gt;object&lt;EM&gt;oriented&lt;/EM&gt;technique] wiki.Check if it is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 17:57:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472268#M1651432</guid>
      <dc:creator>madhu_vadlamani</dc:creator>
      <dc:date>2012-01-05T17:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can I send multiple attachments using SO_DYNP_OBJECT_SEND?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472269#M1651433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must use the function module SO_DYNP_OBJECT_SEND to send the attachments (and not CL_BCS classes).  This is a user requirement.  They want to see the pop-up screen and enter email text and add recipients.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Jennifer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 18:09:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472269#M1651433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-05T18:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can I send multiple attachments using SO_DYNP_OBJECT_SEND?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472270#M1651434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally found the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The trick is to ensure you put the correct values in the body_start, body_num and objlen fields of the packing list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each additional attachment should start (body_start) at the end of the last attachment + 1.&lt;/P&gt;&lt;P&gt;The value for body_num is equal to the number of lines in the attachment being added.&lt;/P&gt;&lt;P&gt;And the objlen field is calculated by multiplying the number of lines in the attachent * 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Static data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   gs_packing_list-file_ext = lv_ext.&lt;/P&gt;&lt;P&gt;   gs_packing_list-transf_bin = 'X'.&lt;/P&gt;&lt;P&gt;   gs_packing_list-objla = sy-langu.&lt;/P&gt;&lt;P&gt;   gs_packing_list-objtp = 'EXT'.&lt;/P&gt;&lt;P&gt;   gs_packing_list-objdes = lv_filename.&lt;/P&gt;&lt;P&gt;   gs_packing_list-objnam = 'Attachment'.&lt;/P&gt;&lt;P&gt;   gs_packing_list-head_start = 1.&lt;/P&gt;&lt;P&gt;   gs_packing_list-head_num = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Body Start&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   CLEAR lv_count.&lt;/P&gt;&lt;P&gt;   DESCRIBE TABLE gt_temp_att_cont LINES lv_count.&lt;/P&gt;&lt;P&gt;   gs_packing_list-body_start = lv_count + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Body Num + Object Length&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   CLEAR lv_count.&lt;/P&gt;&lt;P&gt;   DESCRIBE TABLE gt_att_cont LINES lv_count.&lt;/P&gt;&lt;P&gt;   gs_packing_list-body_num = lv_count.&lt;/P&gt;&lt;P&gt;   gs_packing_list-objlen = lv_count * 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   APPEND gs_packing_list TO gt_packing_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this helps some desperate soul in the future.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2012 19:54:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472270#M1651434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-06T19:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can I send multiple attachments using SO_DYNP_OBJECT_SEND?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472271#M1651435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Old post, but just for anyone looking at this going forward, the object length is calculated incorrectly and you might get corrupt files this way. When you calculate the length don't just take the number of lines * 255 as the last line might not (and most likely won't) have a length of 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So use :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gs_packing_list-objlen&amp;nbsp;&amp;nbsp;&amp;nbsp; = ( lines( gt_att_cont) - 1 ) * 255 + strlen( gt_att_cont[ lines( gt_att_cont ) ]-line ). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 22:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-send-multiple-attachments-using-so-dynp-object-send/m-p/8472271#M1651435</guid>
      <dc:creator>wouter_venhuizen2</dc:creator>
      <dc:date>2016-09-08T22:45:28Z</dc:date>
    </item>
  </channel>
</rss>

