cancel
Showing results for 
Search instead for 
Did you mean: 

How to Calculate actual working days(Calendar days - Week off - Public holiday)

dhirenchheda9
Participant
0 Kudos

Hello Experts,

I have scenario where i need to calculate only actual working days/ business days

Calendar days - (Weekends + Public holidays)

Eg : 365 days - ( 104 week-off + 9 public holidays) = 252 working days.

dhirenchheda9
Participant
0 Kudos

Thank you for the reply, it shall be very helpful when i shall apply this logic in PCR, but at present do we have any standar way to generate this value, as this value is required by SD and PS module in my project.

Accepted Solutions (1)

Accepted Solutions (1)

former_member193210
Active Contributor
0 Kudos

In a Time Evaluation PCR, you can query on the Day of the Week (VARSTWEDAY), on the Holiday Class (VARSTHOLCL), and on the Daily Work Schedule (VARSTDAYPG) in order to identify if "Today" should be counted as a "Working Day/Business Day". In the affirmative, you could generate a Time Type (such as 9WKD) with HRS=1.

Answers (2)

Answers (2)

dhirenchheda9
Participant
0 Kudos

Hello Experts,

I was able to get results from PT64, and with few abap help we achieved at final output.

Thank you for help!

Former Member
0 Kudos

Are you wanting to query this in a PCR? And are you wanting to know the amount for the full year? If so my suggestion would be to have three constants:

Constant one (ZCON1) - The number of days in the calendar year to take into account leap years.

Constant two (ZCON2) - The number of days that fall on a weekend within each calendar year.

Constant three (ZCON3) - The number of public holidays that fall within the calendar year.

All of the above will vary year on year but as you know, you can build that into each constant.

The calculation in your PCR should read:

HRS=CZCON1

HRS-CZCON2

HRS-CZCON3

You could then add the resulting value into a time type.

The only negative with the above solution is that you will have to update your constants year on year, personally I would create a few years in advance. However, the plus point is that because constants are driven by date, your calculation will work at every point in the year.

Hope this helps if it is indeed what you meant.