cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate no of days in a month based on Calendar Year/Month in sap bi

Former Member
0 Kudos

Hi Experts,

   How to calculate no of days in a month based on Calendar Year/Month.

my source is DSO iam getting Calendar Year/Month from source,based on this i want to calculate no.of days in a month while loading data to next staging.

can anyone suggest how to achieve this.

Regards,

Naveen

Accepted Solutions (0)

Answers (2)

Answers (2)

anshu_lilhori
Active Contributor
0 Kudos

Hi,

I would suggest you to use standard attributes of 0calmonth which is 0NUMDAY.

This gives you number of days in a particular month.You will find this under the attributes tab of 0calmonth, in case you don't find them then you can install the same from BI content.

Hope that helps.

Regards,

AL

Former Member
0 Kudos

Hi Naveen,

There are loads of FMs related to the calculation of date. You can use them to get the number of days in a month.

To suggest, the following two FMs claculate the last date of a month. You can use this and get the number of days in a month.

LAST_DAY_OF_MONTHS - Returns the last day of the month.

SLS_MISC_GET_LAST_DAY_OF_MONTH- Returns the last day of the month.

This thread is more related to BW, hence this should have been posted in BW, this will help you get better suggestions.

Regards,

Saurabh