cancel
Showing results for 
Search instead for 
Did you mean: 

Using only weekdays

Former Member
0 Kudos

Hi,

I want to define my time bucket profile in such a way that it just takes weekdays into consideration. i.e., when displaying periods, it should only consider Monday through Friday. or else as per the factory calendar that not only includes weekends but also public holidays as holidays. The motive is to avoid holidays in dataview.

Also the same for Storage bucket profile. I guess in SBP, I can do this by giving a fiscal year variant.

Is the above requirement possible?

I also have another requirement that says that I can have holidays displayed but my macro should consider only Monday through Friday for calculations.

I mean if the week starts by 3/11(Monday) and ends with 3/15(Friday). I need the system to take only these 5 days into calculation and give result only for those five days. The next calculation should start from 3/18(Monday) through 3/22(Friday).

How can I do these?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

as for you macro : there is a macro function BUCKET_BDATE() which will return you the beginning date of the period.

us this in another fucntion WEEKDAY() that will tell you the day of the week. (1 = monday)

You can use this to write into a auxilliary KF

then if the KF is greater than 5 ignore the macro if not run it

Answers (1)

Answers (1)

Former Member
0 Kudos

you can create a time stream in /sapapo/calendar

you should be able to define the number of days and the factory calendar here

generate the periods

you can then link this to your storage bucket profile

Former Member
0 Kudos

Hi Harish,

Thanks for the reply. How about the time bucket profile and macro?

Thanks.

somnath_manna
Active Contributor
0 Kudos

For macro use function BUCKET_WDAYS to calculate the number of working days per bucket and store in auxiliary keyfigure. you can use that in subsequent macro calculations.

For timebucket profile display you can consider using the user-exit option (U in Period Labelling).

Somnath

Former Member
0 Kudos

if your time bucket is based on your storage bucket with weekday then you should not have a problem.

As somnath said use a user exit to label it with start and end date

Also you can educate the users to right click on the column for the week and see the start and end data and number of working days

and if you want to distinguish a 5 days and a 4 day work week you can write a macro that will populate a KF with the bucket Work days(somnath has mentioned the name of the macro function for this)