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

mail attachment

rohit_kaikala
Participant
0 Likes
511

Hi,

How to mail attachment of final itab.

Please help,

Rohith.

4 REPLIES 4
Read only

Former Member
0 Likes
483

Mail Subject

refresh objpack[].

CONCATENATE 'po' INTO sub SEPARATED BY space.

doc_chng-obj_descr = sub.

doc_chng-sensitivty = 'F'.

doc_chng-doc_size = v_lines_txt * 255.

objpack-transf_bin = ' '.

objpack-head_start = 1.

objpack-head_num = 0.

objpack-body_start = 1.

objpack-body_num = v_lines_txt.

objpack-doc_type = 'RAW'.

APPEND objpack.

*PDF Attachment

DESCRIBE TABLE so_ali[] LINES lineno.

objpack-transf_bin = 'X'.

objpack-head_start = 1.

objpack-head_num = 1.

objpack-body_start = 1.

objpack-doc_size = lineno * 255 .

objpack-body_num = lineno.

objpack-doc_type = 'PDF'.

objpack-obj_name = 'po'.

objpack-obj_descr = 'po'.

objpack-obj_langu = 'E'.

APPEND objpack.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = doc_chng

put_in_outbox = 'X'

commit_work = 'X'

TABLES

packing_list = objpack

contents_txt = objtxt[]

contents_bin = so_ali[]

*contents_hex = so_ali[]

receivers = reclist[]

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.

IF sy-subrc = 0.

PERFORM mail.

MESSAGE 'Mail sent successfully' TYPE 'S'.

*SUBMIT RSCONN01 WITH MODE = MODE.

ENDIF.

Read only

Former Member
0 Likes
483

Hello Rohit,

Search SCN before posting the thread

refer to this links

Thanks!!

Read only

Former Member
0 Likes
483

Hi,

Go through the following threads..

Regards

Mudit

Read only

Former Member
0 Likes
483

Hi,

Do you want to know how to Email the Internal Table contents as an Attachment? If yes..Please serach in the Forum itself and you will get N number of responses.....

Please try to be more descriptive while writing queries....It others and not you.....who needs to understand the query......

Refer:

/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface