Triggering an event by changing a specific field

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 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.


    Requires Free Membership to View

    When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSAP.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSAP.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

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 first published in May 2002

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.