on 08-12-2015 3:40 PM
Hi All,
I need to convert the FISCAL weekbegining/weekending dates from my workdate(calday) in CATSDB table. can you please provide me that any standard view available in HANA or any function to derive it.
Thank you
Hello,
I don't see information about the fiscal week on HANA generated table _SYS_BI.M_FISCAL_DIMENSION. However, that's in the main gregorian calendar table _SYS_BI.M_TIME_DIMENSION. Not sure if helps in your requirement.
If so, then you could join your CATSDB table with your _SYS_BI.M_TIME_DIMENSION, get the calendar week refering to that date and finally, get the max and min values for dates within that same calendar week again on _SYS_BI.M_TIME_DIMENSION. Something like this:
select
calweek,
max(date_sql),
min(date_sql)
from _SYS_BI.M_TIME_DIMENSION
where calweek in ( select distinct t.calweek
from sapabap1.catsdb c
inner join _SYS_BI.M_TIME_DIMENSION t on c.workdate = t.date_sap)
group by calweek
Results would be something like:
CALWEEK | MAX(DATE_SQL) | MIN(DATE_SQL) |
201240 | 2012-10-06 | 2012-09-30 |
201241 | 2012-10-13 | 2012-10-07 |
201321 | 2013-05-25 | 2013-05-19 |
201324 | 2013-06-15 | 2013-06-09 |
201326 | 2013-06-29 | 2013-06-23 |
There's a nice blog explaining how to generate this data on HANA.
I hope that helps.
BRs,
Lucas de Oliveira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Lucas !
Actually My requiremtn was to develop the FiscalweekBegin and FiscalweekEnding dates in my report. And I have a selection option is on weekending to push the filter on lowest level.
I cont find the way to develop the Fiscalweek from calday (workdate) from CATSDB. Above logic is good for calender week.
Is there any way to build a logic for fiscalweek? ANY INPUTS PLEASE.
Thank you
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.