Former Member

### Work days in a month

Hi,

I have a planning area with storage bucket profile in months and weeks. My planning book has rolling weeks.

I am trying to calculate the number of work days in the month the current week falls under.

Is there a function to calculate the number of working days in a month(with may be input as current week or bucket)??

Thanks.

10|10000 characters needed characters exceeded

• Former Member
Oct 10, 2008 at 03:35 PM

You can use below macro for that :

BUCKET_WDAYS() :BUCKET_WDAYS( <calendar> ; X1 ; ... ; Xn) returns the number of workdays in the periods given by the cell(s), row(s), and/or column(s) (not areas) X1 through Xn. In the attributes of the argument elements, you must specify Period data as the data source. The specification of a calendar as the first argument is optional. If you do not specify a calendar, the system reads the calendar given by the time stream in the storage buckets profile. If no time stream is defined, the system uses calendar days.

one more :

CALENDAR_WDAYS():CALENDAR_WDAYS( u2018calendaru2019 ; from date ; <to date> ) returns the number of workdays between the from-date and the to-date in the calendar specified. The calendar is the timestream ID.

http://help.sap.com/saphelp_scm50/helpdata/en/1d/310eb0d0ee11d4b2e40050da385632/content.htm

Manish

10|10000 characters needed characters exceeded
• Former Member Former Member

Visu,

Please use the macro and specify date .

CALENDAR_WDAYS( u2018calendaru2019 ; from date ; <to date> ) returns the number of workdays between the from-date and the to-date in the calendar specified. The calendar is the timestream ID.

or in the BUCKET_WDAYS() you need to put logic , calculate todays date and than subtract it from cell date to get the date from the start of the month or use macro MONTH_BDATE()

MONTH_BDATE( X ) returns the start date of the month given in the argument in integer format with reference to the date 0001/01/01.

Manish

Edited by: Manish Kumar Rathi on Oct 10, 2008 12:02 PM

• Former Member
Oct 10, 2008 at 04:01 AM

Hi,

Have you checked transaction SCAL for calculating your company's no. of working days.