Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Absence

Former Member
0 Kudos
228

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

4 REPLIES 4

former_member188827
Active Contributor
0 Kudos
77

HR_AUPBS_CALC_ABSENCES

Former Member
0 Kudos
77

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?

kesavadas_thekkillath
Active Contributor
0 Kudos
77

Check HR_TIM_REPORT_ABSENCE_DATA

Check program RPTABS20

StMou
Active Participant
0 Kudos
77

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