‎2008 Feb 12 3:41 PM
Hi all,
I am using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send an email.
How can i catch the sender email address in this FM.
regards,
Ajay reddy.
Edited by: Ajay on Feb 12, 2008 5:41 PM
‎2008 Feb 12 3:46 PM
ADDR3_DATA-NAME_LAST
ADDR3_DATA-NAME_FIRST
you can generate the email id using this parameters dinamically...
* Send mail
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = 'you@yourcompany.com'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.