Q
Problem solve Get help with specific problems with your technologies, process and projects.

Triggering an event by changing a specific field

I am receiving three work items in the inbox when triggering a workflow by changing a person's cost center.

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.


This was last published in May 2002

Dig Deeper on SAP workflow development

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close