cancel
Showing results for 
Search instead for 
Did you mean: 

Workfow should trigger when ever there is a change in a field

Former Member
0 Kudos

I have created a workflow which triggers when ever a sales order is changed. I want to put a condition that the workflow should trigger only when there is a change in the Net Value. I tried to put condition in Events tab but not working. Can anybody please explain me

Thanks in Advance.

Ranjith

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ranjith Reddy,

In SWEC transaction go to new entries and then

change document - VERKBELEG

Object category - BOR Object Type

Object Type - BUS2032

Event - CHANGED

Triggering event on changed

Then click field restrictions in that specify your table field with the old value and new value

This will do. hope it solves your issue

Regards,

Dheepak

Former Member
0 Kudos

Hi Dheepak,

Thanks a lot for your great answer. but I am confused about old value and new value. As my requirement is the workflow should trigger when ever the net value changes. The value is not static and it is unknown untill the requirement comes.

Can you please explain me in details.

Edited by: Ranjith Reddy on Feb 24, 2009 1:12 PM

Former Member
0 Kudos

dear Ranjith Reddy,

give * in the place of old value and new value so that it will work for any change.

Regards,

Dheepak

Edited by: dheepak on Feb 24, 2009 5:44 PM

Former Member
0 Kudos

Hi Dheepak,

Thanks a lot, Sorry to trouble you again. How to find the out the change document. The one which you have given (change document - VERKBELEG) is for all fields or to only net value field. Can you please explain.

Edited by: Ranjith Reddy on Feb 24, 2009 1:23 PM

Former Member
0 Kudos

Hey no issues ranjith. the change document object VERKBELEG is not with respect to fields it relates to the BOR BUS2032 (Sales Order Bus).

Is it working check in SWEL or SWI14 . When ever you change that particular field and save the bus2032 will trigger your workflow.

Regards,

Dheepak

Former Member
0 Kudos

Hey deepak,

I am really impressed by your answer. Thanks a lot. Can I have your contact no or mail id if you dont mind for futher reference to workflows.

Former Member
0 Kudos

Hi deepak,

One more question. as we are adding a new entry into Tcode: SWEC. Is it necessary to create an event in events tab.

Former Member
0 Kudos

Dear Reddy Garu,

You are welcome.

SDN Is the best place to clear your doubts it's a knowledge Warehouse there are lot of experts in this forum to help you trouble shoot your issues. Keep posting and learn more.

Regards,

Dheepak

Former Member
0 Kudos

One more question. as we are adding a new entry into Tcode: SWEC. Is it necessary to create an event in events tab.

as you told that the change document object VERKBELEG is not with respect to fields it relates to the BOR BUS2032 (Sales Order Bus). How the system know that it should trigger the workflow when ever there is a change in the Net value field.

Edited by: Ranjith Reddy on Feb 24, 2009 1:50 PM

Former Member
0 Kudos

Dear Ranjith,

You are supposed to mention Changed in Events because it specifies on what event the change document object is triggering.

Changed is a standard event in BUS2032.

Go to SWO1 and give BUS2032 under events you will find changed Event.

Ippudu artham ayindha?

Regards,

Dheepak

Former Member
0 Kudos

Dear Deepak garu,

Please try to understand my question. As there are so many field is sales order screen. If we create an event and add an entry in SWEC. The workflow may trigger for other fields also kada. How to trigger for specific field(Net Value).

Former Member
0 Kudos

Hey Ranjith,

You are right man if you give only change document object , bor and event for any change workflow will trigger.

But since you are specifying the particular field in field restictions only when the Net value field is changed it will trigger.You can also try this out with field restrictions and without field restrictions.

Regards,

Dheepak

saumya_govil
Active Contributor
0 Kudos

Hi Ranjith,

What I can understand is that you need to trigger the workflow only when the Net Value of the Sales Order gets changed and not when any other attribute is changed.

I think in that case you can use a Reciever Function Module for the BO event to first check whether the Net Value is changed or not. If the Net Value is changed then only trigger the workflow else not.

This you need to configure in SWETYPV while doing event linkage with the workflow. There in 'Reciever Call' enter 'Fucntion Module' and in 'Reciever Function Module' pass the Z-FM you create to check if Net value is changed or not.

Hope this helps!

Regards,

Saumya

Former Member
0 Kudos

I think I have give the table name(KOMP) and Field Name(NETWR) and * in other Old Value and New Value Fields in to the corresponding fields of Field Restrictions to trigger the WORKFLOW for change in the net value field.

Former Member
0 Kudos

Hi Saumya Govil,

Thanks yaar for your answer

As how should be the logic to find that, that particular field is changed in that screen.

As I fould in the documentation that

The interface of a receiver function module is standard and contains only import parameters. A receiver function module does not support return parameters.

Please help me.

Former Member
0 Kudos

Hi Ranjith,

The table must be VBAK and the Field is NETWR.Check now it will work.

You can also do this the other way as Saumya Govil has mentioned in that case you have to write a function module to check the table entry.

Regards,

Dheepak

Former Member
0 Kudos

Hi Deepak,

Thanks a lot for kind support. I will try that.

Former Member
0 Kudos

In old and new values fields I have put *. when I put VBAK in table field and go for f4 help in FIeld Name field I cannot see the NETWR field. NETWR field is not accepting there.

I want to trigger the work flow only when there is a change in the net value field.

Please suggest me

Thanks in advance

Answers (2)

Answers (2)

Former Member
0 Kudos

-

Edited by: Ranjith Reddy on Feb 24, 2009 1:46 PM

Former Member
0 Kudos

ya sure ranjith what is your question ?

Former Member
0 Kudos

Hi;

If the workflow does not start this is either because it is not being triggered properly or the workflow definition is not complete.

First determine how the workflow should be started. Directly? Via a customizing table? Via an event? Transaction SWUD offers

intelligent diagnosis help to establish if the flow was started, if the triggering event was fired, if the flow is syntactically correct, if users are assigned to all the tasks...

Regards

Shashi