Skip to Content
0
Nov 19, 2020 at 10:59 AM

How to prompt Create Vacancy Pop Up screen during Resignation action in Dynamic Action

37 Views

We've input some Dynamic Action as below as need to change payroll area for resigned employees. Since payroll area can only be changed in the beginning of the payroll period, therefore it need to copy IT0001 to create 2 IT0001 records as below if the employee is not resigned with effective 1st day of the month

1) Start with 1st day of the mth with resigned payroll area but remain active position.

2) Start with Effective Date of resignation with resigned payroll area with position = '99999999'.

With the below dynamic action, the position holder is not delimited & vacancy (IT1007) is not created.

How can I improve below dynamic action to prompt the "Create Vacancy" like normal perform resignation action?

04 2 P T001P-MOLGA='14'
04 3 P P0000-MASSN='12'/X
04 4 P P0000-MASSN='32'/X
04 5 P P0000-MASSN='43'/X
04 6 F GET_MAP_PYAREA(ZHRPOSTCHG)
04 7 P RP50D-FLAG1='X'
04 8 I COP,0001,,,(P0000-BEGDA),(P0000-ENDDA)
04 9 **GET_LAST_HIRING(ZHRPOSTCHG)
04 10 W P0001-ABKRS=RP50D-FIELD1
04 11 W P0001-BEGDA+6(2)='01' **P0001-BEGDA=RP50D-DATE1
04 12 F GET_LAST_POSITION(ZHRPOSTCHG)
04 13 W P0001-PLANS=RP50D-FIELD1
04 14 **RP50D-FIELD1<>'99999999'
04 15 F GET_DATE2(ZHRPOSTCHG)
04 16 I COP,0001,,,(RP50D-DATE1),(RP50D-DATE2)
04 17 W P0001-PLANS='99999999'

Thank you.