Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Restricting workflow

former_member220430
Active Participant
0 Kudos

Hi!

I implemented a simple workflow that will send an email when a material is changed in MM02. However, there is an additional requirement such that the workflow should only be triggered for a certain material group MARA-MATKL.

Is there a way to achieve this? I was thinking it should be done via the user-exit. But I'm not sure how to trigger the workflow from there. Can anyone please advise?

select single matkl from mara into lv_matkl where matnr = wmara-matnr.

if lv_matkl = '0110'

     * execute / trigger the workflow

endif.

Thanks,

Cholen

1 ACCEPTED SOLUTION

former_member220430
Active Participant
0 Kudos

Resolved - by creating new attribute on the BOR object. Reference for solution: .

4 REPLIES 4

custodio_deoliveira
Active Contributor
0 Kudos

Hi Cholen,

You can use transaction SWB_COND to create a new start condition for your workflow.

Regards,

Custodio

0 Kudos

Hi Custodio,

I could not figure out how SWB_COND works. Obviously I'm new to this but I found it can also be done in the triggering event from SWDD. I found the an expression for material group. But another one I need is the cross-plant status (MSTAE). Unfortunately I don't see it here though. Any thoughts?

former_member220430
Active Participant
0 Kudos

Resolved - by creating new attribute on the BOR object. Reference for solution: .

0 Kudos

Good to see that you solved it and that a 10 years old thread is still helping.