2010 Feb 25 10:11 AM
Hi ,
There is a requirement to get the leave entitlement for an employee , and no of absence days already booked .
For some absence types based on the configuration for counting rules and deduction rules public holidays are included (e.g maternity leave) for other absence types they may not .
e.g Sicknesss booked leave 3 days calendar days = 5 ( holidays not included)
Maternity booked leave 150 days calendar days = 150 days ( holidays included)
Are there any std function modules which will return this information ? I tried using BAPI_ABSENCE_GETDETAILEDLIST but the results are incorrect for absence types which have config. to include holidays .
e.g for the above example the bapi returns Maternity Booked - 150 and calender days ( 150 - (all holidays)) WHICH is incorrect.
I would like to avoid the option of reading all config. tables to get the deduction rules, counting rules and calculate in the code.
Thanks
Neelima
2010 Feb 25 10:20 AM
2010 Feb 25 11:09 AM
Thanks for the reply. I tried using this FM , by passing 2001,0001,0007 information to the FM . It does not return any values.
THis FM also has a table CALC_I5QPBS2F which is data from db table T5QPBS2F .However this table has no values .
Could you please let me know how to use this FM?
2010 Feb 25 12:53 PM
2010 Feb 25 1:12 PM
Hi,
Try function HR_READ_INFOTYPE " Read Employee/Applicant Data From Infotypes
DATA IT_2001 TYPE TABLE OF PA2001.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
* TCLAS = 'A'
PERNR =
INFTY = '2001'
* BEGDA = '18000101'
* ENDDA = '99991231'
* BYPASS_BUFFER = ' '
* LEGACY_MODE = ' '
* IMPORTING
* SUBRC =
TABLES
INFTY_TAB = IT_2001
EXCEPTIONS
INFTY_NOT_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.
CALL FUNCTION 'HR_READ_INFOTYPE_AUTHC_DISABLE'
.
and see in function group HRAC.
See for function module HR_READ_INFOTYPE_AUTHC_DISABLE. This function allow you to read infotype if you don't have authorization. Call before call HR_READ_INFOTYPE
CALL FUNCTION 'HR_READ_INFOTYPE_AUTHC_DISABLE'.
Rgds