I am receiving three work items in the inbox when triggering a workflow by changing a person's cost center. I am...
using the object 'ORGASSIGNM'. (HR changes the cost center in three places in the system). Can I specify somewhere to only trigger the event when a specific field is changed? Ex: Org key. This is only changed once.
I think we need to look at this differently. Why are you receiving 3 Work Items? Is the event being triggered 3 times? Why?
Regarding your question as to whether you can trigger the event when a specific field is changed, this can be done. You need to see whether change documents have been configured for the particular field you are interested (in your case I believe it is Org Key). Look at the data element of the field. There is a flag at the bottom of the screen, which should be checked. If it is then you are in business. Next you need to determine the name of the Change Document that is used when this field is changed. The best way to determine this is to change the field in the transaction and hit SAVE. Following this, examine tables CDHDR and CDPOS, you should be able to find the record that was created. The field OBJECTCLAS will give you the name of the Change Document Object used.
Once you have this then execute transaction SWEC. Specify the change document and the Business Object and Event that you want raised when the change document is created. You will also need to specify whether you want the event on Create/Change/Delete. My understanding is that you will want Change only. Once you have done that, select field restrictions and specify the field that you are interested in. You can restrict the event to only trigger when certain values are entered or alternatively just use '*' (without quotes) to 'All Changes'.
Tip: You may want to create your own custom event called OrgKeyChanged and use that, rather then using the generic 'changed' event. It's more intuitive for future developers who will work with this development.
Dig Deeper on SAP workflow development
Related Q&A from Alon Raskin
An SAP user has created a user decision step in an SAP workflow item and wants to know how an end user can send an attachment to other users.continue reading
Find out how to configure clients so that the same version of an SAP workflow item is used when the workflow is triggered in separate clients.continue reading
A SearchSAP.com reader wants to know how to hide the forward button in an SAP Business Workplace toolbar.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.