Here is a slightly different approach from a non-developer point of view,
you goal is to not let certain employees post transactions with a different date then “Today” correct.
So, you need to change the user setup allow to-from posting date to always be today. For this I would create a processing only report that updates the user setup table 91 to have the current date, run the report in the job scheduler or NAS and you are done. I would run this each evening so when the employee came in in the morning they would be ready to go. You filter it to run just on the restricted employees. You could add a field to the user setup table, a check box that you would check if they were restricted.
dt := TODAY + 1 // today plus 1 if you run it at night for the next day.
“User Setup” OnAfterGetRecord()
“Allow Posting From” := dt;
“Allow Posting To” := dt;