on 12-30-2014 12:47 PM
Hi All,
I am a newbie in workflow and have got a requirement for sending mail to approve PO (Multiple Approval) when PO is created. The mail content and subject for the mail would be fetched from SO10. I found from SWEL that the worflow triggered is WS20000075. I am planing to take a copy of the standard workflow WS20000075 (not sure if i need to create a new workflow) and delegate the business object BUS2012 and create the method inside it. Now what i want to understand is
1. How do i get the list of approvers in the workflow.
2. how do i get the SO10 value in the subject of the mail?
Br,
Kalpesh.
You can read the text maintained with SO10 for example with function READ_TEXT. There should be lot of examples of this if you just use search.
Anyhow, I would question that why do you want to use text(s) maintained in SO10? Why don't you just use the standard email sending step and use the task editor? Is there a specific reason for this? Sure the standard email sending step has its limitations, but if you are sending just some simple plain text emails, there first choice should be the standard email step.
Regards,
Karri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have no idea how you are eventually going to send the email. Most probably you will need to develop your own method for this part. So I would add the logic for reading the text from SO10 to the same code that actually sends the email. So, yes, you need to develop a custom method for at least some of the functionality. Whenever you need to add some custom code to the solution, you need to do the delegation etc. to create custom method. (Well, you can also just create a new class with SE24, add IF_WORKFLOW interface to it, and add your coding to a static method, and then call this method from your workflow/task. This might be a good approach if you are not that familiar with the business objects.)
Regards,
Karri
If i am not wrong my approach should be Copy the the std workflow WS20000075, create a new task and assign it with the custom method (Method in the delegated BO BUS2012). This custom method will hold the logic for sending mail for multiple approval and importing the text (SO10). Rite?
Br,
Kalpesh.
You need to find out that how the approvers are found in the actual workflow itself (=what kind of agent determination it has). Then you can probably have the same logic in the method. Or if the approvers are available in the workflow container, you could just deliver them to the method through binding.
To be honest, I am not sure how easy everything is going to be. If I remember correctly the workflow that you are talking about is for the PO release. And you will have sequential workflow instances. First approver A approves the PO, then another workflow instance starts for approver B, etc. I am not sure if it works like this, but worth to check. You might run into problems, if you send the email to all approvers at once - what if approver A rejects the PO => B got is mail already, etc.
Regards,
Karri
Thanks Karri and Murali for you valuable answers.
Thanks & Regards,
Kalpesh Mehta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kalpesh,
For this, the workflow WS20000075 will suitable for your requirement and you no need to change/ custom this.
PO for multilevel --> it is based on the "Release Strategies", these configs will done by MM consultant, based on that, a PO will go for levels. To determine the agents the standard task TS20000166 will call the default rule.
Contact your MM Consultant to maintain Release strategies.
If you want to change the standard task text, you need to copy this task to a custom one and do your changes ( do not touch/change any other things, like default rules ).
Best Regards,
Murali Krishna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.