cancel
Showing results for 
Search instead for 
Did you mean: 

Error while updating Infotype 2001 using custom function in PT60.

AntV
Discoverer
0 Kudos

I've created the custom function and incorporated "HR_INFOTYPE_OPERATION" for creating record in Infotype 2001, that custom function is placed in Time Schema after below line

QUOTA Generate absence quota

When Time Evaluation (PT60) is executed it is creating the records in IT2001 but it is not creating data for all periods, lets say I ran PT60 from 06/01/2023 to 12/31/2023, it is only generating 12.2023 period it is skipping from 06.2023 to 11.2023. I commented logic in my custom function and re-ran, it is generating data for all periods from 06.2023 to 12.2023. It looks like side-effect of my code but couldn't understand why it is skipping periods 06.2023 to 11.2023. Any suggestions are much appreciated.

View Entire Topic
BGibbons
Active Contributor
0 Kudos

Hi,

I cannot offer any input on the scenario you have described but I would question creating info types via a custom function in PT60.

I have no idea to the actual requirement here and why you need to automatically create absences but if it has to be done, then you need to seriously consider how your function deals with retroactive processing and absences that were created thru a previous run of PT60. Also absences can be linked to quotas and can be impacted by substitutions and collisions so all in all not a trivial undertaking.

If you outline the driver for creating these absences there may well be an alternative approach to achieve the same result.

bg

AntV
Discoverer
0 Kudos

Thank you for taking your time and reviewing my question. Below is the requirement 
"For employees from certain Personnel Sub Areas, if any public holiday in Work Schedule Rule falls on a Working day then we want to compensate(pay) for that day. At the same time we need a record in IT2001."

Our Functional Consultant is creating a record in ZL for such dates, In my Custom Function I'm reading ZL and creating a record in IT2001 using HR_INFOTYPE_OPERATION.

Coming to your point on 'Retroactive' cases or absences created through previous runs - In my custom Function before creating the record in IT2001, I'm checking if the record already exists for that day. If no record exists then I'm creating else I'm ignoring. 

I was told that there wont be any retroactive changes to Work Schedule. 

Any suggestions in current solution or alternative approaches are much appreciated.

Thanks in Advance.

 

AntV
Discoverer
0 Kudos
Thank you for taking your time and reviewing my question.