****GETTING THE PAYROLL RESULT**************
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = pernr-pernr
TABLES
in_rgdir = gt_rgdir ----> here u are passing the pernr and to get seq no for the month payroll for the employee
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT gt_rgdir WHERE srtza EQ 'A' AND
void IS INITIAL AND
reversal IS INITIAL AND
fpbeg GE pnpdisbd AND " ---> this holds the start date of the month
fpend LE pnpdised AND " ---> this holds end date of the month
payty EQ ' '.
MOVE gt_rgdir-seqnr TO gv_seqnr.
So u want to pass the dates in the loop for each month and then u will get ur results....
rgds,
Vijay