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

Send email from SAP with more than one attachment

Hi all,

How can i send email with more than one attachment and different types of document(doc,pdf,etc.) from SAP to external?

Besr regards,

Munur

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 08, 2009 at 02:00 PM

    Hi,

    Use the class cl_bcs..

    see the example program BCS_EXAMPLE_5.

    Regards,

    Ankur Parab

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 08, 2009 at 02:26 PM

    Hi,

    I use :

    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

    the main problem with different attachemts is to genereate the packing_list.

    the packing list is a kind of description of the data table... where ist the start of an image, end, size...

     
    "Creation of the entry for the compressed attachment
            objpack-transf_bin = 'X'.                    " it could be an image
            objpack-head_num = lv_head_num_count .  " inital 1 each att  add 1
            objpack-head_start = 1.                     " fix
            objpack-body_start = gv_startnum.    " table with attachments  1. line one 
            objpack-body_num = tab_lines.          " how many lines are in the table of attachment
            objpack-doc_size = tab_lines * 255.   " size of the  attachment... 
           objpack-doc_type = lv_typ . " 'JPG'.
            objpack-obj_name = 'ATTACHMENT'.
            objpack-obj_descr = lv_stripped_name  " name of the JPG
       APPEND objpack.
       APPEND LINES OF lt_goscontent TO gt_maildata.  " data Table... 
    
    
    

    bestreg

    robert

    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.