Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Trigger workflow using event ERC_ACTIV.ActivityCompleted

Hi,

We have created an activity in e-Recruiting and we need to trigger a workflow when this activity is completed. To do so, we've linked the workflow with the event ERC_ACTIV.ActivityCompleted, but for some reason this doesn't seem to be working. If I trigger the event in test mode using SWUE, everything works fine, but if I mark the activity as 'finished' the event isn't triggered. In fact, I've tried to trigger this event marking some other activities as finished and it never worked.

I've used tcode swels and swel to activate the trace and check the events. When I create the activity, the event ERC_ACTIV.ActivityCreated is triggerd, as expected. But, when I mark an activity as finished, no event is triggerd. I think that just marking an activity as finished is not enough to compete the activity, but I don't know what else I can do.

Any help?

Former Member
replied

Hello Raf,

the answer to your question is quite easy but i am not sure if i have to call it a funny or a tragic one.

SAP introduced the event with e-recruiting 600. The raise of the event is located in the same method in which the create event for activities is placed. But when the developer copied the function module to raise the event he forgot to replace the name ActivityCreated by ActivityCompleted.

The result was that the ActivityCreated event was raised twice. This error was reported to the SAP who changed the code but then they were not sure about their solution so they commented the raise of the event althought it is officially released. That is why the event is not raised.

As if this is not "bang your haed against a wall" enough. Some days ago SAP released a note 1052673. This note also deals with the missing event. But it seems it was to usual for the development to easily reactevate the commented code to reactivate the raise of the event. A solution which is really working as at least half a dozen customers did this by modification and use the event for nearly a year. Now they put the event into the infotype framework. But they do not throw the event if the activity is completed directly after creation which is possible for all activity types and even obligatory for status change activity which makes the solution worse than the original one.

So i am sure this solution will be discussed with sap by some of the customers using the decomment solution.

Rgds.

Roman

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question