Normally whenever Time Data is changed, this information will automatically be updated into field PDC recalculation (P0003-BDERR in Infotype 0003). So Time Evaluation will re-run from this date. For example, today is 08-Oct-2012, but we change time date (in my case: I just check for Infotype 2001) on 10-Sep-2012, thus SAP will re-run Time Evaluation (T-code PT60) from 10-Sep-2012.
But in some case, customer’s requirement or to be sure Time results will always calculate correctly, Time Evaluation will have to re-run from the first date of month (it means in my example: PT60 have to re-start from 01-Sep-2012). How can we do?
In this document I will share it for you. It’s very convenient for all of us to control PT in HCM module.
First, creating a customized program (really simple) by T-Code SE80 or SE38 (please contact ABAPer for supporting) as below: ZHR_PT_PREMAT:Error rendering macro 'code': Invalid value specified for parameter 'com.atlassian.confluence.ext.code.render.InvalidValueException'
FORM GET_RL_BEGDA_IT2001. CLEAR RP50D-DATE1. IF P0003-BDERR+0(6) >= P2001-BEGDA+0(6). IF P0003-BDERR+6(2) <> '01'. CONCATENATE P2001-BEGDA+0(6) '01' INTO RP50D-DATE1. ENDIF. ENDIF. ENDFORM.
Actually P0003-BDERR+0(6) equals P2001-BEGDA+0(6) because we just change Time Data in Infotype 2001, SAP will update this field (P0003-BDERR)immediately with value of P2001-BEGDA . In my example, at the moment P0003-BDERR = P2001-BEGDA, so P0003-BDERR equal 10-Sep-2012.
But why we have to check IF P0003-BDERR+6(2) <> '01'. Without this command, if the P0003-BDERR+6(2) already equal '01', SAP will show screen of Infotype 0003 to inform user that: “there is NO change in this infotype”. As you see, the logic of the customized program is easy.
Secondly, how can we decide it run automatically after creating / changing / deleting in Infotype 2001. Using T-code SM30 or SM31 with view T588Z (Dynamic Actions Table), the configuration as same as I will mention here:
Next I will explain the meaning of every single line.
P T001P-MOLGA<>'40' : check condition: in this case: just running for the others (not running for India which 40 is country grouping).
F GET_RL_BEGDA_IT2001(ZHR_PT_PREMAT) : As I explain in previous step: thanks to customized program we will calculate the new date & return into RP50D-DATE1.
P RP50D-DATE1<>'00000000' : check RP50D-DATE1 is null or not.
I MOD,0003,,,,/D: Maintain modify infotype 0003. /D means: running as batch ground, don’t show the infotype 0003 screen.
W P0003-BDERR = RP50D-DATE1: Update value of RP50D-DATE1 into P0003-BDERR.
That’s all & from now we can control how Time Evaluation run in our system.