Enterprise Resource Planning Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Martin_4
Participant
2,884

Hi,

Summary:
This is about best hanlding time charateristice in Analytical CDS Views and analytical CDS Queries.


Problem:
In S4, the very most  tables,  transactional documents or CDS are modelled with a date format, for example VBAK with the ERDAT

or I_SalesAnalyticsCube with a CalendarDate:

You have the  need of haveing an KPI aggreagted over Year, Month, Week,...
You might want to have a reusable and unifrom solution for Your system.
You dont want to code too much.


Primary Solution:
You can extend the CDS Query with a calculated Times Characteristics
or You wrap the CDS.

Disadvantage:
This is quite cumbersome, test intensive and never complete or flexible at all.
You must do this for every singel query in your system
+ You must manitain a consistent label/wording across Yor system for these time characteristics 😉

Better, standardizing Solution:
The solution would be to associate Your date in Your CDS ( with a CDS Extenesion) with  a time dimension which has got most of the various Time types:
You use a  CDS Time Characteristics.
You extend You CDS with a Standard Time Characteristics .
CDS  I_CalendarDates is well suited for this, see bellow.

Even more fleible Solution:
You extend You CDS with a Custom  Z Standard Time Characteristics .
For example   ZI_CalendarDates, as a copy of CDS  I_CalendarDate.
This allows You to implement reusable any dateformat.

 

 


Implementation:
CDS  I_CalendarDates is well suited for this:


...and You get all the date formats on one shot or in the Z Version to make Your own Time Characteristics

You find I_CalendarDate and much more usefull I_ <Time> CDS in  Package ABA/ABA_TECH/VDM_CAL:

I_DateFormatVH
I_Datefunction
I_Datefunctiontext
I_DateFunctionValue
I_Dates_F2200
I_CalendarDay
I_CalendarDayText
I_CalendarMonth
I_CalendarMonthName
I_CalendarMonthText
I_CalendarQuarter
I_CalendarQuarterText
I_CalendarYear
...


Also over some other Packages are spread some I_DATE* or I_TIME* CDS.

Best Martin