on 2008 Jul 17 5:43 AM
Hi experts,
I need to trigger an workflow email from my abap program and configure the workflow to get the mail in outlook express.
Can anyone pls help on 1. How to configure the workflow to send an email to outlook express
2. how to trigger an work flow in abap program
I am novice to wokflow pls brief me with details or example.
Thanks in advance
sai
Hello Sai,
You can direct the mail from your SAP mailbox to your outlook or you can do it programatically too.
In SBWP tcode, Goto Settings menu -> Goto Office settings -> Goto Automatin forwarding tab and enter your email id there.
The mails in your SAP inbox will be forwarded to your outlook
If you want to do it programatically,
It first depends how you are triggering your workflow.
If it is by an event, you can use the SWE_CERATE_EVENT to first trigger the event and then the workflow is started. Attach a business object to a task in the workflow which call the function module SO_DOCUMENT_SEND_API1 that will send the mail to your outlook inbox
Here lies the sample code as of how to use this FM, SO_DOCUMENT_SEND_API1.
report yh_email.
data: email type somlreci1-receiver value 'indu.rayepudi@yash.com'.
data: sender type SOEXTRECI1-RECEIVER value 'SAPDEV02'.
data: imessage type standard table of solisti1 with header line,
iattach type standard table of solisti1 with header line,
ipacking_list like sopcklsti1 occurs 0 with header line,
ireceivers like somlreci1 occurs 0 with header line,
iattachment like solisti1 occurs 0 with header line.
start-of-selection.
clear imessage. refresh imessage.
imessage = 'This is a mail from SAP ECC6'.
append imessage.
imessage = 'Thanks and Regards'.
append imessage.
imessage = 'Indu'.
append imessage.
perform send_email tables imessage
iattach
using email
'Mail from Indu'.
************************************************************************
* Form SEND_EMAIL
************************************************************************
form send_email tables pit_message
pit_attach
using email
p_mtitle.
data: xdocdata like sodocchgi1,
xcnt type i.
* Fill the document data.
xdocdata-doc_size = 1.
* Populate the subject/generic message attributes
xdocdata-obj_langu = sy-langu .
xdocdata-obj_name = 'SAPRPT' .
xdocdata-obj_descr = p_mtitle .
clear ipacking_list. refresh ipacking_list.
ipacking_list-transf_bin = space.
ipacking_list-head_start = 1.
ipacking_list-head_num = 0.
ipacking_list-body_start = 1.
describe table imessage lines ipacking_list-body_num.
ipacking_list-doc_type = 'RAW'.
append ipacking_list.
clear ireceivers.
refresh ireceivers.
ireceivers-receiver = email.
ireceivers-rec_type = 'U'.
append ireceivers.
call function 'SO_DOCUMENT_SEND_API1'
exporting
document_data = xdocdata
put_in_outbox = 'X'
SENDER_ADDRESS = SENDER
commit_work = 'X'
tables
packing_list = ipacking_list
contents_bin = iattachment
contents_txt = imessage
receivers = ireceivers
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.
endform.
Hope it helps you.
Regards
Indu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
refer these link,it may help you,
http://searchsap.techtarget.com/tip/0,289483,sid21_gci949886,00.html
You can go for the site below there are different example on workflow-
www.saptechnical.com/Tutorials/Workflow/Workflow.htm
Regards,
Sujit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. to get the email check the link
www saptechnical.com/Tutorials/Workflow/WorkflowTutorial2/WorkflowTutorial1.htm
and
www saptechnical.com/Tutorials/Workflow/Notification/Notification.htm
and for configuring the SAp mail box to your outlook express , you better consult with BASIS EXPERTS or SYSTEN ADMIN
2.To trigger a Workflow programaticaly,
www saptechnical.com/Tutorials/Workflow/EvtsPrg/EvtsPrg.htm
All of them are step-by-step tutorial. I think they will help you.
Regards,
Anirban
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
59 | |
10 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.