cancel
Showing results for 
Search instead for 
Did you mean: 

HR: Number of leave days month wise.

Former Member
0 Kudos

HI Experts,

In table PA2001 count of leave days are present date range wise, But I need to display count of leaves in a report made on a cube  based on datasource 0HR_PY_1 where data comes at month level.

So, I need to display count of leaves at month level.

Kindly suggest how can I achive this.

I tried to search and got FM "HR_ABS_ATT_TIMES_AT_ENTRY" but when I execute it 0 records gets returned.

Thanks and Regards,

Mithilesh Prasad

Accepted Solutions (1)

Accepted Solutions (1)

Loed
Active Contributor
0 Kudos

Hi,

Can you post a sample data and what you wanted to achieve?

Regards,

Loed

Former Member
0 Kudos

Hi Despuig,

Thanks for the reply.

Here I am attaching the sample data.

Regards,

Mithilesh

Loed
Active Contributor
0 Kudos

Hi,

Is it possible to have a value for BEGDA and ENDDA having different month?

Let's say:

Person          ENDDA          BEGDA

234               20151102        20151030       

If NONE..

Is your provider an infocube? If YES, how about adding a keyfigure, let's call it ZDAYS_LEAVE, then map the BEGDA and ENDDA to ZDAYS_LEAVE and insert a field routine:

RESULT = SOURCE_FIELDS-ENDDA - SOURCE_FIELDS-BEGDA + 1.

Take note of the +1 at the end..With that, we can have the total number of days..

P.S.

If you only have 1 entry per person per month in your PA2001 table, then you can apply the same method in DSO..ONLY if you have 1 entry per person per month..

Regards,

Loed

Former Member
0 Kudos

Hi Despuig,

Is it possible to have a value for BEGDA and ENDDA having different month?

-Yes, there are such values where begda and endda lies in different months.


Also with the logic RESULT = SOURCE_FIELDS-ENDDA - SOURCE_FIELDS-BEGDA + 1, we will not be able to capture the holidays.


If holidays have not been excluded we would have done for a month, "Lastday of the month of BEGDA - BEGDA +1" where begda and enda are not in same month. And If they are in same month then as suggested by you.


Actually count of leaves is present in table itself excluding the holidays.


Thats the resonI was searching for functional module.


Regards,

Mithilesh

Loed
Active Contributor
0 Kudos

Hi,

From the PA20001 table, how will you know what days are holidays? Is there a field which determines it?

Regards,

Loed

Former Member
0 Kudos

Hi Despuig,

Sorry I have no idea regarding how to get holidays.

anshu_lilhori
Active Contributor
0 Kudos

To get the number of working days,you can use fm HOLIDAY_GET.


In this you need to pass the value of factory calendar and holiday calendar id.The same you can confirm with your functional team,they should be able to provide you with the necessary details.


So by passing the date range in this FM you will get the number of working days.


Hope this helps.



Regards,

AL

Loed
Active Contributor
0 Kudos

Hi,

No what do you mean by this?

Actually count of leaves is present in table itself excluding the holidays..


Can you include that field in your sample data? Also, please include sample data with overlapping of months..

Regards,

Loed

Answers (0)