Skip to Content

Custom HR Workflow not detecting changes during termination action

Hello gurus,

We have set long time ago a custom workflow to send some emails when an employee is terminated in the company. We have used a custom function module that is triggered when infotype 0001 is created. This function module is a copy from standard one HR_EVENT_RULES_0001. The issue we are facing is during the termination action this function module is called but for some reason it is not detecting the change of employee group (terminated) and does not recognize the condition to trigger the proper event COMPANYLEFT to start the workflow.

There are two import parameters in this FM, beforeimage and afterimage. This afterimage is supposed to have the new info of the new record (with employee group terminated) but is not the case.

The "funny" thing is that I have detected the pattern of the issue, and is only happening when termination action create vacancy on the position which is being terminated. If I terminate an external employee, who doesn't have any position (no OM integration, no popup to create vacancy) is working fine, the FM gets proper parameters and workflow triggers well. I have tried to deactivate the popup to delimit the position but still not working...

I have checked the customizing transactions related with Event linkages and all seems to be fine.

I can give you as much additional info if you needed. I'm really really frustrated with this matter :)

Any idea?

I will get crazy!!

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 28, 2018 at 08:25 AM

    This sounds a bit more like an OM issue than workflow. Can you compare the afterimage of the two scenarios and see if there is another field you could use to determine whether it's a termination? I think the most sensible explanation of what might be happening is that, because the position is not being terminated, instead the employee gets 'moved out'. But an HR expert can give you a more definitive answer on that part.

    Add comment
    10|10000 characters needed characters exceeded

    • Hello,

      The Z function module is executed twice. First time when saving IT0000 and second time when system is prompting popup to create the vacancy on the position and click on 'Yes'. No execution when IT0001 is saved... very strange.