Hi,
I have to do an userexit in RPTQTA00 report. I find some enhancements for this HRPTIM02 , HRPTIM03.
I am new to user exits.
My requirement is, when the user Generates Quota using RPTQTA00 report,
It should generates either 6/12 days leaves based on these conditions.
If employee hired month is < 6, then it should give 12 days.
If employee hired month is > 6, then it should give 6 days.
For this i tried enhancements HRPTIM02 and HRPTIM03. Its not working.
In HRPTIM03, there is one exit EXIT_SAPLHRLV_002.
In this, i double clicked on INCLUDE ZXPLAU03, I wrote this code here...
TYPES:BEGIN OF itab .
INCLUDE STRUCTURE P2006.
TYPES: END OF itab.
FIELD-SYMBOLS <fsym> TYPE itab.
DATA: HDATE TYPE P0000-BEGDA.
DATA: HIDATE TYPE BEGDA,
TDATE TYPE ENDDA,
YEARS TYPE P0000_AF-NOYRS,
MONTHS TYPE P0000_AF-NOMNS,
DAYS TYPE P0000_AF-NODYS.
* CASE innnn-infty.
* WHEN '2006'.
* ASSIGN innnn TO <fsym> CASTING.
CALL FUNCTION 'RP_GET_HIRE_DATE'
EXPORTING
PERSNR = <fsym>-pernr
CHECK_INFOTYPES = '0001'
* DATUMSART = '01'
* STATUS2 = '3'
* P0016_OPTIONEN = ' '
IMPORTING
HIREDATE = HDATE
.
MOVE HDATE TO HIDATE.
MOVE SY-DATUM TO TDATE.
CALL FUNCTION 'HR_CALC_YEAR_MONTH_DAY'
EXPORTING
BEGDA = HIDATE
ENDDA = TDATE
IMPORTING
YEARS_OUT = YEARS
MONTHS_OUT = MONTHS
DAYS_OUT = DAYS
.
IF MONTHS >= '6'.
MOVE '6' TO <FSYM>-KTART.
ELSE.
MOVE '12' TO <FSYM>-KTART.
ENDIF.
I am confused, Is i am using right one or not. Plz let me know wat's the exact user exit to do this.
And i wrote code like this in these exits...
Plz any helps to solve this....
Regards,
Shree.