<?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: ABAP send external email in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697389#M1294355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have to write the output in the email body insetad of making it as attachment. its always better to keep it as an attachment as we do not know how long the report output will be. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Sudhahar R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2009 09:11:27 GMT</pubDate>
    <dc:creator>sudhahar_ramachandran</dc:creator>
    <dc:date>2009-06-09T09:11:27Z</dc:date>
    <item>
      <title>ABAP send external email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697388#M1294354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use FM SO_OBJECT_SEND to send external email in my Z program but the output always in attachment format, depend on the format i specified (pdf,htm,txt,xls). I want the output to be in standard email body. How to do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 08:47:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697388#M1294354</guid>
      <dc:creator>former_member621299</dc:creator>
      <dc:date>2009-06-09T08:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP send external email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697389#M1294355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have to write the output in the email body insetad of making it as attachment. its always better to keep it as an attachment as we do not know how long the report output will be. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Sudhahar R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:11:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697389#M1294355</guid>
      <dc:creator>sudhahar_ramachandran</dc:creator>
      <dc:date>2009-06-09T09:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP send external email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697390#M1294356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Check the importing Parameter : &lt;EM&gt;objcont&lt;/EM&gt; .&lt;/P&gt;&lt;P&gt;This will hold the data for the body of the message.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;att_cont&lt;/EM&gt; holds the attachment contents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For message body the format should be in RAW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Formats for attachment:&lt;/P&gt;&lt;P&gt;XLS=&amp;gt;Excel file&lt;/P&gt;&lt;P&gt;RAW=&amp;gt;Text file&lt;/P&gt;&lt;P&gt;PDF=&amp;gt;PDF file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Remi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:17:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697390#M1294356</guid>
      <dc:creator>RemiKaimal</dc:creator>
      <dc:date>2009-06-09T09:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP send external email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697391#M1294357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you please send your code or check if you are passing att_cont parameter in your function module. I would suggest you to use SO_NEW_DOCUMENT_SEND_API1 function module to send mail.&lt;/P&gt;&lt;P&gt;Also find the code below for your reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; REPORT  z_test_email_sending.
DATA:  t_reclist TYPE TABLE OF somlreci1,
      wa_receiver LIKE LINE OF t_reclist,
      objcont TYPE TABLE OF solisti1,
     subject TYPE TABLE OF solisti1,
     objline TYPE solisti1,
      w_line_count   TYPE i,
        doc_chng TYPE sodocchgi1,
        offset type i.

CONSTANTS c_sep  TYPE c VALUE '|'.

DATA : BEGIN OF mail_line OCCURS 0,
      sep0,
      model_year(6),
      sep1,
      mf(4),
      sep2,
      type(5),
      sep3,
      variant(14),
      sep4,
      kitype(5),
      sep5,
      option(8),
      sep6,
      color(8),
      sep7,
      uph(11),
      sep8,
      struc_week(10),
      sep9,
    END OF mail_line.

*construct the message and the e-mail
wa_receiver-receiver = receivers mail id.
* Email Subject
doc_chng-obj_name = 'test mail'.
MOVE 'Cost Error from SAP' TO doc_chng-obj_descr.


doc_chng-obj_langu = sy-langu.
*    doc_chng-SENSITIVTY = 'P'.

* Email body
CLEAR objline.

CONCATENATE 'This is an automatically generated email'
'Please do not reply to this email.'
INTO   objline SEPARATED BY space.
APPEND objline TO objcont.
CLEAR objline.
APPEND objline TO objcont.

CONCATENATE 'Cost errors in SAP as on' sy-datum INTO
objline SEPARATED BY space.
APPEND objline TO objcont.
CLEAR objline.
CLEAR objline.
APPEND objline TO objcont.

* horizontal line at beginning of records
DO 80 TIMES.
  IF sy-index = 1.
*   objline+sy-index(1) = ' '.
    continue.
  ELSE.
    offset = sy-index - 1.
    objline+offset(1) = '-'.
  ENDIF.
ENDDO.

clear offset.

APPEND objline TO objcont.
CLEAR objline.

mail_line-sep0 = c_sep.
mail_line-model_year = 'Model Yr'.
mail_line-sep1 = c_sep.
mail_line-mf = 'Mf'.
mail_line-sep2 = c_sep.
mail_line-type = 'Type'.
mail_line-sep3 = c_sep.
mail_line-variant = 'Variant'.
mail_line-sep4 = c_sep.
mail_line-kitype = 'Ki-type'.
mail_line-sep5 = c_sep.
mail_line-option = 'Option'.
mail_line-sep6 = c_sep.
mail_line-color = 'Color'.
mail_line-sep7 = c_sep.
mail_line-uph = 'Upholstery'.
mail_line-sep8 = c_sep.
mail_line-struc_week = 'Str_week'.
mail_line-sep9 = c_sep.
MOVE mail_line TO objline.
APPEND objline TO objcont.
CLEAR mail_line.

CLEAR objline.

* horizontal line at beginning of records
*horizontal line at beginning of records
DO 80 TIMES.
  IF sy-index = 1.
*   objline+sy-index(1) = ' '.
    continue.
  ELSE.
    offset = sy-index - 1.
    objline+offset(1) = '-'.
  ENDIF.
ENDDO.

clear offset.

APPEND objline TO objcont.CLEAR objline.

DO 5 TIMES.

  mail_line-sep0 = c_sep.
  mail_line-model_year = 'xxxx'.
  mail_line-sep1 = c_sep.
  mail_line-mf = 'xxx'.
  mail_line-sep2 = c_sep.
  mail_line-type = 'xxx'.
  mail_line-sep3 = c_sep.
  mail_line-variant = 'xxxx xxxxx'.
  mail_line-sep4 = c_sep.
  mail_line-kitype = 'xxx'.
  mail_line-sep5 = c_sep.
  mail_line-option = 'xxxxxx'.
  mail_line-sep6 = c_sep.
  mail_line-color = 'xxxxxx'.
  mail_line-sep7 = c_sep.
  mail_line-uph = 'xxxxxx'.
  mail_line-sep8 = c_sep.
  mail_line-struc_week = 'xxxxxx'.
  mail_line-sep9 = c_sep.
  MOVE mail_line TO objline.
  APPEND objline TO objcont.

ENDDO.

CLEAR objline.

*horizontal line at beginning of records
DO 80 TIMES.
  IF sy-index = 1.
*   objline+sy-index(1) = ' '.
    continue.
  ELSE.
    offset = sy-index - 1.
    objline+offset(1) = '-'.
  ENDIF.
ENDDO.

clear offset.

APPEND objline TO objcont.
CLEAR objline.

wa_receiver-rec_type = 'U'.
wa_receiver-com_type = 'INT'.
APPEND wa_receiver TO t_reclist.

.
*   size
DESCRIBE TABLE objcont LINES w_line_count.
READ TABLE objcont INDEX w_line_count INTO objline.
doc_chng-doc_size = ( w_line_count - 1 ) * 255 +
                       STRLEN( objline ).


CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
              EXPORTING
                document_data              = doc_chng
                document_type              = 'RAW'
*                  put_in_outbox              = ' '
                commit_work                = 'X'
              TABLES
*                  object_header             = subject
                object_content             = objcont
                receivers                  = t_reclist
              EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                operation_no_authorization = 4
                OTHERS                     = 9.

IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR Jaideep,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:18:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697391#M1294357</guid>
      <dc:creator>jaideepsharma</dc:creator>
      <dc:date>2009-06-09T09:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP send external email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697392#M1294358</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;  Use the format 'RAW'. you will get in body.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697392#M1294358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T09:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP send external email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697393#M1294359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FM "SO_NEW_DOCUMENT_ATT_SEND_API1".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:23:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697393#M1294359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T09:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP send external email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697394#M1294360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA : doc_chng TYPE sodocchgi1,&lt;/P&gt;&lt;P&gt;       objpack TYPE sopcklsti1 OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       objhead TYPE solisti1 OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       objbin TYPE solisti1 OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       reclist TYPE somlreci1 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    reclist-receiver = email address.&lt;/P&gt;&lt;P&gt;    reclist-rec_type = 'U'.&lt;/P&gt;&lt;P&gt;    reclist-com_type = 'INT'.&lt;/P&gt;&lt;P&gt;    APPEND reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    l_objbin-line = 'Hai how are you?'.&lt;/P&gt;&lt;P&gt;    APPEND l_objbin TO objbin.    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    objpack-transf_bin = 'X'.&lt;/P&gt;&lt;P&gt;    objpack-head_start = 1.&lt;/P&gt;&lt;P&gt;    objpack-head_num = 1.&lt;/P&gt;&lt;P&gt;    objpack-body_start = 1.&lt;/P&gt;&lt;P&gt;    objpack-body_num = tab_lines.&lt;/P&gt;&lt;P&gt;    objpack-doc_type = 'RAW'.&lt;/P&gt;&lt;P&gt;    objpack-obj_name = text-018.&lt;/P&gt;&lt;P&gt;    objpack-obj_descr = text-019.&lt;/P&gt;&lt;P&gt;    objpack-doc_size = tab_lines * 255.&lt;/P&gt;&lt;P&gt;    APPEND 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;      EXPORTING&lt;/P&gt;&lt;P&gt;        document_data              = doc_chng&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        packing_list               = objpack&lt;/P&gt;&lt;P&gt;        object_header              = objhead&lt;/P&gt;&lt;P&gt;        contents_bin               = objbin&lt;/P&gt;&lt;P&gt;        receivers                  = reclist&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;    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;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SUBMIT rsconn01&lt;/P&gt;&lt;P&gt;    WITH mode = 'INT'&lt;/P&gt;&lt;P&gt;    WITH output = ' '&lt;/P&gt;&lt;P&gt;    AND RETURN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:26:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697394#M1294360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T09:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP send external email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697395#M1294361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mail" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mail&lt;/A&gt;&lt;EM&gt;send&lt;/EM&gt;through&lt;EM&gt;output&lt;/EM&gt;controls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 09:46:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697395#M1294361</guid>
      <dc:creator>Madhurivs23</dc:creator>
      <dc:date>2009-06-09T09:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP send external email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697396#M1294362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had used the 'RAW' but it produce pdf attachment. I want the message to be in email body because it is just payment notification and very short content. Moreover my client want this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also had use SO_NEW_DOCUMENT_SEND_API1  but it produce the same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any configuration involved in this? i have check transaction code SCOT, i cant see the format configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: imax80 on Jun 9, 2009 3:33 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: imax80 on Jun 9, 2009 3:44 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 13:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-send-external-email/m-p/5697396#M1294362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T13:32:29Z</dc:date>
    </item>
  </channel>
</rss>

