DATA: lt_mailsubject TYPE sodocchgi1.
DATA: lt_mailrecipients TYPE STANDARD TABLE OF somlrec90 WITH HEADER LINE.
DATA: lt_mailtxt TYPE STANDARD TABLE OF soli WITH HEADER LINE.
* Recipients
lt_mailrecipients-rec_type = 'U'.
lt_mailrecipients-receiver = 'mz@bascil.com'.
APPEND lt_mailrecipients .
CLEAR lt_mailrecipients .
* Subject.
lt_mailsubject-obj_name = 'TEST'.
lt_mailsubject-obj_langu = sy-langu.
lt_mailsubject-obj_descr = 'Mail Subject'.
* Mail Contents
lt_mailtxt = 'This is a test mail'.
APPEND lt_mailtxt. CLEAR lt_mailtxt.
* Send Mail
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = lt_mailsubject
TABLES
object_content = lt_mailtxt
receivers = lt_mailrecipients
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 EQ 0.
COMMIT WORK.
* Push mail out from SAP outbox
SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
ENDIF.
3 Kasım 2011 Perşembe
SAP/ABAP: Send mail
Kaydol:
Kayıt Yorumları (Atom)
İnsdroid
Sabahtan beri çatada çutada çatada çutada… Bitmedi yine de… Neyse, yolumuz uzun, toparlıyorum çantamı, adaptörü falan tıkıştırıyorum bir şe...
-
Why do we need to change status of a request? Let's imagine, you have a workbench request and you already relased linked task in it....
-
Metasploitable is a kind of vulnerable Linux virtual machine image for penetration testing. It is Debian 32bit based operation system, and r...
-
* DATA : * ls_object_identity TYPE borident , * lo_gos TYPE REF TO cl_gos_document_service . * ls_object_identi...
Hiç yorum yok:
Yorum Gönder