on 02-16-2006 5:48 PM
can anybody define retro active runs?
Hi,
If you change the master or time data for an HR master record for a period for which payroll has already been run, the old payroll results must be checked in the next regular payroll run, and, if necessary, the payroll run must be repeated.
The system automatically creates a retroactive accounting run in the payroll past
Only changes to master and time data are relevant for retroactive accounting since previous payroll results must be corrected.
Example:
An employees Basic Pay ( infotype 0008) is increased from $3,500 to $3,700 from May 1, 2001.
The payroll has already run for this employee for the period up to June 30, 2001.
If you change the Basic Pay record, the system performs retroactive accounting when the next payroll runs for this employee. This ensures that the increase in basic pay, effective as of July 1, 2001 , is taken into retroactive consideration.
Thanks
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The fields in the RGDIR table will let you differentiate between each result. ie when you loop at RGDIR, you can spefify the PAYTY = 'P' for reading the Retro Result; PL take a look at the following code.
*======================================================
* PROGRAM TO READ PAYROLL ANALYSIS FOR A PERSON, IN A
* PAYROLL PERIOD
* =====================================================
REPORT Z_READ_CLUSTER_RT_PAYROLL .
* ======================================================
* Payroll directory
* ======================================================
DATA: BEGIN OF RGDIR OCCURS 100.
INCLUDE STRUCTURE PC261.
DATA: END OF RGDIR.
* ======================================================
* PAYROLL RESULT
* ======================================================
DATA : ref_payresult TYPE pay99_result .
DATA : ls_rt TYPE pc207 .
DATA : ls_wpbp LIKE PC205 .
* ======================================================
* WORDINGS OF PAYROLL ELEMENTS
* ======================================================
DATA : BEGIN OF I_T512T OCCURS 1000 .
INCLUDE STRUCTURE T512T .
DATA : END OF I_T512T .
* ======================================================
* SELECTION SCREEN ( DEFAULT )
* ======================================================
PARAMETERS : P_PERNR LIKE PA0002-PERNR DEFAULT '10000004' obligatory .
PARAMETERS : P_BEGDA LIKE PA0002-BEGDA DEFAULT '20030101' obligatory .
PARAMETERS : P_ENDDA LIKE PA0002-ENDDA DEFAULT '20030131' obligatory .
* ======================================================
* INITIALIZATION
* ======================================================
INITIALIZATION .
SELECT * FROM T512T INTO TABLE I_T512T
WHERE SPRSL = SY-LANGU
AND MOLGA = '99' .
* =====================================================
* START OF SELECTION
* =====================================================
START-OF-SELECTION .
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR = P_PERNR
* BUFFER =
* NO_AUTHORITY_CHECK = ' '
* IMPORTING
* MOLGA =
TABLES
IN_RGDIR = RGDIR
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2 .
IF SY-SUBRC <> 0.
MESSAGE I398(00) WITH 'ERROR READING PAYROLL DATA' .
EXIT .
ENDIF.
LOOP AT RGDIR where PAYTY = 'P'.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
CLUSTERID = 'RX'
EMPLOYEENUMBER = P_PERNR
SEQUENCENUMBER = RGDIR-SEQNR
* READ_ONLY_BUFFER = ' '
* READ_ONLY_INTERNATIONAL = ' '
* CHECK_READ_AUTHORITY = 'X'
* FILTER_CUMULATIONS = 'X'
* CLIENT =
* IMPORTING
* VERSION_NUMBER_PAYVN =
* VERSION_NUMBER_PCL2 =
CHANGING
PAYROLL_RESULT = ref_payresult
EXCEPTIONS
ILLEGAL_ISOCODE_OR_CLUSTERID = 1
ERROR_GENERATING_IMPORT = 2
IMPORT_MISMATCH_ERROR = 3
SUBPOOL_DIR_FULL = 4
NO_READ_AUTHORITY = 5
NO_RECORD_FOUND = 6
VERSIONS_DO_NOT_MATCH = 7
OTHERS = 8 .
IF SY-SUBRC = 0.
READ TABLE ref_payresult-inter-wpbp INTO ls_wpbp
INDEX 1.
CHECK ls_wpbp-begda EQ P_BEGDA .
CHECK ls_wpbp-ENDda EQ P_ENDDA .
WRITE : / 'Personnel Number :' COLOR COL_HEADING ,
P_Pernr COLOR COL_HEADING ,
'Start of Payroll Period' COLOR COL_HEADING ,
ls_wpbp-begda COLOR COL_HEADING ,
'End of Payroll Period' COLOR COL_HEADING ,
ls_wpbp-endda COLOR COL_HEADING .
LOOP AT ref_payresult-inter-rt INTO ls_rt .
CLEAR I_T512T .
READ TABLE I_T512T WITH KEY LGART = ls_rt-lgart .
WRITE : / ls_rt-lgart ,
I_T512T-LGTXT ,
ls_rt-betrg ,
ls_rt-amt_curr .
ENDLOOP.
ENDIF.
ENDLOOP .
Regards,
Suresh Datti
Hi,
When U have a Retro RUN for a for a particular
employee, the fields FPPER(for period) AND INPER
(In period) will not be the same.
fpper <> inper.
call function 'CU_READ_RGDIR'
exporting
persnr = i_0001-pernr
importing
molga = v_molga
tables
in_rgdir = i_rgdir
exceptions
no_record_found = 1
others = 2.
if sy-subrc <> 0.
raise no_payroll_results.
elseif sy-subrc = 0.
Loop through the directory of payroll results
sort i_rgdir by seqnr.
loop at i_rgdir where inper eq v_period and
fpper NE v_period and
void is initial and
reversal is initial and
outofseq is initial.
v_seqnr = i_rgdir-seqnr.
exit.
endloop.
This will give the SEQNR for a RETRO run.
Pass this seqnr and pernr to the macro and get
the results.
Regards,
GSR.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.