<?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 SO_DOCUMENT_SEND_API1 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/3512159#M844838</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 am using function module SO_DOCUMENT_SEND_API1 to send attachment on user's sap id. But when I attach a text file it shows the attachment as follows:- &lt;/P&gt;&lt;P&gt;hello this is test email.&lt;/P&gt;&lt;P&gt;             hello this is test email.&lt;/P&gt;&lt;P&gt;                      hello this is test email.&lt;/P&gt;&lt;P&gt;                              hello this is test email.&lt;/P&gt;&lt;P&gt;                                       hello this is test email.&lt;/P&gt;&lt;P&gt;                                                  hello this is test email.&lt;/P&gt;&lt;P&gt;It starts giving space before starting the new line. Can u pls suggest what should I do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Ritu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Mar 2008 05:15:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-07T05:15:44Z</dc:date>
    <item>
      <title>SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/3512159#M844838</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 am using function module SO_DOCUMENT_SEND_API1 to send attachment on user's sap id. But when I attach a text file it shows the attachment as follows:- &lt;/P&gt;&lt;P&gt;hello this is test email.&lt;/P&gt;&lt;P&gt;             hello this is test email.&lt;/P&gt;&lt;P&gt;                      hello this is test email.&lt;/P&gt;&lt;P&gt;                              hello this is test email.&lt;/P&gt;&lt;P&gt;                                       hello this is test email.&lt;/P&gt;&lt;P&gt;                                                  hello this is test email.&lt;/P&gt;&lt;P&gt;It starts giving space before starting the new line. Can u pls suggest what should I do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Ritu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 05:15:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/3512159#M844838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T05:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/3512160#M844839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;check this code...&lt;/P&gt;&lt;P&gt;*Check if mail sending required...&lt;/P&gt;&lt;P&gt;  if p_mail = c_x.&lt;/P&gt;&lt;P&gt;  if not it_error_desc[] is initial.&lt;/P&gt;&lt;P&gt;*Document data to be passed to function module&lt;/P&gt;&lt;P&gt;    wa_document_data-obj_langu = sy-langu.&lt;/P&gt;&lt;P&gt;    wa_document_data-obj_name = text-023.&lt;/P&gt;&lt;P&gt;    wa_document_data-obj_descr = text-024.&lt;/P&gt;&lt;P&gt;    wa_document_data-sensitivty = c_o.&lt;/P&gt;&lt;P&gt;    it_objtxt = text-061.&lt;/P&gt;&lt;P&gt;    append it_objtxt.&lt;/P&gt;&lt;P&gt;    it_objtxt = text-062.&lt;/P&gt;&lt;P&gt;    append it_objtxt.&lt;/P&gt;&lt;P&gt;    it_objtxt = text-063.&lt;/P&gt;&lt;P&gt;    append it_objtxt.&lt;/P&gt;&lt;P&gt;    it_objtxt = sy-spono.&lt;/P&gt;&lt;P&gt;    append it_objtxt.&lt;/P&gt;&lt;P&gt;    describe table it_objtxt lines v_tablines.&lt;/P&gt;&lt;P&gt;     read     table it_objtxt index v_tablines.&lt;/P&gt;&lt;P&gt;    wa_document_data-doc_size = ( v_tablines - 1 ) * 255 + strlen(&lt;/P&gt;&lt;P&gt;    it_objtxt ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear it_packing_list-transf_bin.&lt;/P&gt;&lt;P&gt;    it_packing_list-head_start = 1.&lt;/P&gt;&lt;P&gt;    it_packing_list-head_num   = 0.&lt;/P&gt;&lt;P&gt;    it_packing_list-body_start = 1.&lt;/P&gt;&lt;P&gt;    it_packing_list-body_num   = v_tablines.&lt;/P&gt;&lt;P&gt;    it_packing_list-doc_type   = text-020.&lt;/P&gt;&lt;P&gt;    append it_packing_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ATTACHMENT DATA&lt;/P&gt;&lt;P&gt;clear wa_objbin.&lt;/P&gt;&lt;P&gt;refresh it_objbin.&lt;/P&gt;&lt;P&gt;constants:&lt;/P&gt;&lt;P&gt;con_tab type c value cl_abap_char_utilities=&amp;gt;horizontal_tab,&lt;/P&gt;&lt;P&gt;con_cret type c value cl_abap_char_utilities=&amp;gt;cr_lf.&lt;/P&gt;&lt;P&gt;"con_tab  Horizontal TAB&lt;/P&gt;&lt;P&gt;"con_cret END OF LINE&lt;/P&gt;&lt;P&gt;clear wa_error_desc.&lt;/P&gt;&lt;P&gt;sort it_error_desc by customer.&lt;/P&gt;&lt;P&gt;concatenate text-051 text-066 text-064&lt;/P&gt;&lt;P&gt;            into str separated by con_tab.&lt;/P&gt;&lt;P&gt;concatenate con_cret str into str.&lt;/P&gt;&lt;P&gt;wa_objbin = str.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_objbin to it_objbin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_error_desc into wa_error_desc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate wa_error_desc-customer wa_error_desc-field&lt;/P&gt;&lt;P&gt;wa_error_desc-desc into str separated by con_tab.&lt;/P&gt;&lt;P&gt;concatenate con_cret str into str.&lt;/P&gt;&lt;P&gt;wa_objbin = str.&lt;/P&gt;&lt;P&gt;append wa_objbin to it_objbin.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Packing Data in a table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    it_packing_list-transf_bin = c_x.&lt;/P&gt;&lt;P&gt;    it_packing_list-head_start = c_1.&lt;/P&gt;&lt;P&gt;    it_packing_list-head_num   = c_0.&lt;/P&gt;&lt;P&gt;    it_packing_list-body_start = c_1.&lt;/P&gt;&lt;P&gt;    describe table it_objbin lines it_packing_list-body_num .&lt;/P&gt;&lt;P&gt;    read table it_objbin index v_tablines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; it_packing_list-doc_size = ( v_tablines - 1 ) * 255 + strlen( it_objbin&lt;/P&gt;&lt;P&gt; ).&lt;/P&gt;&lt;P&gt;    it_packing_list-body_num   = v_tablines.&lt;/P&gt;&lt;P&gt;    it_packing_list-doc_type   = text-067.&lt;/P&gt;&lt;P&gt;    it_packing_list-obj_name   = text-021.&lt;/P&gt;&lt;P&gt;    it_packing_list-obj_descr  = text-022.&lt;/P&gt;&lt;P&gt;    it_packing_list-obj_langu  = sy-langu.&lt;/P&gt;&lt;P&gt;    append it_packing_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Receivers Information&lt;/P&gt;&lt;P&gt;    it_receivers-receiver = p_rec.&lt;/P&gt;&lt;P&gt;*if receiver is a list&lt;/P&gt;&lt;P&gt;    if p_list = 'X'.&lt;/P&gt;&lt;P&gt;      it_receivers-rec_type = c_c.&lt;/P&gt;&lt;P&gt;    else. "else to single user&lt;/P&gt;&lt;P&gt;      it_receivers-rec_type = c_u.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    it_receivers-com_type = c_int.&lt;/P&gt;&lt;P&gt;    it_receivers-notif_del = c_x.&lt;/P&gt;&lt;P&gt;    it_receivers-notif_ndel = c_x.&lt;/P&gt;&lt;P&gt;    append it_receivers.&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*FM To Send E Mail Through SAP                                         *&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;      exporting&lt;/P&gt;&lt;P&gt;        document_data                    = wa_document_data&lt;/P&gt;&lt;P&gt;       put_in_outbox                    = c_x&lt;/P&gt;&lt;P&gt;       commit_work                      = c_x&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SENT_TO_ALL                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NEW_OBJECT_ID                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      tables&lt;/P&gt;&lt;P&gt;        packing_list                     = it_packing_list&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OBJECT_HEADER                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   contents_bin                     = it_objbin&lt;/P&gt;&lt;P&gt;   contents_txt                     = it_objtxt&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONTENTS_HEX                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OBJECT_PARA                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OBJECT_PARB                      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        receivers                        = it_receivers&lt;/P&gt;&lt;P&gt;     exceptions&lt;/P&gt;&lt;P&gt;       too_many_receivers               = 1&lt;/P&gt;&lt;P&gt;       document_not_sent                = 2&lt;/P&gt;&lt;P&gt;       document_type_not_exist          = 3&lt;/P&gt;&lt;P&gt;       operation_no_authorization       = 4&lt;/P&gt;&lt;P&gt;       parameter_error                  = 5&lt;/P&gt;&lt;P&gt;       x_error                          = 6&lt;/P&gt;&lt;P&gt;       enqueue_error                    = 7&lt;/P&gt;&lt;P&gt;       others                           = 8&lt;/P&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&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;    else .&lt;/P&gt;&lt;P&gt;    clear p_mail.&lt;/P&gt;&lt;P&gt;    message s055 with text-081.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;message e044 with text-080.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;  clear p_mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful,&lt;/P&gt;&lt;P&gt;Gaurav J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 05:18:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/3512160#M844839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T05:18:17Z</dc:date>
    </item>
  </channel>
</rss>

