cancel
Showing results for 
Search instead for 
Did you mean: 

Budget check in workflow

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

saumya_govil
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

Have mentioned the user budget in PPOMA_BBP

Cant I directly create the conditions in SWB_COND for SC workflow and achieve this.

Thanks,

Manu

saumya_govil
Active Contributor
0 Kudos

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

Former Member
0 Kudos

how to activate the check function module in SWETYPV

saumya_govil
Active Contributor
0 Kudos

hi Manu,

When you create a new entry for the association between the BO event and the FM, there is a check box 'Event linkage active'. Check this and the linkage would become active.

Aslo go can go inside and check' Linkage Activated' checkbox.

Regards,

Saumya

Former Member
0 Kudos

Hi Soumya,

Which FM to b used for budget check

saumya_govil
Active Contributor
0 Kudos

Hi Manu,

You can create a Z-FM where you can write the logic to check the budget limit.

Regards,

Saumya

Former Member
0 Kudos

Hi,

I dont think any Z FM is required as budget check is the std functionality offered in SRM.

Former Member
0 Kudos

Pls let m eknow what start conditions should I maintian in SWB_COND.

System is throwing the error messgae workflow ambigious

Former Member
0 Kudos

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