2008 Jan 24 11:40 AM
just wanna ask,
what do these FMs do?
PA03_PCR_READ
and
HR_PCIF_RETRO_DATE_POSSIBLE
2008 Jan 24 11:42 AM
you can use the function module PA03_PCR_READ to get the current period and dates for a particular payroll area.
just wanna ask,
what do these FMs do?
PA03_PCR_READ
and
HR_PCIF_RETRO_DATE_POSSIBLE
2008 Jan 24 11:42 AM
you can use the function module PA03_PCR_READ to get the current period and dates for a particular payroll area.
2008 Jan 24 11:51 AM
hi vasu,
um ok, so what is the F_TWM_DATE in it's export parameters?
the program i am modifying first took that parameter then later used it for some checking, like this:
IF g_retro IS INITIAL.
CALL FUNCTION 'PA03_PCR_READ'
EXPORTING
f_abkrs = 'N0'
IMPORTING
f_twm_date = g_retro
EXCEPTIONS
abkrs_no_accounting = 1
pcr_does_not_exist = 2
abkrs_does_not_exist = 3
period_does_not_exist = 4
OTHERS = 5.
ENDIF.
Check start date with earliest retro date for payroll area:
IF wa_input-begda < g_retro.
g_reject = g_reject + 1.
CALL FUNCTION 'HR_APPEND_ERROR_LIST'
EXPORTING
pernr = wa_input-pernr
arbgb = 'ZNLI'
msgty = 'E'
msgno = '011'
msgv1 = wa_input-begda.
CONTINUE.
ENDIF.
CALL FUNCTION 'HR_PCIF_RETRO_DATE_POSSIBLE'
EXPORTING
employeenumber = wa_input-pernr
date = wa_input-begda
EXCEPTIONS
no_retro_possible = 1
OTHERS = 2.
IF sy-subrc <> 0.
g_reject = g_reject + 1.
CALL FUNCTION 'HR_APPEND_ERROR_LIST'
EXPORTING
pernr = wa_input-pernr
arbgb = 'ZNLI'
msgty = 'E'
msgno = '011'
msgv1 = wa_input-begda.
CONTINUE.
ENDIF.
why was he checking the wa_input-begda with the g_retro?
what was he trying to find out?
he said in the comment:
"Check start date with earliest retro date for payroll area"
why would he try to check that?
thanks and regards,
laure
2008 Jan 24 11:51 AM
HR_PCIF_RETRO_DATE_POSSIBLE
gives you the payroll details for the mentioned date & emp number
reward the points for usefull answers
regards,
surya
2008 Jan 24 12:03 PM
hi
good
The area payroll IT_ORG-PAYAREA opening the IT 0001.
La respuesta es el estado y el período de nómina actual. The answer is the state and the current payroll period.
Then you can validate whether the payroll period coincides with the current date (in this example, in dividia month and year P_MONTH and P_YEAR respectively).
CALL FUNCTION 'PA03_PCR_READ' FUNCTION CALL 'PA03_PCR_READ'
EXPORTING
F_ABKRS = IT_ORG-PAYAREA F_ABKRS = IT_ORG-PAYAREA
ERROR_NO_ACCOUNTING = 'X' ERROR_NO_ACCOUNTING = 'X'
IMPORTING
F_STATE = L_STATE F_STATE = L_STATE
F_CURRENT_PERIOD = L_CURRENT_PERIOD F_CURRENT_PERIOD = L_CURRENT_PERIOD
F_CURRENT_YEAR = L_CURRENT_YEAR F_CURRENT_YEAR = L_CURRENT_YEAR
EXCEPTIONS
ABKRS_NO_ACCOUNTING = 1 ABKRS_NO_ACCOUNTING = 1
PCR_DOES_NOT_EXIST = 2 PCR_DOES_NOT_EXIST = 2
ABKRS_DOES_NOT_EXIST = 3 ABKRS_DOES_NOT_EXIST = 3
PERIOD_DOES_NOT_EXIST = 4 PERIOD_DOES_NOT_EXIST = 4
OTHERS = 5. OTHERS = 5.
IF SY-SUBRC <> 0. IF SY-SUBRC <> 0.
"Procesar errores!" "Process mistakes!"
ENDIF.
*----
*----
-
-
-
VALIDACION DE QUE EL PERIODO NO ESTE EN FIN DE CALCULO. * VALIDATION THAT THIS TIME NO END IN COMPUTATION.
IF ( L_STATE <> '3' ) AND ( L_STATE <> '1' ). IF (L_STATE <>'3 ') AND (L_STATE <>'1').
IF ( L_CURRENT_PERIOD = P_MONTH ) AND IF (L_CURRENT_PERIOD = P_MONTH) AND
( L_CURRENT_YEAR = P_YEAR ). (L_CURRENT_YEAR = P_YEAR).
P_CERRADO =''. P_CERRADO =''.
ELSE. " EL PERIODO NO ES CORRECTO "THE TIME IS NOT PASSED
P_CERRADO ='X'. P_CERRADO = 'X'.
ENDIF.
ELSE. " EL PERIODO ESTA PROCESADO. "THE TIME THIS PROCESS.
P_CERRADO ='X'. P_CERRADO = 'X'.
ENDIF.
ENDFORM. "PERIORDO_CERRADO
The dates of perídoos payroll in the table T549Q.
thanks
mrutyu
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |