BUS1065 HIRED Event

Mike Gambier madgambler at hotmail.com
Wed Jan 30 04:35:58 EST 2008


Hi,
 
No doubt, of course, you've checked your event linkages and made sure you only have 1 Receiver active for the event (seen that happen a lot because of test linkages on delegated objects). An event trace might show up multiple linkages if you can risk turning SWELS on for a bit.
 
Assuming you have, this sounds like a issue with the standard SAP HR code being triggered twice synchronously and processed faster than the WAPI can read the database.
 
We sometimes see this on high volume systems where COMMIT WORK statements (executed implicitly inside the code) aren't quite enough and you really need COMMIT WORK AND WAIT statements in the code (which SAP don't do that often).
 
As a test you could implement a simple check Function Module against your event linkage in SWETYPV and put a break-point inside it and see when and how the event is triggered by the transaction. You might just spot a loop or something, unless the event is being issued asynchronously.
 
Perhaps by using the event queue you could introduce a small enough delay to give the database more time to update the tables so that the WAPI has more of a chance to find the record, but seeing as the events are likely to be published in the same LUW I doubt it would help that much.
 
If it is a SAP problem you might want to abandon the SAP event altogether (unless they provide a fix) and publish your own single event in a suitable exit somewhere. Sometimes SAP insist on raising multiple events during a session because that's the way they want to model the outcome of that LUW, so the multiple events you are seeing may actually be what they intend to happen rather than be down to a bug. In which case the event might not be the most appropriate way to trigger your Workflow.
 
MGT


To: sap-wug at mit.eduSubject: Re: BUS1065 HIRED EventFrom: cristiana.dagosto at au1.ibm.comDate: Wed, 30 Jan 2008 11:40:54 +1100Hi Carmen, the HIRED event is published from Infotype 0001 (Function Module HR_EVENT_RULES_PA0001). I have seen the event being published twice when the position that you are hiring your employee has more than one relationship with different Org Units e.g. position 50000000 01.01.2007 - 14.02.2008 belongs to Org Unit 50000001 15.02.2008 - 31.12.9999 belongs to Org Unit 50000999 If you hire an employee to this position on the 10.02.2008, the event will be published twice because the system will create 2 infotypes 0001 for this employee. I think an OSS should be raised so SAP can fix the way HIRED is published. Alternatively, you can try to 'play' with function module HR_EVENT_RULES_PA0001 and code something to prevent the event being published twice? I hope this helps. Good luck!Cristiana_________________________________Cristiana d'AgostoIBM Global Business ServicesMobile:  +61 417 927 224cristiana.dagosto at au1.ibm.com 



"Carmen Cheung" <carmen.cheung at roc-group.com> Sent by: sap-wug-bounces at mit.edu 
30/01/2008 08:49 AM 




Please respond to"SAP Workflow Users' Group" <sap-wug at mit.edu>





To
<sap-wug at mit.edu> 


cc



Subject
BUS1065 HIRED Event




Hi All,   I’m creating a notification workflow for when a new employee is hired (PA40) in R/3 4.7, using triggering event HIRED for BUS1065.   The actual workflow is going fine, but the triggering event is being published twice in the system. I have tried to use the function module SAP_WAPI_WORKITEMS_TO_OBJECT to check if a workflow is already active and ensure the workflow is only triggered once, but to no avail.   I have also tried triggering my own event to a delegate object and entered the configuration in SWEHR3. This also published duplicate events.   Is there anyway to stop the duplicate event being triggered?   Really appreciate any ideas.   Many thanks,   Carmen      _______________________________________________SAP-WUG mailing listSAP-WUG at mit.eduhttp://mailman.mit.edu/mailman/listinfo/sap-wug
_________________________________________________________________
Share what Santa brought you
https://www.mycooluncool.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20080130/fb5151b0/attachment.htm


More information about the SAP-WUG mailing list