<?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: 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/2126768#M446640</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;describe TABLE it_attach LINES w_cnt.&lt;/P&gt;&lt;P&gt;  READ TABLE it_attach INDEX w_cnt.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  w_doc_data-doc_size =&lt;/P&gt;&lt;P&gt;     ( w_cnt - 1 ) * 1055 + STRLEN( it_attach ).&amp;lt;/b&amp;gt;  &lt;/P&gt;&lt;P&gt;w_doc_data-obj_langu  = sy-langu.&lt;/P&gt;&lt;P&gt;  w_doc_data-obj_name   = 'SAPRPT'.&lt;/P&gt;&lt;P&gt;  w_doc_data-obj_descr  = ld_mtitle.&lt;/P&gt;&lt;P&gt;  w_doc_data-sensitivty = 'F'.&lt;/P&gt;&lt;P&gt;  CLEAR t_attachment.&lt;/P&gt;&lt;P&gt;  REFRESH t_attachment.&lt;/P&gt;&lt;P&gt;  t_attachment[] = pit_attach[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are u missing columns or rows ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Apr 2007 10:44:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-16T10:44:49Z</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/2126763#M446635</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 am using the Function Module to send email with attachment. The program is running fine and i am able to send email with the attachment successfully. There are 10 lines in the internal table, but in the attachment i can see all of them in 5 or 6 lines. I want each record in a separate line. Please suggest me how to proceed this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly with the body of the message. How can we enter the text in new line? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Phani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:51:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/2126763#M446635</guid>
      <dc:creator>PS_1978</dc:creator>
      <dc:date>2007-04-13T09:51:43Z</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/2126764#M446636</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 link :&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/email/emailhome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/email/emailhome.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;L Appana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:57:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/2126764#M446636</guid>
      <dc:creator>Laxmana_Appana_</dc:creator>
      <dc:date>2007-04-13T09:57:53Z</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/2126765#M446637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check OBJ- Size .&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;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:58:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/2126765#M446637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T09:58:19Z</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/2126766#M446638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coming in 5 /6 lines is due to unequal lengths of internal tbale line length and the length of line in the out put file(generalluy 255 characters) you see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So decrease the length of line filed in the internal table in you report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you could get it after this correction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward Points if it helps you.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Rama chary.Pammi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 10:08:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/2126766#M446638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T10:08:09Z</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/2126767#M446639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prabhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per your suggestion, i have checked the document size and corrected it. But the problem is still there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the code used to append the attachment table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;class cl_abap_char_utilities definition load.
constants:
    con_tab  type c value cl_abap_char_utilities=&amp;gt;HORIZONTAL_TAB,
    con_cret type c value cl_abap_char_utilities=&amp;gt;CR_LF.


  CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
         INTO it_attach SEPARATED BY con_tab.
*  CONCATENATE it_attach con_cret INTO it_attach.
  APPEND  it_attach.

  LOOP AT it_ekpo INTO wa_charekpo.
    CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
                wa_charekpo-aedat wa_charekpo-matnr
           INTO it_attach SEPARATED BY con_tab.
*    CONCATENATE it_attach con_cret INTO it_attach.
    APPEND  it_attach.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code for Finding Document size and filling corresponding details:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLEAR w_doc_data.
describe TABLE it_attach LINES w_cnt.
  READ TABLE it_attach INDEX w_cnt.
  w_doc_data-doc_size =
     ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
  w_doc_data-obj_langu  = sy-langu.
  w_doc_data-obj_name   = 'SAPRPT'.
  w_doc_data-obj_descr  = ld_mtitle.
  w_doc_data-sensitivty = 'F'.
  CLEAR t_attachment.
  REFRESH t_attachment.
  t_attachment[] = pit_attach[].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code of the FM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
            document_data              = w_doc_data
            put_in_outbox              = 'X'
            sender_address             = ld_sender_address
            sender_address_type        = ld_sender_address_type
            commit_work                = 'X'
       IMPORTING
            sent_to_all                = w_sent_all
       TABLES
            packing_list               = t_packing_list
            contents_bin               = t_attachment
            contents_txt               = it_message
            receivers                  = t_receivers
       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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&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;Phani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 10:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/2126767#M446639</guid>
      <dc:creator>PS_1978</dc:creator>
      <dc:date>2007-04-13T10:20:36Z</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/2126768#M446640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;describe TABLE it_attach LINES w_cnt.&lt;/P&gt;&lt;P&gt;  READ TABLE it_attach INDEX w_cnt.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  w_doc_data-doc_size =&lt;/P&gt;&lt;P&gt;     ( w_cnt - 1 ) * 1055 + STRLEN( it_attach ).&amp;lt;/b&amp;gt;  &lt;/P&gt;&lt;P&gt;w_doc_data-obj_langu  = sy-langu.&lt;/P&gt;&lt;P&gt;  w_doc_data-obj_name   = 'SAPRPT'.&lt;/P&gt;&lt;P&gt;  w_doc_data-obj_descr  = ld_mtitle.&lt;/P&gt;&lt;P&gt;  w_doc_data-sensitivty = 'F'.&lt;/P&gt;&lt;P&gt;  CLEAR t_attachment.&lt;/P&gt;&lt;P&gt;  REFRESH t_attachment.&lt;/P&gt;&lt;P&gt;  t_attachment[] = pit_attach[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are u missing columns or rows ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 10:44:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-document-send-api1/m-p/2126768#M446640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T10:44:49Z</dc:date>
    </item>
  </channel>
</rss>

