6

Function to determine absence hours on key date

 7 months ago
source link: https://community.sap.com/t5/application-development-discussions/function-to-determine-absence-hours-on-key-date/td-p/8879097
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
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.

Function to determine absence hours on key date
icon_anonymous_profile.svg

Former Member

‎07-13-2012 1:22 AM

I need to determine employee absence hours given a key date. Is there a standard function module or any way to determine this?

I know there is infotype 2001 (table PA2001) which stores employee absences for a date period (BEGDA and ENDDA). However I require absence hours on a specific date.

thanks

Jason

8 REPLIES
icon_anonymous_profile.svg

Former Member

‎07-13-2012 3:39 AM

Are you asking about absence hours?

Try with PA2001-STDAZ(Absence Hours).

Also, you can check PA2001-BEGUZ(Start Time) and PA2001-ENDUZ(End Time).

Jake

kesavadas_thekkillath

kesavadas_thekkillath

Active Contributor

‎07-13-2012 6:14 AM

You can check fm BAPI_ABSENCE_GETDETAIL or HR_ABS_ATT_TIMES_AT_ENTRY

Thanks for your replies. Unfortunately none provide what I require so far.

I'm aware of PA2001-STDAZ containing absence hours but this is only for a period of leave (BEGDA and ENDDA) from what I can see.

BAPI_ABSENCE_GETDETAIL and HR_ABS_ATT_TIMES_AT_ENTRY both also seem to only show absences based on a period of leave.

I need to determine absence hours based on a specific key date. eg. employee has 1 absence record in PA2001 for period 01.07.2012 to 11.07.2012. I need something which gives me absence hours if I pass in, say single date of 05.07.2012??

Please try providing the same date to BEGDA and ENDDA ?

Hi Kesavadas,

Thanks, I tried passing in same date to BEGDA and ENDDA in BAPI_ABSENCE_GETDETAIL and HR_ABS_ATT_TIMES_AT_ENTRY but it reports back no values in selected period. It only works for leave periods of 1 day. I need to pass the full period leave dates (as per PA0001 record) to BEGDA and ENDDA for it to return values in the function.

So unfortunately still not sure how to determine absence hours based on a specific key date?

cheers

Jason

Mister, in 2023 it it still a problem i cannot find something useful in sap documentation. my mentor said me to use pa2001-stdaz to get hours for abscence which < 1 shift (or 8 hours) and pa0007 -> t552a -> t550a-sollz for other cases. but i'm not sure about this strange condition.

Maybe you know the simplest way to get abscence hours for period?

february 2024 😄

i cant find solution for this sh*t.

my mentor explained that taking values from 2001 infotype absences is wrong,

sometimes it is necessary to take values from tables t550a-sollz (hours) using working schedule rule (pa0007, t552, ...). now i can to pull data from all these tables, but i cant get this condition. it it related with pa2003...? i would like to have a piece of simple abap code😄

What are you looking for: Recorded absences, missing timewriting, or both? I would say that only Time Evaluation results will give you the definitive answer. Searching for "ABAP Time Evaluation result" will probably help you find out how to read them, and your local time evaluation expert should be able to tell you which parts of the result you need to check.

Kjetil Kilhavn (Vettug AS) - ABAP developer since Feb 2000

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK