Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Send a Single Mail with Multiple Attachment

Former Member
0 Likes
2,276

Hi Every One,

SO_DOCUMENT_SEND_API1 is the function Module used to send a file as attachment with the mail.My requirement is to send more than one file as multiple attachments in the same mail. Is this Possible? and How?

Regds,

Rajeev.N

1 ACCEPTED SOLUTION
Read only

thomas_jung
Developer Advocate
Developer Advocate
0 Likes
524

Yes this is possible. This is what the packing_list parameter of this function module is for. You put all of your content together into the contents_bin or the contents_txt (or a combination of both). You then add an entry into the packing_list table for each individual element. Here is some code samples for filling in the packing_list:


          objpack-transf_bin = 'X'.
          objpack-head_start = body_counter.
          objpack-head_num   = 1.
          objpack-body_start = body_counter.
          objpack-body_num   = tab_lines.
          objpack-doc_type   = extention.
          objpack-obj_name   = objhead.
          move objhead to
                       objpack-obj_descr.

          body_counter = body_counter + tab_lines.

          objpack-doc_size   = tab_lines * 255.
          append objpack.

We keep a counter for each element. We have to supply the starting position of each element and its total lenght.

1 REPLY 1
Read only

thomas_jung
Developer Advocate
Developer Advocate
0 Likes
525

Yes this is possible. This is what the packing_list parameter of this function module is for. You put all of your content together into the contents_bin or the contents_txt (or a combination of both). You then add an entry into the packing_list table for each individual element. Here is some code samples for filling in the packing_list:


          objpack-transf_bin = 'X'.
          objpack-head_start = body_counter.
          objpack-head_num   = 1.
          objpack-body_start = body_counter.
          objpack-body_num   = tab_lines.
          objpack-doc_type   = extention.
          objpack-obj_name   = objhead.
          move objhead to
                       objpack-obj_descr.

          body_counter = body_counter + tab_lines.

          objpack-doc_size   = tab_lines * 255.
          append objpack.

We keep a counter for each element. We have to supply the starting position of each element and its total lenght.