The SAP Community blog New Window Functions in ABAP SQL caught my attention because the title included keywords “new” and “ABAP”.
ABAPers should already be familiar with the concept of aggregate functions, such as SUM or MAX. We would use those if we wanted, say, to find a most recent order date or a total amount for a fiscal period. But if you are after a more analytical query, like “give me a list of revenues by state by country”, then a window function (aka analytic function) could help. These functions have syntax like “SELECT <function>… OVER … FROM …” where “window” is the part that follows OVER keyword.
I learned most interesting information about window functions (and then some) not from the blog itself but rather from the insightful replies to my Twitter post on this subject. As Paul wrote in the last Nerdletter issue, it’s important to ask questions, even stupid ones. And I’m glad I posted my not necessarily correct TLDR version (turns out there are people actually using these functions).
We get a lot of content like “look ma, new feature!” from SAP but usually not the whole lot of information on why would anyone care. Where would developers use this cool feature and how would it add business value? There is a clear window of opportunity for SAP to help answer these questions. JP
Don’t miss our latest issue!