Skip to Content
Technical Articles

Creating Dynamic Date filter using the Manage Date Function App

In this blog, I would like to showcase a couple of scenarios where using the Manage Date Functions (F2595) app would not only make your life easier but also make your business user happier and more productive

The Manage Date Function is one many extensibility applications that are part of the Analytics Specialist Role (technical ID: SAP_BR_ANALYTICS_SPECIALIST) which is the key role for providing Analytics Extensibility in SAP S/4HANA, for other Application that part of the Analytics Specialist Role, I would suggest that you glance at the public SAP Fiori Apps Reference Library in which you will find every SAP Fiori app ever shipped, as for more information on user roles within SAP S/4HANA embedded analytics, I would highly recommend: https://blogs.sap.com/2021/03/15/sap-s-4hana-embedded-analytics-user-roles/ .

Now back to our topic for the day, dynamic filtering on date attribute is a typical requirement for analytical applications, and we can leverage it in different analytical artefacts (CDS Views, Analytical Queries, Embedded Analytics Applications: Web Dynpro Grid, Smart Business Runtime, Etc.)

And while most key users are familiar with the Manage Date Functions app, it seems from my experience that many users don’t fully exploit the full breath of its functionalities, so I would like to show you how you can use it in a couple of very common scenarios.

 

1st Scenario 

Suppose your business user needs custom single date function, providing the first day of the month, 12 months ago.

As I am writing this blog on the 19th of March 2021, the first day of the month 12 months ago is the 1st of March 2020, which is exactly the simulated date that you can see in the page’s bottom.

The key takeaway here is that by using the base date option “From the First Day of” we can calculate dynamically a date whether in the past or the future based on another date “Base Date” that we can flexibly define, if I would of use this date functions in a couple of weeks from now, the calculated date would be 1st of April 2020, therefore creating custom date function in this manner would provide maximum flexibility to the business user but with no additional repetitive work on the IT department.

2nd Scenario 

You need a custom range for a specific quarter of your fiscal year, which may vary according to the rules in your specific country, In this case, I will use the United States as an example:

As the United States federal government’s fiscal year is the 12-month period, beginning 1 October and ending 30 September the following year.

The identification of a fiscal year is the calendar year in which it ends, Thus the current fiscal year is 2021, often written as “FY2021” or “FY21”, which began on 1 October 2020 and will end on 30 September 2021, here are the quarter for FY2021:

  • 1st quarter: 1 October 2020 – 31 December 2020
  • 2nd quarter: 1 January 2021 – 31 March 2021
  • 3rd quarter: 1 April 2021 – 30 June 2021
  • 4th quarter: 1 July 2021 – 30 September 2021

And since we are approaching the start of the 3rd quarter, let me build that as an example:

In the same process, you can create Q2 and Q4 with a couple of slight adjustments.

and with that i wish you all Happy Dynamic Date Filtering!

 

 

5 Comments
You must be Logged on to comment or reply to a post.