Skip to Content
author's profile photo Former Member
Former Member

EMAIL

Moderator message: please use a meaningful subject in future - and not ALL CAPITALS

I am using following perform for messaging, It is sending mail in CSV format, but I want to send the mail written in Outlook Message Body instead of CSV format, please advise.

Thanks,

LM

FORM set_emailbody.
  CONSTANTS:
  lc_doc_type(3) TYPE c VALUE 'CSV'. " Document type

  REFRESH : t_objpack,
  t_messbody.
  CLEAR : fs_objpack,
  fs_messbody.
  MOVE:
  'Hi,'(004) TO fs_messbody-line.
  APPEND fs_messbody TO t_messbody.

  CLEAR fs_messbody.

  MOVE:
*	'The attachment contains sales order details.'(005)
  'www.google.com'
  TO fs_messbody-line.
  APPEND fs_messbody TO t_messbody.


  CLEAR w_tabln.
  DESCRIBE TABLE t_messbody LINES w_tabln.

  CLEAR fs_messbody.
  READ TABLE t_messbody INTO fs_messbody INDEX w_tabln.

  fs_docdata-doc_size = ( w_tabln - 1 ) * 255 + STRLEN( w_line ).

  MOVE:
  space TO fs_objpack-transf_bin,
  c_1 TO fs_objpack-head_start,
  c_0 TO fs_objpack-head_num,
  c_1 TO fs_objpack-body_start,
  w_tabln TO fs_objpack-body_num,
  lc_doc_type TO fs_objpack-doc_type.

  APPEND fs_objpack TO t_objpack.

ENDFORM. " Set_emailbody

Edited by: Matt on Dec 15, 2008 12:47 PM - Added tags

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Dec 15, 2008 at 11:59 AM
    * SEND MAIL
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
       EXPORTING
         document_data                    = lwa_doc_data
    *     put_in_outbox                    = 'X'
         commit_work                      = 'X'
     IMPORTING
         sent_to_all                      = lv_sent_to_all
    *   NEW_OBJECT_ID                    =
        TABLES
          packing_list                     = t_objpack    " Pass the table of body information here
    *   OBJECT_HEADER                    =
          contents_bin                     = gt_messg_att  "Pass attachment info here
          contents_txt                     = t_messbody " pass the body contents here
    *   CONTENTS_HEX                     =
    *   OBJECT_PARA                      =
    *   OBJECT_PARB                      =
          receivers                        = lgt_receivers " pass mail ids
       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
                .
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 15, 2008 at 11:37 AM

    use object type is 'RAW'

    gc_doc_type TYPE gs_objpack-doc_type VALUE 'RAW',

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 15, 2008 at 11:49 AM

    Please use a meaningful subject in future - and not ALL CAPITALS. Also, use to surround your ABAP - it preserves formatting.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 15, 2008 at 11:53 AM

    If I use RAW, instead of CSV it send the file in attachment with RAW, which again opens in ACROBAT while I want the same in OUTLOOP message body.

    Please advise.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 04:09 AM

    Can I send CC also please advise.

    Thanks

    LM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.