cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BW Calender Year

Former Member
0 Kudos

Hi All,

I am doing BW implementation for Retail company.

For Eg:  As we people know calender year starts with 1st Jan to 31st dec and Fiscal Year starts with 1st April to 31st May ie Standard

Now my requirement is that  this retail comapny has business defined on other parameters

Its like..

7th April to 6th May  -->   They consider as April

7th May to 6th June  -->   They consider as July

...

and so on

For Year they consider

7th April 2013 to 6th April 2014  ---> 2013

Now since we have calender year starting with 1st Jan to 31st dec and Fiscal Year starting with 1st April to 31st May the reports are coming according to this format.But I want reports according to the format shown Above.

Thanks

Mayur

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hey All

Thanks for your help

Mayur

anshu_lilhori
Active Contributor
0 Kudos

Hi,

Would appreciate if you can say thanks in SCN way..

Regards,

AL

Former Member
0 Kudos

Hi,

I Assume:

7th April to 6th May  -->   They consider as April

7th May to 6th June  -->   They consider as July May  <-- one month back.

I don't know how your Fiscyear is.

but to calculate zyear & zcalmonth you need to have a normal date field in your source (say zsydate)

Write an end routine as below.

day = zsydate+6(2).

month = zsydate+4(2).

year = zsydate+(4).

if day < 07 AND month <= 04..

year = year-1.

endif.

if day < 07.

month = month - 1.

endif.

concatenate year month into zcalmonth.

zyear = year.

Thus it will calculate month & year as per ur requirement

Harshawardhan.

anshu_lilhori
Active Contributor
0 Kudos

Hi,

I feel your code is incomplete you have only considered the days before 7 .How about days after that ?

Suppose if my date is 08.04.2013 so in which category it will fall.

According to his logic it should come in month april right but in your code i do not find this condition.

Kindly update accordingly..

Regards,

AL

Former Member
0 Kudos

Hi Anshu,

say date is 08.04.2013..

then,

day will be 08 month = 04 and year = 2013.

if 08 < 07 AND 04 <= 04   (This Conditions will fail)

if 08 < 07. (this condition fail)

zcalmonth will be 04.2013.

zyear will be 2013.

This is expected output, I guess.

Harshawardhan.

anshu_lilhori
Active Contributor
0 Kudos

Ok seems to be perfect..I just overlooked the first part..

Regards,

AL

Former Member
0 Kudos

Hi All,

For example if I make new ZFISCYEAR ,ZCALYEARand ZCALMONTH then where will I mentiion the starting date ie 7 to end date 6

Thanks

Mayur

former_member182470
Active Contributor
0 Kudos

That's What I told you in my reply, right. You have to write a custom code to populate those time chars with the specified ranges.

former_member182470
Active Contributor
0 Kudos

Hi Mayur,

I will give you some idea.

As you know your requirement is fully customized one. You have to create custom time characteristics by taking the templates of Fiscal year and Calyear.

You have to write field level routines to populate ZFISCYEAR and ZCALYEAR with the respective new logics. Take an ABAPer's help to achieve the same.

Regards,

Suman

MGrob
Active Contributor
0 Kudos

HI

Do you need this in addtion to fiscalyear/period? If you need this in the datamodel you need to create a characteristic referencing 0fiscper and then code the logic in each routine you add your new time characteristic.

If you only want to do this on the reporting level you need to code it in cmod. Either way this as to be done with some abap logic.

hope that clarifies

Martin