on 06-16-2009 6:04 AM
Hi,
We have set the user budget in Org structure, now we want that if user budget is exceeded one step workflow should be triggered else no approval.How to code the same in starting conditions for workflow.
Pls let me know how to achieve the same.
Thanks,
Manu
Hi Manu,
If you need to send a workitem based on a condition, add a check function module to your business object event in SWETYPV t-code. In the FM check if the user budget limit has exceeded.
If yes, then trigger a workflow using SAP_WAPI_START_WORKFLOW. Send a workitem from the workflow.
Regards,
Saumya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manu,
Please check if you are getting the value of the user limit in any attribute of the Business Object you are using. If yes, then your can directly check the value in SWB_COND.
Alternatively, you can also delegate the standard BO to a ZBO and add an attribute to it that would store the user budget limit value. Then you can check this value in SWB_COND.
Regards,
Saumya
Hello,
There can be two ways to achieve this:
1. Activate the start conditions for both one-step and 0-step approval workflows and use the check function modules for start condition. You can specify the check function module in SWETYPV.
2. Create a subtype BO ZBUs2121 of BUS2121 (with delegation) and then create a new attribute in the ZBUS2121 object. Complete the coding to fill a value for this attribute and then use this attribute while defining start conditions in SWB_COND. For ex:
If custom attribute value = 1 --> one step
Else if custom attribute value = 0 --> no approval workflow.
Rgds,
Prasanna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.