<?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: Reg: Mail attachment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711246#M1453826</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Sakthivel, 
&amp;lt;li&amp;gt;Check the below thread. 
&lt;SPAN __jive_macro_name="message" id="8093262"&gt;&lt;/SPAN&gt;

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Mar 2010 04:35:19 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2010-03-10T04:35:19Z</dc:date>
    <item>
      <title>Reg: Mail attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711243#M1453823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;1. I have created a report by using the function module 'SO_DOCUMENT_SEND_API1' to send mail to &lt;/P&gt;&lt;P&gt;the user with attachments.But in my report i can able to send only one attachment. Now I want to send more &lt;/P&gt;&lt;P&gt;than one attachment in the mail. How can i send? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. while using document type 'XLS' type , I can able to get '.XLS' attachment but i cant get the attached datas &lt;/P&gt;&lt;P&gt; in correct alignment. Instead of getting line items one by one, i am getting all the line item details in a single line in the excel&lt;/P&gt;&lt;P&gt; sheet. How can i clear this problem? Thanks in advance...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sakthivel.VT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 03:49:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711243#M1453823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T03:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Mail attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711244#M1453824</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;yes you can send more then one attachment in a mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see below/:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE, " internal tables declared for sending attachments to the mail

"***********************************************************************
"*Attachment
"***********************************************************************

  n = 1.                                    "for sending 1st attachment

  DESCRIBE TABLE objbin1 LINES tab_lines.
  objpack-doc_size = tab_lines * 255.
  objpack-transf_bin = 'X'.
  objpack-head_start = 1.
  objpack-head_num = 1.
  objpack-body_start = n.
  objpack-body_num = tab_lines.
  objpack-doc_type = 'XLS'.
  docdata-obj_name = 'Excel_File_Attachment1'.
  objpack-obj_descr = 'Excel File Attachment1'.
  APPEND objpack.

  n = n + tab_lines.                       "for sending 2nd attachment


  DESCRIBE TABLE objbin2 LINES tab_lines.
  objpack-doc_size = tab_lines * 255.
  objpack-transf_bin = 'X'.
  objpack-head_start = 1.
  objpack-head_num = 1.
  objpack-body_start = n.
  objpack-body_num = tab_lines.
  objpack-doc_type = 'XLS'.
  docdata-obj_name = 'Excel_File_Attachment2'.
  objpack-obj_descr = 'Excel File Attachment2'.
  APPEND objpack.


  n = n + tab_lines.                       "for sending 3rd attachment


  DESCRIBE TABLE objin3 LINES tab_lines.
  objpack-doc_size = tab_lines * 255.
  objpack-transf_bin = 'X'.
  objpack-head_start = 1.
  objpack-head_num = 1.
  objpack-body_start = n.
  objpack-body_num = tab_lines.
  objpack-doc_type = 'XLS'.
  docdata-obj_name = 'Excel_File_Attachment3'.
  objpack-obj_descr = 'Excel File Attachment3'.
  APPEND objpack.


***********************************************************************
*Create the list of recipients
***********************************************************************

  reclist-receiver = p_email1.
  reclist-rec_type = 'U'.
  reclist-express = 'X'.
  APPEND reclist.

***********************************************************************
*Send the e-mail by using this function module
***********************************************************************

  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data              = docdata
      put_in_outbox              = 'X'
      commit_work                = 'X'
    TABLES
      packing_list               = objpack
      contents_bin               = objbin_final
      contents_txt               = objtxt
      receivers                  = 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.

  COMMIT WORK.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ritesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 04:27:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711244#M1453824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T04:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Mail attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711245#M1453825</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;Refer the below wiki:-&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Multiple Attachments Explanation&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/Snippets/Multiple" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/Snippets/Multiple&lt;/A&gt;&lt;EM&gt;Attachments&lt;/EM&gt;Explanation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you in some way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 04:33:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711245#M1453825</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2010-03-10T04:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Mail attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711246#M1453826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Sakthivel, 
&amp;lt;li&amp;gt;Check the below thread. 
&lt;SPAN __jive_macro_name="message" id="8093262"&gt;&lt;/SPAN&gt;

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 04:35:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711246#M1453826</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2010-03-10T04:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Mail attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711247#M1453827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;Thanks for your replies.&lt;/P&gt;&lt;P&gt;Now i can able to get more than one attachment.&lt;/P&gt;&lt;P&gt;I am having two internal tables( i.e : two attachments).&lt;/P&gt;&lt;P&gt;In both attachments,i am getting the second internal table datas.i cant get first internal table values in first attachment.&lt;/P&gt;&lt;P&gt;Through FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' ,&lt;/P&gt;&lt;P&gt;we can pass only one internal table values. ( i.e:  CONTENTS_BIN    =  I_OBJBIN  )&lt;/P&gt;&lt;P&gt;Here how can i send more than one internal table values.This is what the actual problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for your reference,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA_OBJTEXT[] = IT_ATTACH[].   "'This is attachment 1.'.&lt;/P&gt;&lt;P&gt;  I_OBJBIN[] = WA_OBJTEXT[].&lt;/P&gt;&lt;P&gt;  CLEAR WA_OBJTEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA_OBJTEXT[] = IT_ATTACH1[].   "'This is attachment 2.'.&lt;/P&gt;&lt;P&gt;  I_OBJBIN[] = WA_OBJTEXT[].&lt;/P&gt;&lt;P&gt;  CLEAR WA_OBJTEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE IT_ATTACH LINES LINE.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-TRANSF_BIN = C_X.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-HEAD_START = 2.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-HEAD_NUM   = 1.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-BODY_START = 1. "Itab i_objbin row number&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-BODY_NUM   = LINE.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-DOC_SIZE =  WA_OBJPACK-BODY_NUM * 255 + STRLEN( IT_ATTACH ). "Approximately for 2 Lines-&amp;gt; 255 * 2&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-DOC_TYPE   = 'RAW'.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-OBJ_NAME   = 'Attachment List 1'.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-OBJ_DESCR  = 'Attachment List 1'.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-OBJ_LANGU  = ' '.&lt;/P&gt;&lt;P&gt;  APPEND WA_OBJPACK TO I_OBJPACK.&lt;/P&gt;&lt;P&gt;  CLEAR LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE IT_ATTACH1 LINES LINE.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-TRANSF_BIN = C_X.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-HEAD_START = 3.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-HEAD_NUM   = 1.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-BODY_START = 3.     "Itab i_objbin row number&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-BODY_NUM   = LINE.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-DOC_SIZE   =  WA_OBJPACK-BODY_NUM * 255 + STRLEN( IT_ATTACH1 ). .  "Approximately for 1 Line&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-DOC_TYPE   = 'RAW'.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-OBJ_NAME   = 'Attachment 2'.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-OBJ_DESCR  = 'Attachment 2'.&lt;/P&gt;&lt;P&gt;  WA_OBJPACK-OBJ_LANGU  = ' '.&lt;/P&gt;&lt;P&gt;  APPEND WA_OBJPACK TO I_OBJPACK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Sakthivel.VT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 11:19:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-mail-attachment/m-p/6711247#M1453827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T11:19:41Z</dc:date>
    </item>
  </channel>
</rss>

