Posted: Sat Sep 08, 2007 7:23 am Post subject: Sending Mail from SAP
Description: In the Business Process Modeling Group I have seen alot of request regarding how to send mail notifications by using ABAP Code.
I have used the below mentioned code in several cases like
Info Letter to all Vendors, Sending PO Via Email, Reminder mails to the Agents in Workflow and also escalation mails to Process Owners when the task is not performed by the agents in the given time.
Prerequisite : SAP Enterprise Edition and above
SAP Connect needs to be configured
Mail Rely should be available
data reciever type table of ADR6-SMTP_ADDR.
data subject type SO_OBJ_DES.
data text type bcsy_text.
data line type soli-line.
data send_request type ref to cl_bcs.
data document type ref to cl_document_bcs.
data recipient type ref to if_recipient_bcs.
data bcs_exception type ref to cx_bcs.
data sent_to_all type os_boolean.
data adresse type ADR6-SMTP_ADDR.
data mailflag(1) value space.
write sy-datum to dat.
write sy-uzeit to time.
subject = 'This is my Subject '.
line = ' I am the body of the message '.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.