cancel
Showing results for 
Search instead for 
Did you mean: 

SWUE event

Former Member
0 Kudos
285

Hello,

I need help i understanding how to find the way event parameters are determined while triggering the event using SWUE. There is an event object that is seen in the binding where the event has been attached to the workflow as workflow start event. This event object is passed to workflow container element that further determines the agent for the workflow. In some cases it gets determined wrongly hence there is a need to understand how the event parameter gets the value whenever the event is triggered. This event parameter is &_EVT_OBJECT.USERCHANGE& which is there apart from the others like &_EVT_OBJKEY&,&_EVT_OBJECT&, &_EVT_CREATOR& etc.

thanks

Bhakti

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

Whenever you have an event in the Business Object and when you trigger that event with an object key it just instantiates that Business Object. The Business Object was something built to mock the Object Oriented concept. Once you trigger the event the object key is passed on to the Business Object which runs the underlying code to fill in the attributes and then you can use the instantiated object which is available in the workflow once you do the binding between the event and the workflow container. Basically the instantiated object gets passed on.

If I am right your attribute USERCHANGE is available in the Business object. You must see the code behind that attribute to see if that is getting populated correctly depending on the object key.

To check this just go to the Business Object (SWO1) and highlight the attribute and go to the Program and place a breakpoint. Now in SWO1 click on Test and then supply the same object key and the code will stop executing at the breakpoint and you can debug.

Happy debugging!

Hope this helps,

Sudhi

Former Member
0 Kudos

Thank you very much. I will try this.

Former Member
0 Kudos

Hi Bhakti,

First to understand if the Event is triggered with the right values and passed on to the workflow.

You can just add a "SEND MAIL" step as the first step in the Workflow template.

Or u can go through the Workflow Log for the particular Workflow , from SBWP or SWIA.

May b, once u are convinced that wrong values are passed , then you can test the Business object method.

This would obviously save time.

Regards,

Raj

Former Member
0 Kudos

Hi Rajasekar,

thanks for the suggestion. I cannot do that addition inthe production system.

I have found that the worng routing happens whenver BKPF-AEDAT for that invoice document is initial. However I do not know from where it chooses the particular user ID to route it . Hence I will further investigate the event objects.

thanks

bhakti

Former Member
0 Kudos

To Sudhindra Chandrashekar ,

Thank you very much for your reponse. I have been able to solve this problem by following what you told me to do.

solution is that the user change attribute is passed on to the workflow container and subsequently to the AP Clerk Agent element where the workflow gets routed.In SWO1 this user change attribute has been set is VBKPF-USUPD. The details of this attribute are seen in SWO1 for the object type.

thanks

Bhakti

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

What object type are you using? USERCHANGE is an attribute of this object.

The problem may be that when the event is triggered a document is not yet saved into the database. Thus when the system tries to read the attribute it is empty. When you later look into the workflow log document is posted and attribute has a correct value.

Regards,

Michal

Former Member
0 Kudos

Hello,

The attributes are having the same values at all the stages. The problem is finding how these values are getting populated.

thanks

Bhakti