on 11-05-2019 10:39 AM
I have a very simple Workflow with a triggering event whenever a Maintenance Notification ( BUS2038 ) is created, then i want the workflow to send a email ( Later phone SMS ) to external emails of the holders( Users - US object ) on a specific Position ( S object ) in my Organizational Model.
How do i set the Recipients of the email step to these users which are assigned as Holders to the specific Position?
I have tried to just set the Recipient type to Organizational Object and then Position and giving the Position key but this fails with message no so023.
Then i am trying with a workflow container to hold the users, but what type should the container be and how do i fill the container with the right users/recipients??
Hi Nicolai,
You would need to copy the standard SAP workflow to a customer workflow first. Then you'd also copy the business object (say, FIPP) to a customer object (ZFIPP). Make sure you perform the delegation. (https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/4f/3459e50a7b5542e10000000a421937/frameset.h...)
Then you can create a method which you will use to gather these email addresses, and pass them as an export table parameter. For example, in our systems, we use a structure called ZWF_AGENTS which we populate in the method. (https://help.sap.com/saphelp_470/helpdata/es/a5/3ec9734ac011d1894e0000e829fbbd/content.htm?no_cache=...)
Then create a new task to call your method. Make sure you are importing your multiline parameter of email addresses. And insert this new task into your custom version of the workflow. Make sure to bind your multiline container element into the parameter &ADDRESSSTRINGS& and set your &TYPEID& to 'U' for an internet address.
Then, make sure you pat yourself on the back, because you have completed a whole bunch of steps that will enable you to grow your workflow skills in the future!!!
Sue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Susan,
Took me a while to figure it all out, but this helped alot!
I now have a workflow that can send an email to external emails of users assigned as holders on a specific position.
Now next step is to send a text message to the users phone number instead, do you have any advice on this?
Thank you very much!
Hi Nicolai,
Is this an SAP workflow or a Customer workflow? Are you certain that the holders of the position have email addresses? Are there any cases where workflow has been able to send out email?
I've found that it's helpful to have email recipients gathered and validated before launching a SENDMAIL task. That way, you can be sure that you do have recipients. Also, for the future, you'll be able to look at the workflow container to see who the recipients were.
You could write your own method to look up the email addresses of the people you want to send mail to and pass their email addresses back into the workflow container.
Good luck!
Sue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Susan,
Thanks for your answer.
Is this an SAP workflow or a Customer workflow? SAP workflow.
Are you certain that the holders of the position have email addresses? Yes, i am certain.
Are there any cases where workflow has been able to send out email? Yes, i tried statically setting the recipient to a user and that works sending the user an mail. ( Well only in the users business workplace inbox. What i rally want is for SAP to send it to the users external mail, i tried this by setting the recipient type to email address and that works but only with one email address. I guess i can then do it with a multi line email workflow container? )
Okay, i will try writing my own method to gather the emails and fill the workflow container with these emails, but i don't know how i can start on my own method inside a SAP workflow before the email step. What step type should be used for writing a method?
Thanks!
Nicolai
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.