https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/BW-Analytic-Engine-(OLAP)-blog-posts.xml SAP Community - BW Analytic Engine (OLAP) 2024-05-20T11:10:09.101198+00:00 python-feedgen BW Analytic Engine (OLAP) blog posts in SAP Community https://community.sap.com/t5/technology-blogs-by-sap/error-message-quot-unkeep-attribute-could-not-be-removed-quot-for-sql/ba-p/13405989 Error Message "Unkeep Attribute could not be removed" for SQL Queries against External SAP HANA Views with Non-Cumulatives 2019-04-10T13:57:01+02:00 Dominik_Graus https://community.sap.com/t5/user/viewprofilepage/user-id/40140 Have you ever tried to expose a BW query with non-cumulative key figures as External SAP HANA View? Then, you probably bumped into the error message "Unkeep Attribute could not be removed". This blog explains why the error message is raised and how it can be avoided under certain conditions.<BR /> <H2 id="toc-hId-928896931">Acknowledgement</H2><BR /> Special credits go to Dr. Markus Sinnwell, SAP BW/4HANA development. He co-invented the concepts of non-cumulatives in SAP BW and SAP BW/4HANA, transformed them into code and wrote the initial version of this blog.<BR /> <H2 id="toc-hId-732383426">When is the error raised?</H2><BR /> The error message "Unkeep Attribute could not be removed" is thrown when a time characteristic is used in the WHERE condition of a SELECT statement against an External SAP HANA View with non-cumulative key figures and this time characteristic is not in the field list of the SELECT and GROUP BY clause. This limitation is documented in <A href="https://launchpad.support.sap.com/#/notes/2032830" target="_blank" rel="noopener noreferrer">SAP Note 2032830</A>.<BR /> <H2 id="toc-hId-535869921">Why is the error raised?</H2><BR /> <OL><BR /> <LI>Non-cumulative key figures are not persisted but calculated at query runtime based on delta movements and reference points. Therefore, it is not possible to evaluate filter conditions on time characteristics before the non-cumulative key figures are calculated by the L node of the calculation scenario.</LI><BR /> <LI>Because of (1) a filter on a time characteristic must be applied after the computation of the non-cumulative key figures.</LI><BR /> <LI>Because of (2) the time characteristic on which a filter is defined must be processed by the L&nbsp;node of the calculation scenario as if it had been selected (as part of the field list in the SELECT and GROUP BY clauses).</LI><BR /> <LI>All records which match the filter condition are then passed to the standard SQL/calculation scenario processing and there, the specified aggregation is used to aggregate records with the same "key" (according to the user specified SELECT and GROUP BY clause).</LI><BR /> </OL><BR /> This would, in many cases, result in wrong query results because the special handling for aggregation of non-cumulative key figures over time is not considered in (4).<BR /> <BR /> To avoid such issues, the generated External SAP HANA View uses the modeling property 'Transparent Filter' on all time characteristics. This in turn leads to the error message "Unkeep Attribute could not be removed" when a time characteristic is not part of the SELECT and GROUP BY clause but filtered and the Calculation Engine fails removing that time characteristic from the internal drilldown.<BR /> <H2 id="toc-hId-339356416">When can the error message be suppressed?</H2><BR /> Under specific conditions the error message "Unkeep Attribute could not be removed" can be suppressed:<BR /> <H4 id="toc-hId-401008349"><STRONG>Queries with filter on time characteristic and 'finer' time characteristic added to GROUP BY</STRONG></H4><BR /> Assumed a query uses a time characteristic in the SELECT and GROUP BY clause which is 'finer' than the time characteristic on which the filter is defined. In this special scenario, there is no need for an aggregation over time after the application of the filter and therefore, the result of the query is correct.<BR /> <BR /> A time characteristic A is 'finer' than a time characteristic B if for each value of A, it is possible to uniquely determine a single value of the characteristic B, e.g. 0CALMONTH is finer than 0CALYEAR, but 0CALWEEK is NOT finer than 0CALMONTH.<BR /> <BR /> In the query execution we do not recognize this special scenario and therefore, even in this case, the query ends up in the above-mentioned error message. It is possible, however, to suppress the error by setting a parameter via the placeholder syntax as shown below in the sample queries.<BR /> <H4 id="toc-hId-204494844"><STRONG>Queries with filter representing a single value equal condition</STRONG></H4><BR /> Queries with a filter representing a single value equal condition might cause the error "Unkeep Attribute could not be removed" although the requirement is considered in the query i.e. the query uses a filter on a time characteristic and that time characteristic is in the SELECT and GROUP BY clause. In that scenario, the SQL optimizer may transform the GROUP BY clause internally and remove the characteristic from the internal GROUP BY. Thus, the error message is triggered.<BR /> <BR /> As a workaround, in this scenario, the error message can be suppressed, either by adding a parameter via the placeholder syntax as shown below in the sample queries – or by adding the hint NO_GROUPING_SIMPLIFICATION to the query.<BR /> <H3 id="toc-hId--121101380"><STRONG>Disclaimer</STRONG></H3><BR /> The SAP HANA placeholder parameter ('PLACEHOLDER' = ('ce_settings','{"disabled_patterns": "39"}')) is an internal parameter and may only be used in the context described here. Using such a parameter requires that<BR /> <OL><BR /> <LI>the described error situation has occurred and</LI><BR /> <LI>you have verified that the query returns the expected result and</LI><BR /> <LI>the parameter is not used as system-wide configuration but only in SELECT statements for specific queries. Using internal parameters outside of this given scope is not supported.</LI><BR /> </OL><BR /> <H2 id="toc-hId--446697604">Sample Queries</H2><BR /> The InfoProvider contains a non-cumulative key figure 'STOCK' (with aggregation LAST) and a delta key figure 'DELTA' is assigned to 'STOCK'.<BR /> <BR /> The InfoProvider contains the records shown below in the inbound queue table. The requests in the InfoProvider have not been activated yet.<BR /> <DIV class="scn-scrollable-area"><BR /> <TABLE><BR /> <TBODY><BR /> <TR><BR /> <TD width="170"><STRONG>0CALDAY<BR /> (YYYY-MM-DD)</STRONG></TD><BR /> <TD width="170"><STRONG>0CALMONTH<BR /> (YYYY-MM)</STRONG></TD><BR /> <TD width="123"><STRONG>0MATERIAL</STRONG></TD><BR /> <TD width="141"><STRONG>DELTA</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="170">2019-01-01</TD><BR /> <TD width="170">2019-01</TD><BR /> <TD width="123">A</TD><BR /> <TD width="141">100</TD><BR /> </TR><BR /> <TR><BR /> <TD width="170">2019-01-05</TD><BR /> <TD width="170">2019-01</TD><BR /> <TD width="123">A</TD><BR /> <TD width="141">10</TD><BR /> </TR><BR /> <TR><BR /> <TD width="170">2019-02-03</TD><BR /> <TD width="170">2019-02</TD><BR /> <TD width="123">A</TD><BR /> <TD width="141">30</TD><BR /> </TR><BR /> <TR><BR /> <TD width="170">2019-04-05</TD><BR /> <TD width="170">2019-04</TD><BR /> <TD width="123">A</TD><BR /> <TD width="141">-20</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV><BR /> <H3 id="toc-hId--514128390">Query without Filter on Time Characteristic</H3><BR /> A query without filter on a time characteristic shows the expected result.<BR /> <PRE><CODE>SELECT<BR /> "0CALMONTH",<BR /> "0MATERIAL",<BR /> sum("DELTA"),<BR /> sum("STOCK")<BR /> FROM <EM>&lt;External SAP HANA View&gt;</EM><BR /> GROUP BY<BR /> "0CALMONTH",<BR /> "0MATERIAL"</CODE></PRE><BR /> &nbsp;<BR /> <BR /> <STRONG>Result:<BR /> </STRONG><BR /> <DIV class="scn-scrollable-area"><BR /> <TABLE><BR /> <TBODY><BR /> <TR><BR /> <TD width="151"><STRONG>0CALMONTH</STRONG></TD><BR /> <TD width="151"><STRONG>0MATERIAL</STRONG></TD><BR /> <TD width="151"><STRONG>DELTA</STRONG></TD><BR /> <TD width="151"><STRONG>STOCK</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-01</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">110</TD><BR /> <TD width="151">110</TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-02</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">30</TD><BR /> <TD width="151">140</TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-03</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">0</TD><BR /> <TD width="151">140</TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-04</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">-20</TD><BR /> <TD width="151">120</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV><BR /> <H3 id="toc-hId--710641895">Query with Filter on Time Characteristic and Characteristic not added to GROUP BY</H3><BR /> Assumed we would allow to add a filter on 0CALMONTH without adding 0CALMONTH to the field list in the SELECT and GROUP BY clause, the query result would be calculated like this:<BR /> <PRE><CODE>SELECT<BR /> "0MATERIAL",<BR /> sum("DELTA"),<BR /> sum("STOCK")<BR /> FROM <EM>&lt;External SAP HANA View&gt;</EM><BR /> WHERE <BR /> "0CALMONTH" BETWEEN '201902' AND '201903'<BR /> GROUP BY<BR /> "0MATERIAL"</CODE></PRE><BR /> &nbsp;<BR /> <BR /> If we pushed down the filter through the L node of the calculation scenario which computes the non-cumulative key figures, then only the records matching the filter condition would be considered, in this example the record with date 2019-02-03. This would lead to wrong query results because also delta movements in 2019-01 must be considered to calculate the stock value. Therefore, it is not possible to push down the filter. We must apply the filter after the computation of the non-cumulative key figures.<BR /> <BR /> To be able to filter after the computation of the non-cumulative key figures, we must add the filter characteristic to the internal drilldown of the intermediate result set.<BR /> <BR /> Therefore, the first intermediate result after calculating the non-cumulative key figures is the same result that we have seen above, when selecting 0CALMONTH in the query:<BR /> <DIV class="scn-scrollable-area"><BR /> <TABLE><BR /> <TBODY><BR /> <TR><BR /> <TD width="151"><STRONG>0CALMONTH</STRONG></TD><BR /> <TD width="151"><STRONG>0MATERIAL</STRONG></TD><BR /> <TD width="151"><STRONG>DELTA</STRONG></TD><BR /> <TD width="151"><STRONG>STOCK</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-01</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">110</TD><BR /> <TD width="151">110</TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-02</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">30</TD><BR /> <TD width="151">140</TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-03</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">0</TD><BR /> <TD width="151">140</TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-04</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">-20</TD><BR /> <TD width="151">120</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV><BR /> Then, we remove all records that do not match the filter condition. This step leads to:<BR /> <DIV class="scn-scrollable-area"><BR /> <TABLE><BR /> <TBODY><BR /> <TR><BR /> <TD width="156"><STRONG>0CALMONTH</STRONG></TD><BR /> <TD width="150"><STRONG>0MATERIAL</STRONG></TD><BR /> <TD width="150"><STRONG>DELTA</STRONG></TD><BR /> <TD width="150"><STRONG>STOCK</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="156">2019-02</TD><BR /> <TD width="150">A</TD><BR /> <TD width="150">30</TD><BR /> <TD width="150">140</TD><BR /> </TR><BR /> <TR><BR /> <TD width="156">2019-03</TD><BR /> <TD width="150">A</TD><BR /> <TD width="150">0</TD><BR /> <TD width="150">140</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV><BR /> Now, as the filter has been applied, we would remove the column 0CALMONTH as it is not in the field list of the SELECT and GROUP BY clause:<BR /> <DIV class="scn-scrollable-area"><BR /> <TABLE><BR /> <TBODY><BR /> <TR><BR /> <TD width="201"><STRONG>0MATERIAL</STRONG></TD><BR /> <TD width="201"><STRONG>DELTA</STRONG></TD><BR /> <TD width="201"><STRONG>STOCK</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="201">A</TD><BR /> <TD width="201">30</TD><BR /> <TD width="201">140</TD><BR /> </TR><BR /> <TR><BR /> <TD width="201">A</TD><BR /> <TD width="201">0</TD><BR /> <TD width="201">140</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV><BR /> And finally, we would get the result of the query by aggregating all records with the same values for the GROUP BY characteristics using the given aggregation (<STRONG>sum</STRONG>("STOCK")):<BR /> <DIV class="scn-scrollable-area"><BR /> <TABLE><BR /> <TBODY><BR /> <TR><BR /> <TD width="201"><STRONG>0MATERIAL</STRONG></TD><BR /> <TD width="201"><STRONG>DELTA</STRONG></TD><BR /> <TD width="201"><STRONG>STOCK</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="201">A</TD><BR /> <TD width="201">30</TD><BR /> <TD width="201">280</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV><BR /> Thus, the query would return a wrong result: STOCK= 280<BR /> <BR /> The correct result for STOCK with aggregation LAST in the interval (2019-02,2019-03) is: 140<BR /> <H3 id="toc-hId--982386769">Query with Filter on Time Characteristic and Characteristic added to GROUP BY</H3><BR /> By adding 0CALMONTH to the field list of the SELECT and GROUP BY clause, the query result is calculated like this:<BR /> <PRE><CODE>SELECT<BR /> "0CALMONTH",<BR /> "0MATERIAL",<BR /> sum("DELTA"),<BR /> sum("STOCK")<BR /> FROM <EM>&lt;External SAP HANA View&gt;</EM><BR /> WHERE <BR /> "0CALMONTH" BETWEEN '201902' AND '201903'<BR /> GROUP BY<BR /> "0CALMONTH",<BR /> "0MATERIAL"</CODE></PRE><BR /> &nbsp;<BR /> <BR /> As explained for the previous sample query, it is not possible to push down the filter through the L&nbsp;node of the calculation scenario which computes the non-cumulative key figures. And to be able to filter after the computation of the non-cumulative key figures, we must add the filter characteristic to the internal drilldown of the calculation scenario.<BR /> <BR /> Therefore, the first intermediate result after calculating the non-cumulative key figures is the same result that we have seen above, when selecting 0CALMONTH in the query:<BR /> <DIV class="scn-scrollable-area"><BR /> <TABLE><BR /> <TBODY><BR /> <TR><BR /> <TD width="151"><STRONG>0CALMONTH</STRONG></TD><BR /> <TD width="151"><STRONG>0MATERIAL</STRONG></TD><BR /> <TD width="151"><STRONG>DELTA</STRONG></TD><BR /> <TD width="151"><STRONG>STOCK</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-01</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">110</TD><BR /> <TD width="151">110</TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-02</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">30</TD><BR /> <TD width="151">140</TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-03</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">0</TD><BR /> <TD width="151">140</TD><BR /> </TR><BR /> <TR><BR /> <TD width="151">2019-04</TD><BR /> <TD width="151">A</TD><BR /> <TD width="151">-20</TD><BR /> <TD width="151">120</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV><BR /> The second intermediate result after applying the filter is the final result. No additional aggregation is needed for this sample query:<BR /> <DIV class="scn-scrollable-area"><BR /> <TABLE><BR /> <TBODY><BR /> <TR><BR /> <TD width="156"><STRONG>0CALMONTH</STRONG></TD><BR /> <TD width="150"><STRONG>0MATERIAL</STRONG></TD><BR /> <TD width="150"><STRONG>DELTA</STRONG></TD><BR /> <TD width="150"><STRONG>STOCK</STRONG></TD><BR /> </TR><BR /> <TR><BR /> <TD width="156">2019-02</TD><BR /> <TD width="150">A</TD><BR /> <TD width="150">30</TD><BR /> <TD width="150">140</TD><BR /> </TR><BR /> <TR><BR /> <TD width="156">2019-03</TD><BR /> <TD width="150">A</TD><BR /> <TD width="150">0</TD><BR /> <TD width="150">140</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> </DIV><BR /> This is the expected result for the key figure STOCK.<BR /> <H3 id="toc-hId--1178900274">Query with Filter on Time Characteristic and 'finer' Time Characteristic added to GROUP BY</H3><BR /> The query below does not fulfill the requirement as documented in <A href="https://launchpad.support.sap.com/#/notes/2032830" target="_blank" rel="noopener noreferrer">SAP Note 2032830</A> about filters on time characteristics: the characteristic 0CALYEAR on which the filter is defined is not part of the SELECT and GROUP BY clause.<BR /> <BR /> Therefore, the query would fail with error message "Unkeep Attribute could not be removed".<BR /> <PRE><CODE>SELECT<BR /> "0CALMONTH",<BR /> "0MATERIAL",<BR /> sum("DELTA"),<BR /> sum("STOCK")<BR /> FROM <EM>&lt;External SAP HANA View&gt;</EM><BR /> WHERE <BR /> "0CALYEAR" BETWEEN '2019' AND '2020'<BR /> GROUP BY<BR /> "0CALMONTH",<BR /> "0MATERIAL"</CODE></PRE><BR /> &nbsp;<BR /> <BR /> However, as 0CALMONTH is finer than 0CALYEAR and 0CALMONTH is selected in the query, it is possible to use the following parameter to switch off the error. Note that <STRONG>the disclaimer above must be considered</STRONG>. In this special scenario, there is no need for an aggregation over time after the application of the filter and therefore, the result of the query is correct.<BR /> <PRE><CODE>SELECT<BR /> "0CALMONTH",<BR /> "0MATERIAL",<BR /> sum("DELTA"),<BR /> sum("STOCK")<BR /> FROM <EM>&lt;External SAP HANA View&gt;</EM><BR /> ('PLACEHOLDER' = ('ce_settings','{"disabled_patterns": "39"}') )<BR /> WHERE <BR /> "0CALYEAR" BETWEEN '2019' AND '2020'<BR /> GROUP BY<BR /> "0CALMONTH",<BR /> "0MATERIAL"</CODE></PRE><BR /> &nbsp;<BR /> <H3 id="toc-hId--1375413779">Query with Single Value Equal Condition</H3><BR /> Queries with a filter representing a single value equal condition might cause the error "Unkeep Attribute could not be removed" although the query uses a filter on a time characteristic and that time characteristic is in the SELECT and GROUP BY clause. In that scenario, the SQL optimizer may transform the GROUP BY clause internally and remove the characteristic from the internal GROUP BY. Thus, the error message is triggered.<BR /> <BR /> As a workaround, in this scenario, either a parameter via the placeholder syntax can be used – or the hint NO_GROUPING_SIMPLIFICATION can be added to the query. Note that <STRONG>the disclaimer above must be considered</STRONG> when using the parameter.<BR /> <PRE><CODE>SELECT<BR /> "0CALMONTH",<BR /> "0MATERIAL",<BR /> sum("DELTA"),<BR /> sum("STOCK")<BR /> FROM <EM>&lt;External SAP HANA View&gt;</EM><BR /> WHERE <BR /> "0CALMONTH" = '201902'<BR /> GROUP BY<BR /> "0CALMONTH",<BR /> "0MATERIAL"</CODE></PRE><BR /> &nbsp;<BR /> <BR /> Workaround via placeholder syntax:<BR /> <PRE><CODE>SELECT<BR /> "0CALMONTH",<BR /> "0MATERIAL",<BR /> sum("DELTA"),<BR /> sum("STOCK")<BR /> FROM <EM>&lt;External SAP HANA View&gt;<BR /> </EM>('PLACEHOLDER' = ('ce_settings','{"disabled_patterns": "39"}') )<BR /> WHERE <BR /> "0CALMONTH" = '201902'<BR /> GROUP BY<BR /> "0CALMONTH",<BR /> "0MATERIAL"</CODE></PRE><BR /> &nbsp;<BR /> <BR /> Workaround via database hint:<BR /> <PRE><CODE>SELECT <BR /> "0CALMONTH", <BR /> "0MATERIAL", <BR /> sum("DELTA"),<BR /> sum("STOCK") <BR /> FROM <EM>&lt;External SAP HANA View&gt;</EM> <BR /> WHERE <BR /> "0CALMONTH" = '201902' <BR /> GROUP BY <BR /> "0CALMONTH", <BR /> "0MATERIAL" <BR /> WITH HINT( NO_GROUPING_SIMPLIFICATION )</CODE></PRE><BR /> &nbsp;<BR /> <H3 id="toc-hId--1571927284">Wrap-up</H3><BR /> The error message "Unkeep Attribute could not be removed" is thrown for good reasons in most scenarios. However, there are a few exceptions to that rule and you know now how to suppress the error message if appropriate. Make sure though to observe the disclaimer above. 2019-04-10T13:57:01+02:00 https://community.sap.com/t5/technology-blogs-by-sap/experience-applied-intelligence-at-sap-teched-2019-hana-analytics/ba-p/13388511 Experience Applied Intelligence at SAP TechEd 2019 - HANA, Analytics & Intelligent Technologies 2019-08-07T09:20:47+02:00 asidiq https://community.sap.com/t5/user/viewprofilepage/user-id/8592 While August has just started and some of you are getting ready for their well deserved summer break, there is one thing, you should take care of first. <STRONG>SAP TechEd 2019</STRONG> is coming up in less than two months already and if you don't know why you should attend, this blog post will definitely change your mind.<BR /> <BR /> Check out this article and our great session content to find out, why you can't miss out on packing your bags, head out to <STRONG>Las Vegas, Barcelona or Bangalore</STRONG>&nbsp;and get the latest and greatest insights into SAP's developments and product portfolio. This article will give you an overview on the event and the latest innovations within the <STRONG>Applied Intelligence</STRONG> track.<BR /> <BR /> Are you directly looking for event dates and ways to register? <A href="#further" target="_blank" rel="nofollow noopener noreferrer">Great, then click here and directly head down!</A><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2018/08/locations-1.png" /><BR /> <H2 id="toc-hId-907741252"><A name="top" target="_blank"></A>Table of contents</H2><BR /> <OL><BR /> <LI><A href="#what" target="_blank" rel="nofollow noopener noreferrer">Why should I attend SAP TechEd?</A></LI><BR /> <LI><A href="#learning" target="_blank" rel="nofollow noopener noreferrer">What is a learning journey?</A></LI><BR /> <LI><A href="#track" target="_blank" rel="nofollow noopener noreferrer">Applied Intelligence at SAP TechEd 2019</A><BR /> <OL><BR /> <LI><A href="#fast" target="_blank" rel="nofollow noopener noreferrer">Make Fast and Confident Decisions with SAP Analytics Solutions</A></LI><BR /> <LI><A href="#transform" target="_blank" rel="nofollow noopener noreferrer">Transform your business processes with intelligent technologies</A></LI><BR /> <LI><A href="#develop" target="_blank" rel="nofollow noopener noreferrer">Develop, extend and embed SAP Analytics solutions</A></LI><BR /> <LI><A href="#planning" target="_blank" rel="nofollow noopener noreferrer">Connect Your Enterprise Through Collaborative Enterprise Planning</A></LI><BR /> <LI><A href="#dwc" target="_blank" rel="nofollow noopener noreferrer">Get Started with the SAP Data Warehouse Cloud Solution</A></LI><BR /> <LI><A href="#unite" target="_blank" rel="nofollow noopener noreferrer">Unite On-Premise and Cloud Data with SAP Data Warehouse Cloud</A></LI><BR /> </OL><BR /> </LI><BR /> <LI><A href="#further" target="_blank" rel="nofollow noopener noreferrer">How to register and further information</A></LI><BR /> </OL><BR /> <H2 id="toc-hId-711227747"><A name="what" target="_blank"></A>1. Why should I attend SAP TechEd?</H2><BR /> While a lot of your colleagues, partners and maybe customers may have already attended SAP TechEd in the past and have told you about all the great sessions and content, you may still ask yourself: <STRONG>Why should I attend SAP TechEd 2019?</STRONG><BR /> <BR /> The answer is fair simple: because this will <STRONG>boost your knowledge</STRONG> and potentially your career. SAP TechEd 2019 will host great <STRONG>lectures</STRONG>, <STRONG>hands-on sessions</STRONG>, <STRONG>Mini-CodeJams</STRONG>, a huge keynote and a lot of activities. Within just a few days, you will not only have the latest information at hand but you are also prepared for the future.<BR /> <BR /> And on top of that, you have the chance to <STRONG>meet with a lot of product experts</STRONG> from SAP. Speakers from all over the organization will not only present <STRONG>deep insights</STRONG> but also answer all the questions you may have and become your point of contact for a specific topic.<BR /> <H6 id="toc-hId-1031045118"><EM><A href="#top" target="_blank" rel="nofollow noopener noreferrer">Go back to Table of Contents</A></EM></H6><BR /> &nbsp;<BR /> <H2 id="toc-hId-318200737"><A name="learning" target="_blank"></A>2. What is a learning journey?</H2><BR /> Last year, SAP TechEd changed massively to <STRONG>improve your experience and provide you the best learning experience</STRONG> you can get. To make sure, you get the content which fits your needs, we introduced <STRONG>learning journeys</STRONG>. Check out <A href="https://blogs.sap.com/2018/06/18/sap-teched-2018-register-for-this-years-ultimate-how-to-learning-adventure/" target="_blank" rel="noopener noreferrer">Ric Rogers' explanation from last year</A> on what learning journeys are:<BR /> <BLOCKQUOTE>What makes this year’s learning journey approach so special is that it’s personal and goal-oriented to each participant. People can choose their personal learning journey, then personalize it even more for themselves. They’ll build the skills they need to further their individual careers using the latest technologies.</BLOCKQUOTE><BR /> Learning journeys will not only <STRONG>consolidate all topic-related sessions</STRONG> for you but will also give you <STRONG>fast access</STRONG> to the information you need and supports you in creating your perfect individual agenda.<BR /> <BR /> Later in this blog, you will find all our learning journeys and links to access them directly.<BR /> <H6 id="toc-hId-638018108"><EM><A href="#top" target="_blank" rel="nofollow noopener noreferrer">Go back to Table of Contents</A></EM></H6><BR /> &nbsp;<BR /> <H2 id="toc-hId--74826273"><A name="track" target="_blank"></A>3. Applied Intelligence at SAP TechEd 2019</H2><BR /> At SAP TechEd, learning is the clear focus. And to make sure, you learn everything about our newest innovations, the Applied Intelligence track covers a lot of <STRONG>great products and technologies</STRONG> that not only make your <STRONG>business run better</STRONG> but also put you in front of innovation.<BR /> <BR /> Applied Intelligence consists of <STRONG>six strong and insightful learning journeys</STRONG> that cover a lot of topics around <STRONG>SAP Analytics</STRONG>, <STRONG>SAP HANA</STRONG>, <STRONG>Intelligent Technologies</STRONG> and of course our brand new <STRONG>SAP Data Warehouse Cloud</STRONG>!<BR /> <BR /> To get a first overview of our track, we created this video. Check it out and find out more about our core topics this year:<BR /> <BR /> <IFRAME width="560" height="315" src="https://www.youtube.com/embed/9LI5Mkrbo9c" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></IFRAME><BR /> <BR /> Got curious about our sessions and learning journeys and want to get <STRONG>more details</STRONG>? Then continue reading this blog to find all relevant information and links for you to get started.<BR /> <BR /> <EM>Every chapter will carry links to the respective session catalog and learning journey overview. This way, you can easily add sessions to your personal agenda.</EM><BR /> <H6 id="toc-hId-244991098"><EM><A href="#top" target="_blank" rel="nofollow noopener noreferrer">Go back to Table of Contents</A></EM></H6><BR /> &nbsp;<BR /> <H3 id="toc-hId--338770564"><A name="fast" target="_blank"></A>3.1. Make Fast and Confident Decisions with SAP Analytics Solutions</H3><BR /> You've probably heard it more than enough: <STRONG>data is the new gold</STRONG>. And while more and more systems start collecting data, you need to find an efficient and powerful way to harvest this data. To support you in this challenging task, SAP offers you a broad range of solutions including SAP Analytics Cloud - your central platform for Business Intelligence, Planning, Predictive and the Analytics Designer.<BR /> <BR /> Our learning journey <STRONG>AIN1 - Make Fast and Confident Decisions with SAP Analytics Solutions</STRONG>&nbsp;will offer you lectures and hands-on sessions that show you our latest developments around SAP Analytics and how you can use them to get the most out of your data.<BR /> <BR /> Don't forget to pick your favorite sessions and add them to your personal agenda!<BR /> <UL><BR /> <LI>Las Vegas: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=220&amp;sf=6234&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Barcelona: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=221&amp;sf=129&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Bangalore: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=222&amp;sf=1&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> </UL><BR /> <H6 id="toc-hId--148035912"><EM><A href="#top" target="_blank" rel="nofollow noopener noreferrer">Go back to Table of Contents</A></EM></H6><BR /> &nbsp;<BR /> <H3 id="toc-hId--731797574"><A name="transform" target="_blank"></A>3.2. Transform your business processes with intelligent technologies</H3><BR /> Ever heard about <STRONG>Intelligent Technologies</STRONG>? Did you know, that it was never easier to embed modern and innovative technologies like Machine Learning or Blockchain into your daily business processes? With SAP, you can easily integrate new technologies into your workflows and make them accessible to your business.<BR /> <BR /> To find out more about this, join our learning journey <STRONG>AIN2 - Transform your business processes with intelligent technologies</STRONG> and attend our sessions on additional topics like SAP Conversational AI or SAP Intelligent Robotic Process Automation.<BR /> <BR /> Don't forget to pick your favorite sessions and add them to your personal agenda!<BR /> <UL><BR /> <LI>Las Vegas: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=220&amp;sf=6235&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Barcelona: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=221&amp;sf=130&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Bangalore: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=222&amp;sf=2&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> </UL><BR /> <H6 id="toc-hId--1883751469"><EM><A href="#top" target="_blank" rel="nofollow noopener noreferrer">Go back to Table of Contents</A></EM></H6><BR /> &nbsp;<BR /> <H3 id="toc-hId--1200055953"><A name="develop" target="_blank"></A>3.3. Develop, extend and embed SAP Analytics solutions</H3><BR /> SAP's Analytics solutions provide a strong set of functionalities and tools. However, there is sometimes this one thing, you can't find. But don't worry: thanks to our development capabilities, you can easily <STRONG>extend our solutions</STRONG> on your own. And what about reusing existing content? With Embedding, SAP Analytics supports you on your way to become the <STRONG>Intelligent Enterprise</STRONG> by making sure to use solutions like SAP Analytics Cloud all over your landscape.<BR /> <BR /> If this sparked your interest, then <STRONG>AIN3 - Develop, extend and embed SAP Analytics solutions</STRONG> is your place to be. In various sessions, you will find out how you can easily develop on top of SAP Analytics solutions or integrate SAP Analytics Cloud into other applications to get the best Analytics experience out there.<BR /> <BR /> Don't forget to pick your favorite sessions and add them to your personal agenda!<BR /> <UL><BR /> <LI>Las Vegas: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=220&amp;sf=6236&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Barcelona: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=221&amp;sf=131&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Bangalore: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=222&amp;sf=3&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> </UL><BR /> <H6 id="toc-hId-2018188817"><EM><A href="#top" target="_blank" rel="nofollow noopener noreferrer">Go back to Table of Contents</A></EM></H6><BR /> &nbsp;<BR /> <H3 id="toc-hId--1593082963"><A name="planning" target="_blank"></A>3.4. Connect Your Enterprise Through Collaborative Enterprise Planning</H3><BR /> It's not always easy to get things done without a good plan. That's what makes Planning so unique and crucial for your business and that's why SAP is offering a broad range of solutions in the Planning sector to help you meet your requirements. Especially with our new capabilities in SAP Analytics Cloud, Planning has never been easier and more intuitive than today!<BR /> <BR /> Go and visit <STRONG>AIN4 - Connect Your Enterprise Through Collaborative Enterprise Planning</STRONG>&nbsp;to find out, how SAP helps you revolutionize your Controlling and financial planning. Participate in our hands-on sessions and see first-hand how modern Planning looks like.<BR /> <BR /> Don't forget to pick your favorite sessions and add them to your personal agenda!<BR /> <UL><BR /> <LI>Las Vegas: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=220&amp;sf=6237&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Barcelona: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=221&amp;sf=132&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Bangalore: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=222&amp;sf=4&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> </UL><BR /> <H6 id="toc-hId-1625161807"><EM><A href="#top" target="_blank" rel="nofollow noopener noreferrer">Go back to Table of Contents</A></EM></H6><BR /> &nbsp;<BR /> <H3 id="toc-hId--1986109973"><A name="dwc" target="_blank"></A>3.5. Get Started with the SAP Data Warehouse Cloud Solution</H3><BR /> Have you heard about <STRONG>SAP Data Warehouse Cloud</STRONG>? Our latest announcement will start a new chapter in data warehousing and how business thinks about it. And of course, SAP TechEd 2019 will be your hotspot to get your fingers right at this new product.<BR /> <BR /> Watch Gerrit Kazmaier's video and find out more about this new and exciting product:<BR /> <BR /> <IFRAME width="560" height="315" src="https://www.youtube.com/embed/zLy1-1iQo2M" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></IFRAME><BR /> <BR /> You want to get more details about this? Then look out for <STRONG>AIN5 - Get Started with the SAP Data Warehouse Cloud Solution</STRONG>&nbsp;and see how SAP innovates your data warehousing experience and helps you on your journey to the cloud.<BR /> <BR /> Don't forget to pick your favorite sessions and add them to your personal agenda!<BR /> <UL><BR /> <LI>Las Vegas: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=220&amp;sf=6238&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Barcelona: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=221&amp;sf=133&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Bangalore: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=222&amp;sf=5&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> </UL><BR /> <H6 id="toc-hId-1232134797"><EM><A href="#top" target="_blank" rel="nofollow noopener noreferrer">Go back to Table of Contents</A></EM></H6><BR /> &nbsp;<BR /> <H3 id="toc-hId-1915830313"><A name="unite" target="_blank"></A>3.6. Unite On-Premise and Cloud Data with SAP Data Warehouse Cloud</H3><BR /> With SAP's latest innovation - SAP Data Warehouse Cloud - we also want to make sure that our customers with existing <STRONG>SAP Business Warehouse</STRONG> installations stay innovative and can start their transition towards the Cloud. Therefore, this learning journey will focus on SAP BW/4HANA 2.0 as well as hybrid data management strategies and usage scenarios.<BR /> <BR /> Get yourself familiarized with <STRONG>AIN6 - Unite On-Premise and Cloud Data with SAP Data Warehouse Cloud</STRONG>&nbsp;and make sure that you join all the lectures and hands-on sessions that help you in getting the insights your need!<BR /> <BR /> Don't forget to pick your favorite sessions and add them to your personal agenda!<BR /> <UL><BR /> <LI>Las Vegas: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=220&amp;sf=6239&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Barcelona: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=221&amp;sf=134&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> <LI>Bangalore: <A href="https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=222&amp;sf=7&amp;locale=en_US" target="_blank" rel="noopener noreferrer nofollow">Session Catalog</A></LI><BR /> </UL><BR /> <H6 id="toc-hId-839107787"><EM><A href="#top" target="_blank" rel="nofollow noopener noreferrer">Go back to Table of Contents</A></EM></H6><BR /> &nbsp;<BR /> <H2 id="toc-hId-1816206310"><A name="further" target="_blank"></A>4. How to register and further information</H2><BR /> Can't wait to attend SAP TechEd 2019? Me neither! <STRONG>Go and grab&nbsp;your ticket today</STRONG> by registering and securing your spot.<BR /> <BR /> Follow the links below to register for SAP TechEd 2019 in each location:<BR /> <UL><BR /> <LI><A href="https://events.sap.com/teched-usa/en/registrationhotel" target="_blank" rel="noopener noreferrer">Register for SAP TechEd Las Vegas 2019</A></LI><BR /> <LI><A href="https://techedemea2019.sapevents.com/index.cfm" target="_blank" rel="noopener noreferrer nofollow">Register for SAP TechEd Barcelona 2019</A></LI><BR /> <LI><A href="https://events.sap.com/teched-india/en/registration_information" target="_blank" rel="noopener noreferrer">Register for SAP TechEd Bangalore 2019</A></LI><BR /> </UL><BR /> Also, don't forget to plan your visit by checking out the following links. Explore the session catalog and follow our social media channels to get the most current updates.<BR /> <UL><BR /> <LI><A href="https://events.sap.com/teched-usa/en/tracks" target="_blank" rel="noopener noreferrer">SAP TechEd Session Track overview</A></LI><BR /> <LI><A href="https://www.youtube.com/channel/UCUJdXZAAOsNuPBpLa50XUxQ" target="_blank" rel="noopener noreferrer nofollow">SAP TechEd&nbsp;@ YouTube</A></LI><BR /> <LI><A href="https://www.facebook.com/SAPTechEd/" target="_blank" rel="noopener noreferrer nofollow">SAP TechEd&nbsp;@ Facebook</A></LI><BR /> <LI><A href="https://events.sap.com/teched-global/en/home" target="_blank" rel="noopener noreferrer">SAP TechEd Global homepage</A></LI><BR /> </UL><BR /> Do you have any additional questions or want to leave some feedback? Just drop a comment or feel free to reach out to me!<BR /> <H6 id="toc-hId-614264468"><EM><A href="#top" target="_blank" rel="nofollow noopener noreferrer">Go back to Table of Contents</A></EM></H6> 2019-08-07T09:20:47+02:00 https://community.sap.com/t5/technology-blogs-by-sap/data-analyzer-ad-hoc-query-analysis-for-bw-queries-with-sap-analytics-cloud/ba-p/13388154 Data Analyzer - Ad Hoc Query Analysis for BW Queries with SAP Analytics Cloud 2019-09-04T19:19:33+02:00 IngoH https://community.sap.com/t5/user/viewprofilepage/user-id/150260 Some of you might already have noticed (or even used) the new option on SAP Analytics Cloud and SAP Analytics Cloud, Analytics Designer to provide an Ad Hoc Query Analysis experience to your end-user. Yes - Ad Hoc Query Analysis - similar to the old BEx Web Analyzer.<BR /> <BR /> So lets take a look at how it works and what options are already available today.<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId-1036820254">Launching the Data Analyzer</H3><BR /> You have two options to launch the Data Analyzer.<BR /> <BR /> First, you can simply launch the Data Analyzer using a URL:<BR /> <BR /> <SPAN style="color: #ff6600"><A href="http://&lt;HOST&gt;:&lt;PORT&gt;/sap/fpa/ui/app.html?tenant=&lt;TENANT_NAME&gt;#;view_id=dataAnalyzer;connection=&lt;CONNECTION_NAME&gt;;dataSourceName=&lt;DATA_SOURCE_NAME&gt;" target="test_blank" rel="nofollow noopener noreferrer">http://&lt;HOST&gt;:&lt;PORT&gt;/sap/fpa/ui/app.html?tenant=&lt;TENANT_NAME&gt;#;view_id=dataAnalyzer;connection=&lt;CONNECTION_NAME&gt;;dataSourceName=&lt;DATA_SOURCE_NAME&gt;</A>;</SPAN><BR /> <BR /> A simple approach would be to copy the URL after you logged in to your SAP Analytics Cloud tenant, and probably the URL ends with view_id=home, so all you have to do is to change the view_id to "dataAnalyzer".<BR /> <BR /> The ability to add the connection and the data source as URL parameters are optional. In case you decide to leave those elements off the URL, then the Data Analyzer will simply prompt you for the connection and the BW Query name.<BR /> <BR /> The second option is part of SAP Analytics Cloud, Analytics Designer where you can use the following script command to launch the Data Analyzer:<BR /> <BR /> <SPAN style="color: #ff6600">NavigationUtils.openDataAnalyzer()</SPAN><BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId-840306749">Using the Data Analyzer</H3><BR /> One of the big advantages of the Data Analyzer, is simply the fact, that your user doesn't need to create a model in SAP Analytics Cloud, but instead can simply use the BW Queries as they are and then analyze the information.<BR /> <BR /> So lets use the Data Analyzer now.<BR /> <BR /> In my scenario I use the URL option and I do not pass in a connection or BW query name...<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/blog_data_analyzer_001.jpg" /><BR /> <BR /> ....and because we didn't provide those details, the first step is that the Data Analyzer will ask us for the connection and the data source name.<BR /> <BR /> After selecting the Connection and selecting the BW Query, I am presented with the table based on the definition of the BW Query.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/blog_data_analyzer_002.jpg" /><BR /> <BR /> In my example, the BW Query contains the dimension Customer in the Rows and all the key figures in the columns, which is what the table will show by default.<BR /> <BR /> The ad hoc part comes to life, when the user now opens the Designer options.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/blog_data_analyzer_003.jpg" /><BR /> <BR /> Using the option shown as (1) in the screen above will open up the navigation panel - shown on the left hand side (3). Using the Navigation Panel, the user has the ability to choose which dimensions / measures are shown in the Rows or Columns, simply by using the icons next to the dimension / measure name and to use a simple click to either add or remove the dimension from the Rows <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/blog_data_analyzer_004.jpg" /> or Columns <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/blog_data_analyzer_005.jpg" />.<BR /> <BR /> Shown in the image above as (2), the user has the ability to change the settings for the dimension and for the measure.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/blog_data_analyzer_006.jpg" /><BR /> <BR /> For dimensions, the user has the ability to choose between the ID or Description (or both) for the display, and the user can also switch on and also switch between different hierarchies on the fly.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/blog_data_analyzer_007.jpg" /><BR /> <BR /> For the Measures, the user quickly can remove a subset of the measures.<BR /> <BR /> And last but for sure not least, with the option shown above as (4) the user has the ability to switch to a different BW query on the fly. The user will be shown the connection dialog and can then choose a different BW query and a list of recently used BW queries is available as well.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/blog_data_analyzer_001-1.jpg" /><BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> In case your BW Query contains BEx Variables, you also will have the option to set the variable values from the toolbar and your table will always show with a Filter line, so that the user also has the ability to add additional filter values.<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId-643793244">Summary</H3><BR /> <UL><BR /> <LI>The Data Analyzer is basically a ready-to-run option, which allows your users to analyze BW queries on the fly.</LI><BR /> <LI>Your users have the option to navigate, analyzer, and filter the data.</LI><BR /> <LI>You have the option to use the URL parameters or use the scripting option in Analytics Designer.</LI><BR /> <LI>The Data Analyzer is tied to a new permission that is required, please see the <A href="https://help.sap.com/doc/00f68c2e08b941f081002fd3691d86a7/2019.17/en-US/5610771610d64f0a813f5357442ac1db.html" target="_blank" rel="noopener noreferrer">online documentation for further details</A>.</LI><BR /> <LI>The user doesn't need a SAP Analytics Cloud model, but instead can use the BW queries direcctly</LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> Additional capabilities, such as Bookmarks or Commenting are planned for a future version of the Data Analyzer.<BR /> <BR /> &nbsp;<BR /> <BR /> In case you would like to find out more, here the link to the <A href="https://help.sap.com/doc/00f68c2e08b941f081002fd3691d86a7/2019.17/en-US/67afbf41f24f4cb48ca7bd72d5e40d94.html" target="_blank" rel="noopener noreferrer">online documentation</A>. 2019-09-04T19:19:33+02:00 https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/bw-query-on-cds-cube/ba-p/13389126 BW Query on CDS cube? 2019-09-06T10:41:13+02:00 dmitry_kuznetsov1 https://community.sap.com/t5/user/viewprofilepage/user-id/183443 After spending some time in S/4HANA Embedded Analytics building Queries in CDS views I came to a realization that it is a painful exercise. While in some (simple) cases it does, indeed, make a good sense, for real analytical queries probably a Query Designer will be a better choice. By Query Designer I mean BEx (t.b. deprecated) or a BW-MT flavor of it. I will use the latter in my examples.<BR /> <H1 id="toc-hId-778684516">Start</H1><BR /> So, where do I start? I start by connecting to an S/4HANA from BW Modeling Tools perspective in Eclipse.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/queries_add_bwmt.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> Then we proceed the same way as in BW cases. When creating a new Query we need an InfoProvider. In S/4HANA this will be a generated TransientProvider (which is based on CDS view), so don't forget to tick that checkbox before searching.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/Annotation-2019-09-06-112955.png" /><BR /> <H1 id="toc-hId-582171011">OData?</H1><BR /> If you are planning on using the query in KPIs or Reports, it is a good idea to check the box for OData service.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/Annotation-2019-09-06-113106-1.png" height="485" width="394" /><BR /> <H1 id="toc-hId-385657506"></H1><BR /> <H1 id="toc-hId-189144001">Parameters</H1><BR /> In many cases our CDS-based "Cube" will have at least some parameters defined. And there is no such thing as optional parameters in the CDS world. So, we need to fill them somehow. Typically, they are prefixed with a P_* in CDS editor. So we need to find all of them in Query Designer and they look like fields! Take them and add to "Filters" part.<BR /> <H3 id="toc-hId-250795934">Procedure</H3><BR /> Go to transaction RSRTS_ODP_DIS, paste the name of TransientProvider you're dealing with (less 2C prefix) and you will find mapping between parameter name and description.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/parameters.png" height="498" width="811" /><BR /> <BR /> Find the same field by technical name or description and drag to Filters area, map values for them by clicking "Restrict".<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/Annotation-2019-09-06-113254.png" /><BR /> <BR /> &nbsp;<BR /> <H1 id="toc-hId--203883009">Variables</H1><BR /> Chances are you are reading this post because you also would like to use BEx variables. So <STRONG>yes</STRONG>, they can be created and <STRONG>yes</STRONG>, you can use standard ones if your CDS model is properly annotated with @Semantics annotations. I hope you know how to create your own variables. So let us see what is needed to be done to use the SAP-delivered ones.<BR /> <BR /> What you need to do is activate BI Content (same old RSA1) for variables. Decide yourself if it hurts to have all 2000 of them activated...<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/1726192-date-variables-select.png" height="415" width="524" /><BR /> <BR /> &nbsp;<BR /> <BR /> And voila! They're visible in Query Designer<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/1726194-date-variables-visible.png" /><BR /> <BR /> &nbsp;<BR /> <BR /> From this point on, Query build is no different than creating in on e.g. CompositeProvider<BR /> <BR /> &nbsp;<BR /> <BR /> Cheers,<BR /> <BR /> Dmitry Kuznetsov<BR /> <BR /> BI Consulting 2019-09-06T10:41:13+02:00 https://community.sap.com/t5/technology-blogs-by-sap/creating-a-key-figure-kpi-repository-on-nw-bw-or-bw-4hana/ba-p/13409490 Creating a Key Figure (KPI-) Repository on NW BW or BW/4HANA 2019-09-23T12:43:40+02:00 frank_klingl https://community.sap.com/t5/user/viewprofilepage/user-id/188174 Very often I hear that BW is lacking a global key performance indicator (KPI) repository. It was for a long time already possible to create a calculated key figure (CKF) or restricted key figure (RKF) in BW on InfoProvider level. One could reuse them on different BW Queries based on the same InfoProvider. However, it lacked the possibility to do it global across different InfoProviders and it always needed a modeled query to be created or changed. This had to be done usually by persons from the IT department and therefore needed IT involvement. Two developments now made it possible to create a global key figure repository across InfoProviders for the end user at runtime.<BR /> <OL><BR /> <LI>The introduction of linked components in the BW Modelling Tools on BW/4HANA</LI><BR /> <LI>The possibility to create custom restrictions and calculations on the fly in end user tools like Analysis for Office or SAP Analytics Cloud</LI><BR /> </OL><BR /> With those two developments, it is now possible in the analytics engine to also enable the end user to search for KPIs which are RKF/CKF and assign them on the fly to the query. With this a global key figure repository can be build up in BW/4HANA.<BR /> <H2 id="toc-hId-929011312"></H2><BR /> <H2 id="toc-hId-732497807">1.&nbsp;&nbsp;&nbsp;&nbsp; Linked Components in the BW Modelling Tools</H2><BR /> As written in the <A href="https://help.sap.com/viewer/dd104a87ab9249968e6279e61378ff66/11.0.8/en-US/ec2998cc10d44c7c8d26817fe8eb63b3.html?q=BWMT%20linked%20components" target="_blank" rel="noopener noreferrer">standard documentation</A> from BWMT 1.19 onwards it was possible to create linked components and transfer queries also to other InfoProvider having the same structure. This is also possible for reusable components like RKF and CKF. It is now possible to define a KPI centrally and to add them to different InfoProviders. They then can be leveraged on each of those InfoProvider. If RKF or CKF is changed all <A href="https://help.sap.com/viewer/dd104a87ab9249968e6279e61378ff66/11.0.8/en-US/b88c768f9ddf49428e8c9f029190b22c.html" target="_blank" rel="noopener noreferrer">linked components</A> get changed centrally. As consequence, a central maintenance of KPIs is possible. If needed a linked component can also be decoupled from the source but then the central maintenance gets lost. In addition one can centrally <A href="https://help.sap.com/viewer/107a6e8a38b74ede94c833ca3b7b6f51/2.0.1/en-US/e75b161e657d420495ae3bfd604ba83c.html" target="_blank" rel="noopener noreferrer">search</A> for KPIs and edit them in the BW modelling tools. The only open question left was how to consume them on other places then the BW query designer or the BW workspace query designer.<BR /> <H2 id="toc-hId-535984302">2.&nbsp;&nbsp;&nbsp;&nbsp; Dynamic Restrictions and Calculations created by End User on the Fly</H2><BR /> With BW 7.5 SP4 and Analysis Office 2.4 we started our roadmap for sheet based report definition which was described in the blog ‘<A href="https://blogs.sap.com/2016/07/29/query-less-reporting-in-bpc-embedded/" target="_blank" rel="noopener noreferrer">Query less Reporting in BPC embedded</A>’. The main part of your first delivery was the ‘restriction on the fly’ which is described in the blog&nbsp; <A href="https://blogs.sap.com/2016/07/21/planning-engine-improvements-for-bpc-embedded-model-pak-and-bw-ip-with-bw-750-sp4/" target="_blank" rel="noopener noreferrer">‘Planning Engine Improvements for BPC Embedded Model, PAK and BW-IP with BW 7.50 SP4'</A>. Before it was only possible to add them in a central modelled Query or the BW workspace query designer. Now the end user can create KPIs through restrictions and formula on the fly. In BW 7.50 SP16 and BW/4HANA 2.0 SP 4 we also will lift the limitations that restrictions can not be created on calculations. This enables this feature also for a much broader scope. In addition, custom aggregations will be possible based on BW 7.50 SP16 and BW/4HANA 2.0 (See <A href="https://blogs.sap.com/2019/02/22/improvements-of-bw4hana-analytical-engine-in-q1-2019-with-bw4hana-2.0/" target="_blank" rel="noopener noreferrer">blog</A>). However, we still were not able to add reusable components (RKF, CKF) on the fly.<BR /> <BR /> &nbsp;<BR /> <H2 id="toc-hId-339470797">3.&nbsp;&nbsp;&nbsp;&nbsp; Adding reusable components on the fly to the query.</H2><BR /> &nbsp;<BR /> <BR /> With NW BW 7.50 FP 16 (and note 2823850) and the upcoming BW/4HANA 2.0 SP 4 we enable the analytic engine now also to add reusable components like RKF and CKF on the fly. First one can search for them and them add them to an existing query. An example implementation was provided in transaction RSRT2 in mode ABAP_BICS. An adoption on the upcoming AO 2.8 release is planned in an upcoming support package.<BR /> <BR /> Here are following steps done by a business user in RSRT as example UI .<BR /> <UL><BR /> <LI>A new button is introduced on the navigation pane (left side)</LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/RSRTButton1.jpg" /><BR /> <UL><BR /> <LI>A search result on reusable components defined in the InfoProvider comes up</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/Catalog2.jpg" /><BR /> <UL><BR /> <LI>The selected key figures are then added to the query</LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/Result3.jpg" /><BR /> <BR /> The example is shown in RSRT but an adoption in Analysis Office and BW Web UI is planned.<BR /> <BR /> BW Web UI will be deliverd with the upcoming feature pack 4 in BW/4HANA 2.0 SP4.<BR /> <BR /> Here the same look similar:<BR /> <BR /> Clicking on the key figurge TExt opens the menu and I can pick Add and then 'KPI from Repository'<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/ADDreusable1.jpg" /><BR /> <BR /> Then the list of base and reusable key figures comes up. We pick first the calculated key figure<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/ADDreusable2.jpg" /><BR /> <BR /> After clicking on it it is shown as additional column in the query preview<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/ADDreusable3.jpg" /><BR /> <BR /> Same I can do for restricted key figure. Here a restriction to Australia.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/ADDreusable4.jpg" /><BR /> <BR /> Then also this restricted key figure is shown.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/ADDreusable5.jpg" /> 2019-09-23T12:43:40+02:00 https://community.sap.com/t5/technology-blogs-by-sap/improvements-of-bw-4hana-analytical-engine-in-q3-2019-with-nw-bw-sp16-or-q1/ba-p/13409598 Improvements of BW/4HANA Analytical Engine in Q3 2019 with NW BW SP16 or Q1 2020 with BW/4HANA 2.0 SP4 2019-09-23T13:28:17+02:00 frank_klingl https://community.sap.com/t5/user/viewprofilepage/user-id/188174 The last improvements in the analytical engine of BW/4HANA were shipped with BW/4HANA 2.0. For details read the blog ‘<A href="https://blogs.sap.com/2019/02/22/improvements-of-bw4hana-analytical-engine-in-q1-2019-with-bw4hana-2.0/" target="_blank" rel="noopener noreferrer"> Improvements of BW/4HANA Analytical Engine in Q1 2019 with BW/4HANA 2.0’</A>. Those features we now brought down also to NW BW customers with NW BW 7.50 SP16. In addition, we are now with BW/4HANA 2.0 SP 4 and NW BW SP16 shipping those new features. The main driver for those innovations is the SAP Analytics Cloud integration. But a lot of features can also be used in SAP Analysis for Office&nbsp; .<BR /> <BR /> The main improvements done till first quarter of 2019 are:<BR /> <UL><BR /> <LI><STRONG>Custom Exception Aggregations on the fly</STRONG></LI><BR /> <LI><STRONG>GrandTotal and %GrandTotal in custom formula</STRONG></LI><BR /> <LI><STRONG>Allowing Restrictions on Formula</STRONG></LI><BR /> <LI><STRONG>Display of XXL attributes in INA based clients</STRONG></LI><BR /> <LI><STRONG>Currency Conversion from INA based clients</STRONG></LI><BR /> <LI><STRONG>SAC integration through BW Live Connection for chart support</STRONG><BR /> <UL><BR /> <LI><STRONG>Linked Analysis with hierarchies</STRONG></LI><BR /> <LI><STRONG>Geo Map with Choropleth</STRONG></LI><BR /> <LI><STRONG>Waterfall Chart with Delta</STRONG></LI><BR /> <LI><STRONG>Variance Chart including version and time </STRONG></LI><BR /> </UL><BR /> </LI><BR /> </UL><BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG>Let us have a glimpse on each of the topics in detail.<BR /> <BR /> &nbsp;<BR /> <BR /> <STRONG>Custom Exception Aggregation for Analysis Office and SAC on the fly</STRONG><BR /> <BR /> We already mention the custom aggregation being available for SAP Analysis for Office with the upcoming release 2.8 in the previous blog ‘<A href="https://blogs.sap.com/2019/02/22/improvements-of-bw4hana-analytical-engine-in-q1-2019-with-bw4hana-2.0/" target="_blank" rel="noopener noreferrer"> Improvements of BW/4HANA Analytical Engine in Q1 2019 with BW/4HANA 2.0’</A>.<BR /> <BR /> Now with 7.50 SP16 we brought this function also down to the NW BW customers. It will also be adopted by SAP Analytics Cloud and is planned for wave 22. As for HANA live connections one can in the calculation editor now choose custom aggregations for BW live connections. Depending on the aggregation type you have at maximum 5 dimension you can choose to where the exception aggregation acts on. This is the same as in the query designer for backend modelled exception aggregation.<BR /> <BR /> &nbsp;<BR /> <H2 id="toc-hId-929012281">GrandTotal and % GrandTotal in custom formula</H2><BR /> We also added for the custom formulas created on the fly in for Analysis for Office and SAP Analytics Cloud the calculation of GrandTotal(GT) and % GrandTotal (%GT). In Analysis for Office also other calculations like percentage of total (%CT) or query total and also totals for x or y axis are available.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/GT1.jpg" /><BR /> <BR /> This will also be supported with the upcoming Analysis for Office 2.8 release. For SAP Analytics Cloud we only support grand total and percentage grand total as in case of the HANA live connection.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/GT2.jpg" /><BR /> <BR /> In SAP Analytics Cloud the calculation editor als recognizes now the syntax and highlights the formula.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/GT3.jpg" /><BR /> <H2 id="toc-hId-732498776">Allowing Restrictions on Formula</H2><BR /> In BW we had for years the limitation that it was not possible to create restrictions on formula. Only for RKF as reusable component it was possible to define those on CKF. Then the resolve algorithm was calculating the restriction on each operand. This can be also stacked though multiple levels of reusable key figures. Now this resolve algorithm was also applied to restrictions and in query designer and customer restrictions created on the fly. With NW BW FP16 and BW/4HANA 2.0 SP 4 we can now lift this limitation.<BR /> <BR /> In addition restriction as well as formula are possible. In 7.50 SP16 one had in addition apply note <A href="https://i7p.wdf.sap.corp/sap/support/notes/0002868267" target="_blank" rel="nofollow noopener noreferrer">2868267</A> .<BR /> <H2 id="toc-hId-535985271">Display of XXL attributes in INA based clients</H2><BR /> &nbsp;<BR /> <BR /> In the staging layer of BW, it was possible since 7.50 to have XXL-attributes. However, they were never shown to the UI. The consumption layer was not adopted since the on-premise web UI showed not much interest in adoption.<BR /> <BR /> However,&nbsp; with SAP Analytics Cloud and wave 23 it is now possible also to display XXL attributes to the end consumer.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/XXL1.jpg" /><BR /> <BR /> As configuration the new SICF node GetXXLValue under path /default_host/sap/bw/ina/ needs to be activated in order to consume the underlying pictures.<BR /> <BR /> With BW4HANA 2.0 SP 2 XXL attributes can be defined as&nbsp;<EM>referencing </EM>to another content server/url outside BW. The XXL attribute must then be created as a reference to 0EXT_URL which has data type string (CLOB).<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/XXL2.jpg" /><BR /> <BR /> In addition, also routing from the BW server to the content server can be done. The XXL attribute must then &nbsp;have an entry to table <A href="https://ldcsw4d.mo.sap.corp/sap/bc/adt/ddic/tables/bw4xxlu2d/source/main?version=active&amp;version=active&amp;sap-client=000" target="_blank" rel="nofollow noopener noreferrer">BW4XXLU2D</A><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/XXL3.jpg" /><BR /> <BR /> &nbsp;<BR /> <BR /> Here for a given characteristic and XXL-attribute a&nbsp;<A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/de-DE/abenrfc_destination.htm" target="_blank" rel="noopener noreferrer">SM59 RFC-destination</A>&nbsp;must be maintained. In addition, an URI template can be specified. Here the only allowed variable is&nbsp;the value ‘<EM>chavl’</EM>. The given characteristic value of the characteristic is replaced in this URI template.&nbsp; If no URI template is set, then the content of the XXL-attribute is interpreted as URL and resolved. The resolving is done using an http client that uses the above mentioned SM59 destination. To be able to address the content server, trust relations must be maintained. This is done as usual in transaction STRUST.<BR /> <BR /> &nbsp;<BR /> <H2 id="toc-hId-339471766">Currency Conversion from INA based clients</H2><BR /> Currency conversion from UI side set and triggered was always possible on classical BW clients like Bex Web, Analysis office or Design Studio (Lumira). However, it was not possible from new clients using the INA- and not the BICS- protocol. We now also added the currency conversion to the INA protocol with NW BW 7.50 SP16 and BW/4HANA SP1. With clients like SAP Analytics Cloud from wave 18 it is now possible to also trigger currency conversion from the UI.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/CC1.jpg" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/CC2.jpg" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/CC3.jpg" /><BR /> <BR /> &nbsp;<BR /> <BR /> Or in SAP Analytics Cloud once can select it on the chart/table<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/CC4.jpg" /><BR /> <BR /> And choose the target currency and then the conversion type<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/CC5.jpg" /><BR /> <BR /> Then the result displays the amount in the new currency.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/CC6.jpg" /><BR /> <H2 id="toc-hId-142958261">SAC Chart Adoption through BW Live Connection</H2><BR /> &nbsp;<BR /> <BR /> When BW live connection was released for SAP Analytics Cloud we mainly focused on the table control. While certain charts- such as bar chart – already were usable, other chart types have very special requirements towards the backend. We therefor focused on enabling the missing chart types with BW/4HANA 2.0. Those we now also brought down with 7.50 FP16 to the NW BW code line. For details see again <A href="https://blogs.sap.com/2019/02/22/improvements-of-bw4hana-analytical-engine-in-q1-2019-with-bw4hana-2.0/" target="_blank" rel="noopener noreferrer">`Improvements of BW/4HANA Analytical Engine in Q1 2019 with BW/4HANA 2.0’</A> In addition to 2.0 scope we developed following missing links<BR /> <UL><BR /> <LI>Linked Analysis with Hierarchies</LI><BR /> <LI>Geo Map with Choropleth</LI><BR /> <LI>Waterfall Chart with Delta</LI><BR /> <LI>Variance Chart including version and time</LI><BR /> <LI>Outlook BW/4HANA 2.0 : Custom Sorting</LI><BR /> </UL><BR /> &nbsp;<BR /> <BR /> <STRONG>Linked Analysis with hierarchies</STRONG><BR /> <BR /> <STRONG>&nbsp;</STRONG><BR /> <BR /> We enabled tuple filter which arises in linked analysis when having more than one dimension in BW/4HANA 2.0. Tuple filter take the combination of characteristic values on different characteristics into account. In BW, the filter was always the cartesian product of characteristic values on different dimension. Example: Consider dimension A and B and a tuple filter (A=1 AND B=’X’) OR (A=3 AND B=’Y’)&nbsp; OR (A=1 AND B=’Z’)&nbsp; then the cartesian product filter would be ( A=1 OR&nbsp; A=3 ) AND (B=’X’ OR B=’Y’ OR B=’Z’). &nbsp;We still had limitations if those tuples contain hierarchy nodes. This we now lifted with NW BW 7.50 SP16 or BW/4HANA SP4. See the example below where we show linked analysis between two charts having hierarchical representation<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/Tuple1.jpg" /><BR /> <BR /> We marked three fields on the left-hand side (France and AUS/NRD/35 being 112.10, Germany with AUS/NRD/33 and AUS/NRD/37 being 280.25 and 224.20). On the left side the characteristic 0BC_Filed is no in the drill. So, we aggregate on this characteristic. However, since France is not part of Germany we neglect this value on the right side also. We therefore wee the sum of 280.25 + 224.2 being 504.45. This value is split up correctly between north and south part of Germany.<BR /> <BR /> We still have the limitations on leading NOT. Also, in linked analysis we will not support a source with a general advanced filter above tuple filter coming from any data source outside BW.<BR /> <H3 id="toc-hId-75527475"></H3><BR /> <H3 id="toc-hId--120986030">Geo Map with Choropleth</H3><BR /> &nbsp;<BR /> <BR /> Geo maps on BW live models except Choropleth layer were enabled with BW/4HANA 2.0. &nbsp;We now also enabled the Choropleth layer with NW BW 7.50 SP 16 and BW/4HANA FP 4.<BR /> <BR /> We recall the set of requirements we now have.<BR /> <OL><BR /> <LI>A HANA database version 1.0.122.06 onwards or release 2.0 with the uploaded Geo shapes is a prerequisite. Please follow the <A href="https://help.sap.com/viewer/cbbbfc20871e4559abfd45a78ad58c02/2.0.03/en-US/e1c934157bd14021a3b43b5822b2cbe9.html?q=HANA%25202.0%2520spatial" target="_blank" rel="noopener noreferrer">SAP HANA Spatial Reference</A> to see how to upload the shape file of the <A href="https://help.sap.com/viewer/cbbbfc20871e4559abfd45a78ad58c02/2.0.03/en-US/157d66f9154d48ff88cef35b19cc58ae.html" target="_blank" rel="noopener noreferrer">geo content.</A> This contains following steps<BR /> -Contains a world hierarchy of Regions with<BR /> -Creation of Spatial Reference System 3857.<BR /> -Import of two .tgz files</LI><BR /> <LI>Activation of Content info objects 0GSHAPE3857 and 0GEOFEATID in that order. 0GEOFEATID corresponds to Regions in the HanaDU</LI><BR /> <LI>Creation of BW hierarchy SAPBWWORLDHIERARCHY for 0GEOFEATID via report RSD_GEO_SYNC_HIER derived from world hierarchy in HanaDU.</LI><BR /> <LI>Setting the correct Geographical type (GISTP) on the characteristic. In the eclipse modeling tools or transaction RSD1 for NW BW 7.50 you find on the ‘BI Clients’ tab:<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/Geo1.jpg" /></LI><BR /> </OL><BR /> Setting the GISTO to the right value the attributes longitude and latitude are automatically added to the InfoObject. The creation of a shadow table in Hana with Hana Spatial Type is also triggered behind the scenes. Reason is this is that the DDIC Type is still missing in the ABAP Application Server.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/Geo2.jpg" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/Geo3.jpg" /><BR /> <BR /> This table is used for the HANA geo operations orchestrated by SAC. If the geographical type is already set, a reactivation of the InfoObject triggers the creation of this shadow table.<BR /> <BR /> Now you can load master data with geographical coordinates longitude and latitude in staging. In NW BW 7.50 in addition the report RSD_GEO_SYNC_ATTR has to be executed after alteration of the master data. This can be done manually but best is to use process chain and combine it with the master data load process.<BR /> <BR /> &nbsp;<BR /> <BR /> For the GISTP following values can be chosen:<BR /> <OL><BR /> <LI>Characteristic with geographic type ‘Dynamic Geographical Characteristic’ or ‘Static geo-characteristic with geo-attributes’ gain geo table with HANA spatial types upon activation is triggered.</LI><BR /> <LI>Char with geographic type ‘Dynamic Geographical Characteristic’, Dynamic geo-characteristic with values from attribute or ‘Static geo-characteristic with geo-attributes’ upon selection the 0GEOFEATID as navigation attribute (2,4) or transitive attribute should be added. This has to be done manual and is also necessary in cases the geo characteristic already exists.</LI><BR /> </OL><BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> Then you can use any query containing geo InfoObjects and a BW live model on top in SAC. You can use those models in any Geo chart and use various layers. Choropleth layer is added in NW BW 7.50 SP16 and will also be contained in the next feature pack 4 in BW/4HANA 2.0. Geo filtering as well as the within distance filter is working as in the HANA live connections. Only&nbsp; custom shape files and &nbsp;point of interests will not be supported.<BR /> <BR /> In the picture above for example we see choropleth layer with filter<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/Geo4.jpg" /><BR /> <BR /> Custom shape files are also developed and will be available on in BW/4HANA SP4. Also then HANA revision larger than HANA 2.0 45 will be required. The shapes can be uploaded where the Geo type ist set as in Design Studio and BexWeb<BR /> <H3 id="toc-hId--317499535">Waterfall Chart with Delta</H3><BR /> Waterfall chart was enabled with &nbsp;BW/4HANA 2.0 or notes <A href="https://launchpad.support.sap.com/#/notes/2688726" target="_blank" rel="noopener noreferrer">2688726</A> and <A href="https://launchpad.support.sap.com/#/notes/2734214" target="_blank" rel="noopener noreferrer">2734214</A>. However, the delta calculation did note work from the beginning. This was now also enabled with notes <A href="https://i7p.wdf.sap.corp/sap/support/notes/0002660034" target="_blank" rel="nofollow noopener noreferrer">2660034</A>, <A href="https://i7p.wdf.sap.corp/sap/support/notes/0002745245" target="_blank" rel="nofollow noopener noreferrer">274524</A>5 and 2784681.<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId--514013040">Variance Chart including version and time</H3><BR /> With note <A href="https://i7p.wdf.sap.corp/sap/support/notes/0002660034" target="_blank" rel="nofollow noopener noreferrer">2660034</A> &nbsp;we support SAC Variance Charts based on two different measures. We also added the support versions (note <A href="https://i7p.wdf.sap.corp/sap/support/notes/0002745245" target="_blank" rel="nofollow noopener noreferrer">274524</A>5 and 2784681). Only time-based variance was still missing. We faced 2 challenges. The first was that we needed to allow the usage of internal variables like current member in local formulas at a point of time where the variable submit was already done. This we achieved with the price of resubmit which we must pay anyway with restrictions on the fly.<BR /> <BR /> The second challenge was that BW has not leveled based hierarchy on time. The virtual time hierarchies are all normal parent child hierarchies. The only level-based hierarchy in BW is the universal hierarchy which spans across the whole axis and only needs all characteristics of the different level to be part of the query. For the time variance we now developed a partial drill group which is similar to the universal display hierarchy but only affects part of the characteristic of the axis. We still require of all-time dimension to be part of the query. In addition we needed to develop new current member operators ‘Parallel Value’ was introduced. This all cam in BW/4HANA with SP4 and is available in NW BW with SP17 or note 2786890 - Enabling SAC Time Variance Charts with partial Universal Display Hierarchies. This also provides the capablities `UniversalDisplayHierarchyCustomDimensions` and `INACurrentMember`. for embedded analytics this is planned for the&nbsp; 2009 release.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/CM1.jpg" height="393" width="570" /><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/09/CM2.jpg" /><BR /> <H3 id="toc-hId--710526545">Custom Sorting</H3><BR /> We also will support custom sorting on dimension members in BW/4HANA FP04 for SAC.&nbsp; This is not available for NW BW<BR /> <BR /> &nbsp; 2019-09-23T13:28:17+02:00 https://community.sap.com/t5/technology-blogs-by-members/mastering-the-different-types-of-connections-in-sap-analytics-cloud/ba-p/13410314 Mastering the different types of connections in SAP Analytics Cloud 2019-10-23T18:27:22+02:00 former_member1161 https://community.sap.com/t5/user/viewprofilepage/user-id/1161 One of the most important topics in SAP analytics Cloud is setting up the connection type.While this is one of the most basic steps when it comes to configuration there are some open questions regarding performance ,fine tuning and sizing.<BR /> <BR /> In this article I will clarify the basic ground rules that distinguish between the different types of connections and elaborate on the use case and some of the sizing aspects.<BR /> <BR /> You will also find in this article a wide range of resources that will help you gain&nbsp; knowledge and tools regarding the connection setup and capabilities .<BR /> <H2 id="toc-hId-929665509"><STRONG>Connection types</STRONG></H2><BR /> There are two main connection types in SAP Analytics Cloud&nbsp; :Live and imported<BR /> <OL><BR /> <LI><STRONG>Live connection</STRONG> - is completely based on the back end (On premise) ,there is no data replication, the data stays in the in the source system while the data model and security profile applies .Another of way to putting it is that a direct secured connection is created between the browser (Chrome &amp; Edge are the strategic browsers SAP are focusing in) to the source system while only metadata is stored in <SPAN class="hotkey-layer "><SPAN class="hotkey-layer preview-overlay is-preview-sidebar-visible">SAP Analytics Cloud.</SPAN></SPAN><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/10/Screenshot-2019-10-18-at-16.56.21.png" height="93" width="514" /><STRONG><BR /> Source :</STRONG>SAP data insightThe meta data stored is basically anything related to column names ,connection type &amp; name ,calculation or universe name and so forth ,nothing that has to do with the actual data accessed .due to the fact that data isn't transferred you won't find any sizing recommendation nor limits that comes with this type of configuration ,the usual rule of thumb will apply here :data volumes accessed in source system , network bandwidth ,type of query ,are we using optimized objects&nbsp; ,in terms of HANA : did we use best practices when building the calculation view and so on.Any performance issue you suspect is coming from <SPAN class="hotkey-layer "><SPAN class="hotkey-layer preview-overlay is-preview-sidebar-visible">SAP Analytics Cloud side will have to be supported with Google Developer tools for example to analyze the page behavior (rendering time of components for example ,web sniffer tools alike for analyzing get response but again - nothing to to with the data itself.</SPAN></SPAN></LI><BR /> <LI><STRONG>Import connection</STRONG> - this type of connection connects to the data source and in order to retrieve the data set ,data is actually imported /copied to SAP Analytics Cloud.This type of connection enables us to connect to different type of data sources that for example are nor model ready ,it also enables to enhance specific SAP Analytics Cloud capabilities such as planning and &amp; Smart assist ,the connection can be scheduled so SAC can keep a back to back data refresh with the database timestamp.</LI><BR /> </OL><BR /> Additional configuration is required for this type of connectivity :<BR /> <UL><BR /> <LI><STRONG>SAP Cloud Connector</STRONG> -manages a secured tunnel between the SAC instance to the underlying data source</LI><BR /> <LI><STRONG><SPAN class="hotkey-layer "><SPAN class="hotkey-layer preview-overlay is-preview-sidebar-visible">SAP Analytics Cloud agent </SPAN></SPAN></STRONG><SPAN class="hotkey-layer "><SPAN class="hotkey-layer preview-overlay is-preview-sidebar-visible">-manages the data retrieval requests ,e.g :connecting to queries&nbsp;</SPAN></SPAN></LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/10/diagram.jpg" height="238" width="501" /><BR /> <BR /> <STRONG>Source :</STRONG>SAP data insight<BR /> <BR /> In this diagram we can see at the left side that SAC is in the public domain area<BR /> <BR /> in the middle there is the DMZ or the demilitarized zone which basically adds an additional layer of security between the customer network to the external public network and this is a standard network layer.<BR /> <BR /> To the right we can see the customer network area :connections to various data sources are defined and the two configuration components are managing the security tunnel and the data requests.<BR /> <BR /> Depending on the data source you are connecting a standard SQL or an RFC call will be made.<BR /> <H2 id="toc-hId-733152004"><STRONG>Considerations for choosing a connection type&nbsp; </STRONG></H2><BR /> There are several factors that can determine what type of data connection should be used:<BR /> <UL><BR /> <LI><BR /> <H3 id="toc-hId-665721218"><STRONG>Particular data source</STRONG></H3><BR /> If you will have a look on the current data connections available in SAC (updated for 09/2019) you will find some differences between live to import ,for example :Google BigQuery is currently only available for import ,Ariba on the other hand is going to be available only for Live ,plan your connection strtegy according to what's compatible</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/10/Screenshot-2019-10-21-at-22.03.47.png" height="264" width="506" /><BR /> <BR /> <STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Source</STRONG> :SAP SAC roadmap<BR /> <UL><BR /> <LI><BR /> <H3 id="toc-hId-469207713"><STRONG>Connection roadmap</STRONG></H3><BR /> SAP are currently providing lot's of new connections to their cloud systems such as Ariba ,SuccessFactors and there are lot to come such as <SPAN class="hotkey-layer "><SPAN class="hotkey-layer preview-overlay is-preview-sidebar-visible">Concur</SPAN></SPAN>,Fieldglass.In general there lot's of progress and it's important to follow the roadmap for the connections as well ,again updated per the last roadmap version:</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/10/Screenshot-2019-10-21-at-22.14.10.png" height="281" width="531" /><BR /> <BR /> <STRONG>Source</STRONG> :SAP SAC roadmap<BR /> <BR /> In addition to the current connection roadmap SAP are providing SAC light embedded version (no planning or predictive capabilities) for most of their cloud systems and it's important to have take a look on that roadmap as well as it's adding more connected systems only through the embedded offering :<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/10/Screenshot-2019-10-21-at-22.24.27.png" /><BR /> <BR /> <STRONG>Source</STRONG> :SAP SAC roadamap for applications integration with SAC<BR /> <UL><BR /> <LI><BR /> <H3 id="toc-hId-272694208"><STRONG>Sizing</STRONG></H3><BR /> While in Live connections there are no known sizing limits other then the data source platform sizing limits ,when it comes to import connection there are specific sizing limits :</LI><BR /> </UL><BR /> <DIV><BR /> <P class="p" style="margin-left: 18.0pt"><STRONG>File size limits</STRONG></P><BR /> <P class="li" style="margin-left: 18.0pt">Microsoft Excel (XLSX only): Maximum file size: 200 MB. No limit on number of rows.Comma-separated values files (CSV): Maximum file size: 2 GB. No limit on number of rows.</P><BR /> <P class="p"><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Row limits</STRONG></P><BR /> <P class="li" style="margin-left: 18.0pt">Datasources: 800,000 (when importing from CSV and XLSX files, there is a limit on file size, but not on the number of rows)</P><BR /> <P class="p" style="margin-left: 18.0pt"><STRONG>General limits</STRONG></P><BR /> <P class="li" style="margin-left: 18.0pt">Columns: 100</P><BR /> <P class="li" style="margin-left: 18.0pt">Dimension members:</P><BR /> <P class="li" style="margin-left: 18.0pt">Planning models: 1,000,000</P><BR /> <P class="li" style="margin-left: 18.0pt">Analytic models: if there are more than 1,000,000 unique members, the dimension will be made read-only</P><BR /> <P class="li" style="margin-left: 18.0pt">Dimension members with Geo enrichment: 200,000</P><BR /> <P class="li" style="margin-left: 18.0pt">Dimension members with parent/child hierarchy: 150,000 (for other kinds of attributes, the 1,000,000 limit applies)</P><BR /> <BR /> <UL><BR /> <LI class="p subsectiontitle"><BR /> <H3 id="toc-hId-76180703"><STRONG>Data model maturity&nbsp; </STRONG></H3><BR /> Live connection enables you to connect to an existing data source without moving the data -that scenario works well with a data model which is ready for analysis and doesn't require further actions <STRONG>,</STRONG>on the other hand if you need to connect to various data sources and then connect them and create the data model in SAP Analytics the import option might be a better match for that particular scenario.one simple example would be BEX queries that already contain the structure ,key figures and the business logic and we just want to consume those queries as is ,a flat file on the other hand can be loaded and analyzed<BR /> <STRONG><BR /> </STRONG></LI><BR /> <LI><BR /> <H3 id="toc-hId--120332802"><STRONG>Use case and scenario</STRONG></H3><BR /> What kind of use case is required to access the data? combing structured &amp; unstructured data sources? using a DW model with S/4 data Also for some use cases SAP has already recommendations or a set of best practices for example the BW live will enable you among other thing to access BW and HANA features that cannot accessed through standard query interfaces (SQL, MDX).SAC main analytics approach is to enable hybrid scenarios and that should be another consideration as SAC is about bridging cloud and on premise scenarios</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/10/Screenshot-2019-10-22-at-23.07.03.png" height="244" width="522" /><BR /> <BR /> &nbsp;<BR /> <BR /> </DIV><BR /> &nbsp;<BR /> <DIV><BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> </DIV><BR /> <STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Source</STRONG> :SAP Hybrid approach for analytics<BR /> <DIV><BR /> <UL><BR /> <LI><BR /> <H3 id="toc-hId--316846307"><STRONG>Functionality<BR /> </STRONG></H3><BR /> in terms of functionality their are differences as well between the connection types and in between -the type of data source as well ,for example having a look on the following matrix will help us realize what kind of data source and connection type compatible for tables:</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/10/charts.jpg" height="193" width="478" /><BR /> <BR /> </DIV><BR /> <STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Source</STRONG> :SAP Analytics Cloud Support Matrix<BR /> <BR /> that would be another best practice to go through the functionality matrix and check what's exactly is supported<BR /> <DIV><BR /> <UL><BR /> <LI><BR /> <H3 id="toc-hId--513359812"><STRONG>Security approach and data restrictions</STRONG></H3><BR /> When you use live connection you fully enhance the security model that you implemented in your data source level ,that's for itself is a major factor as there is no investment in rebuilding the security structure.aside to that we can find the security policy of any organization or a company that restricts secured data movement and drives data compliance.In that sense live connection is the more restrictive due to it's respective security model and no data movement outside the client domain.still SAP offers a variety of secured solutions for their data centers hosting SAC instances including fully GDPR complaint.Taking the main statement from the<A href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=4&amp;ved=2ahUKEwiYlp667bDlAhUjQUEAHUvTBHAQFjADegQIAxAC&amp;url=https%3A%2F%2Fwww.sapanalytics.cloud%2Fwp-content%2Fuploads%2F2018%2F09%2FSAP-Analytics-Cloud-Hybrid-Implementation-Best-Practices.pdf&amp;usg=AOvVaw3dg3T_wVzcE2qo98ymTeaj" target="_blank" rel="nofollow noopener noreferrer"><STRONG> Hybrid Implementation Best-Practice Recommendations</STRONG></A> in page 23 SAP are managing all the security protocols to keep your data safe:</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/10/Screenshot-2019-10-22-at-22.57.56.png" /><BR /> <BR /> <STRONG>Source:</STRONG>Hybrid implementation best practices recommendations<BR /> <BR /> </DIV><BR /> <H2 id="toc-hId--838956036">Resources</H2><BR /> There is a tremendous list of resources available in the SAP echo system of websites and blogs ,here are the main ones which is relevant and critical for data connections:<BR /> <BR /> <STRONG>SAP Analytics Cloud Connectivity Guidelines:</STRONG>provides in depth details for all the connection types :<BR /> <BR /> <A href="https://wiki.scn.sap.com/wiki/display/BOC/SAP+Analytics+Cloud+Connectivity+Guidelines" target="_blank" rel="noopener noreferrer">&nbsp;https://wiki.scn.sap.com/wiki/display/BOC/SAP+Analytics+Cloud+Connectivity+Guidelines</A><BR /> <P class="hero-title ng-binding" dir="ltr"><STRONG>SAP Analytics Cloud Connection Guide:</STRONG>SAP Help guide and configuration for each connection type <STRONG><BR /> </STRONG></P><BR /> <A href="https://help.sap.com/viewer/00f68c2e08b941f081002fd3691d86a7/release/en-US/bdf055159cbb4f36b26c93ccb0c56066.html" target="_blank" rel="noopener noreferrer">https://help.sap.com/viewer/00f68c2e08b941f081002fd3691d86a7/release/en-US/bdf055159cbb4f36b26c93ccb0c56066.html</A><BR /> <P id="title-heading" class="pagetitle with-breadcrumbs"><SPAN id="title-text" class="with-breadcrumbs"></SPAN><STRONG>SAP Analytics Cloud - Live Connection and Security - Best Practices:</STRONG></P><BR /> <A href="https://wiki.scn.sap.com/wiki/display/BOC/SAP+Analytics+Cloud+-+Live+Connection+and+Security+-+Best+Practices" target="_blank" rel="noopener noreferrer">https://wiki.scn.sap.com/wiki/display/BOC/SAP+Analytics+Cloud+-+Live+Connection+and+Security+-+Best+Practices</A><BR /> <BR /> <STRONG>SAP Analytics Cloud Support Matrix -</STRONG>provides a deep dive into the supported functionality per connection type:<STRONG><BR /> </STRONG><BR /> <BR /> <A href="https://wiki.scn.sap.com/wiki/display/BOC/SAP+Analytics+Cloud+Support+Matrix" target="_blank" rel="noopener noreferrer">https://wiki.scn.sap.com/wiki/display/BOC/SAP+Analytics+Cloud+Support+Matrix</A><BR /> <BR /> <STRONG>Product roadmap</STRONG> -stay on track regarding new supported connections and new functionality supported per connection type:<BR /> <BR /> <A href="https://www.sap.com/products/roadmaps" target="_blank" rel="noopener noreferrer">https://www.sap.com/products/roadmaps</A><BR /> <BR /> SAP data centers security capabilities:<BR /> <BR /> <A href="https://www.sap.com/uk/about/trust-center.html" target="_blank" rel="noopener noreferrer">https://www.sap.com/uk/about/trust-center.html</A><BR /> <H2 id="toc-hId--688215184">Conclusion</H2><BR /> In this article we explored the main two connection types ,their basic architecture and what use cases are mostly suited to each one.<BR /> <BR /> In addition we described the main factors that effects the connection type use case and what considerations we require to evaluate when establishing a connection in SAC.<BR /> <BR /> Hope you find this article helpful and I encourage you to leave comments ,ask questions and continue the discussion 2019-10-23T18:27:22+02:00 https://community.sap.com/t5/technology-blogs-by-sap/sap-analytics-cloud-blending-information-example/ba-p/13432763 SAP Analytics Cloud – Blending information - Example 2019-11-06T20:53:25+01:00 IngoH https://community.sap.com/t5/user/viewprofilepage/user-id/150260 In the previous articles we configured the setup for being able to use the blending capabilities of SAP Analytics Cloud. So now, lets put this to work.<BR /> <BR /> In our Example, we have a BW Query, which will return a set of measures by Customer or Product as shown below.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_004.jpg" /><BR /> <BR /> We also have a Excel spreadsheet with values by customer ID<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_005.jpg" /><BR /> <BR /> In SAP Analytics Cloud we do have the model based on the SAP BW Query, so we can start building our Story with the first table showing the results from our BW Query as shown above.<BR /> <BR /> We then use the "Data" option in the toolbar...<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_006.jpg" /><BR /> <BR /> ... and we list the data sources and we can then use the option to add a new data set to our story.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_007.jpg" /><BR /> <BR /> We then have the option to upload our Excel spreadsheet.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_008.jpg" /><BR /> <BR /> After the data is loaded we are presented with the raw information and we can configure our Dimensions and measures and then navigate back to our Story.<BR /> <BR /> Now we have two data sets in our story and we need to setup the Linked Dimensions.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_009.jpg" /><BR /> <BR /> In the Linked Dimension configuration we can now define, how our two data sources are going to be joined.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_010.jpg" /><BR /> <BR /> In our example we see the dimensions from the BW Query on the left hand side and the columns from the Excel spreadsheet on the right hand side.<BR /> <BR /> &nbsp;<BR /> <BR /> We select dimension Sold-to-Party from the BW Query and then we make sure that the linking will be done using the ID.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_011.jpg" /><BR /> <BR /> We then select the Customer ID from the Excel spreadsheet. You can also look at some sample data for each of the data sources, which comes in very helpful.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_012.jpg" /><BR /> <BR /> In our example we are using the dimension Sold-to-Party, which is a dimension type CHAR with a conversion routine in SAP BW. When looking at the sample data....<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_013.jpg" /><BR /> <BR /> ... we can see that SAP Analytics Cloud is not using the Key value for the linking, but instead uses the internal key value - which in this example comes with leading zeros for the full length of the dimension definition.<BR /> <BR /> <EM>Please note, that the linking of the values is done on the internal key values in case of the BW Live connection, not the key value that you are seeing displayed in the table.</EM><BR /> <BR /> As of now (November 2019) you don't have the option to choose between the different key values, nor do you have the option to create a formula on top of the value (for example to remove the zeros), so in our example we have to add the leading zeros to the customer number in our Excel spreadsheet.<BR /> <BR /> In our example I included a second column with the adjusted Customer ID value, so I will use that for the linking.<BR /> <BR /> After the linking has been defined I am navigating back to the table and open the builder panel.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_014.jpg" /><BR /> <BR /> Click on the option "Add Linked Models" and select the model based on the Excel spreadsheet.<BR /> <BR /> After doing so, I can navigate to the columns part of the table in the Builder Panel and I am offered both models for selecting measures.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_015.jpg" /><BR /> <BR /> .. and my table then shows measures from both data sources.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_016.jpg" /><BR /> <BR /> &nbsp;<BR /> <BR /> Another important configuration as part of the blending, is the ability to choose the join type. When you navigate back to the Builder Panel, you can navigate to your linked model and configure the Link Type and the active linked dimensions.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/blending_017.jpg" /><BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> Happy Blending ...<BR /> <BR /> &nbsp;<BR /> <BR /> <A href="https://blogs.sap.com/2019/11/05/sap-analytics-cloud-blending-information-part-1/" target="_blank" rel="noopener noreferrer">SAP Analytics Cloud – Blending information (Part 1)</A><BR /> <BR /> <A href="https://blogs.sap.com/2019/11/05/sap-analytics-cloud-blending-information-part-2/" target="_blank" rel="noopener noreferrer">SAP Analytics Cloud – Blending information (Part 2)</A><BR /> <BR /> <A href="https://blogs.sap.com/2019/11/05/sap-analytics-cloud-blending-information-part-3/" target="_blank" rel="noopener noreferrer">SAP Analytics Cloud – Blending information (Part 3)</A><BR /> <BR /> <A href="https://blogs.sap.com/2019/11/06/sap-analytics-cloud-blending-information-example/" target="_blank" rel="noopener noreferrer">SAP Analytics Cloud - Blending Example</A><BR /> <BR /> &nbsp; 2019-11-06T20:53:25+01:00 https://community.sap.com/t5/technology-blogs-by-sap/smart-queries-for-sap-analytics-cloud-with-bw-live-connection/ba-p/13443234 Smart Queries for SAP Analytics Cloud with BW Live Connection 2019-11-13T21:10:52+01:00 IngoH https://community.sap.com/t5/user/viewprofilepage/user-id/150260 One important aspect of the integration of SAP Analytics Cloud and SAP BW / BW4HANA is always the topic performance. With wave 19 we released a new feature especially for the BW Live connectivity. Officially the feature is called "Query Merging", but I thought "Smart Query" sounds far better...<BR /> <BR /> Lets assume a very simple case:<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/BW_TWO_STRUCTURE_007.jpg" /><BR /> <BR /> In our example, we have three charts displaying:<BR /> <UL><BR /> <LI>Net Value by Product (Top 10)</LI><BR /> <LI>Costs by Product (Top 10)</LI><BR /> <LI>Net Value by Region (Top 10)</LI><BR /> </UL><BR /> Without doing anything, this would result in three queries towards the SAP BW system.<BR /> <BR /> Now with the new option of query merging, we can reduce the amount of queries.<BR /> <BR /> First I open the Query Settings as part of my story...<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/BW_TWO_STRUCTURE_008.jpg" /><BR /> <BR /> .. and I then enable both options:<BR /> <UL><BR /> <LI>Enable Query Merge</LI><BR /> <LI>Visualize Query Merge</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/BW_TWO_STRUCTURE_009.jpg" /><BR /> <BR /> .. and then i refresh my story.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/BW_TWO_STRUCTURE_010.jpg" /><BR /> <BR /> All three charts are shown with a different color and there is a small comment in the bottom right corner for each chart, showing with with data request the data was retrieved. In my given example we still have three data requests - so we didn't improve.<BR /> <BR /> Why ?<BR /> <BR /> So lets look at the pre-requisites:<BR /> <UL id="loio697b09ba2a984ab6997eac94efe8d043__ul_cm3_tbt_53b" class="ul"><BR /> <LI class="li"><BR /> <P class="p">Queries contain the same dimensions with the same hierarchies and drill.</P><BR /> </LI><BR /> <LI class="li"><BR /> <P class="p">Queries use the same sorting and ranking.</P><BR /> </LI><BR /> <LI class="li"><BR /> <P class="p">Queries do not have an active threshold with threshold filters.</P><BR /> </LI><BR /> <LI class="li"><BR /> <P class="p">The widget does not have a local filter on a dimension that is also used in a restriction in SAP BW.</P><BR /> </LI><BR /> <LI class="li"><BR /> <P class="p">Queries are part of the same receiver group if they use linked analysis.</P><BR /> </LI><BR /> <LI class="li"><BR /> <P class="p">There is no widget filter on a secondary structure query.</P><BR /> </LI><BR /> <LI class="li"><BR /> <P class="p">The widget filter is not defined as complex tuple or range filter.</P><BR /> </LI><BR /> <LI class="li"><BR /> <P class="p">Presentation types are the same.</P><BR /> </LI><BR /> </UL><BR /> So in our example the second rule is why our three charts are not being merged, because we are using three different sets of ranking rules.<BR /> <BR /> &nbsp;<BR /> <BR /> So lets remove the ranking from all our three charts.....<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/11/BW_TWO_STRUCTURE_011.jpg" /><BR /> <BR /> .... and we can see that the two charts that share the dimension are now part of the same data request, so instead of 3 requests we now are only using 2 requests.<BR /> <BR /> When looking at this simple example the impact might not be so obvious, so lets put this into a perspective.<BR /> <BR /> Lets assume we have a SAP Analytics Cloud Story with a total of 6 widgets and instead of running 6 data requests, we would be running 2 data requests with the Query Merging capability enabled.<BR /> <BR /> Lets also assume that the SAP Analytics Cloud Story is being viewed by 100 people each morning.<BR /> <BR /> &nbsp;<BR /> <BR /> Our old scenario:<BR /> <P style="padding-left: 40px">100 Users x 6 requests = 600 requests</P><BR /> &nbsp;<BR /> <BR /> New scenario with Query Merging:<BR /> <P style="padding-left: 40px">100 Users x 2 requests = 200 requests</P><BR /> &nbsp;<BR /> <BR /> I am sure your BW Administrator would appreciate this and your end users will as well ...<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> <A href="https://help.sap.com/doc/00f68c2e08b941f081002fd3691d86a7/2019.20/en-US/697b09ba2a984ab6997eac94efe8d043.html" target="_blank" rel="noopener noreferrer">Merging SAP BW Queries Documentation</A> 2019-11-13T21:10:52+01:00 https://community.sap.com/t5/technology-blogs-by-members/configuration-of-fiori-analytical-app-using-sap-smart-business-kpi-modeller/ba-p/13453803 Configuration of FIORI Analytical App using SAP Smart Business KPI Modeller 2019-12-13T06:08:12+01:00 rpatra https://community.sap.com/t5/user/viewprofilepage/user-id/340759 Hi Readers,<BR /> <BR /> First of all, thank you very much for reading this blog. I hope it will be helpful for you.<BR /> <BR /> In this blog, I am going to discuss the steps to create your first FIORI analytical app using SAP Smart Business KPI Modeller.<BR /> <BR /> Before going to start let's understand what is FIORI Analytical App.<BR /> <BR /> <SPAN style="color: #0000ff"><STRONG>What is FIORI Analytical App?</STRONG></SPAN><BR /> <BR /> Analytical apps are used to provide role-based real-time information about business operations. Analytical apps integrate the power of SAP HANA with SAP business suite. It provides real-time information from a large volume of data in the front-end web browsers.<BR /> <BR /> Using Analytical apps, you can closely monitor Key Performance Indicators KPIs. You can perform complex aggregations and calculations of your business operations and react immediately as per the changes in the market condition.<BR /> <BR /> SAP Fiori Analytical apps run on SAP HANA database and use Virtual data models.<BR /> <BR /> There are two types of Analytical Apps −<BR /> <UL class="list"><BR /> <LI>SMART Business</LI><BR /> <LI>Virtual Data Models</LI><BR /> </UL><BR /> <SPAN style="color: #000000"><STRONG>SMART Business</STRONG></SPAN><BR /> <BR /> SAP Fiori smart business apps are used to monitor your most important KPIs in real-time and to make changes as per market conditions immediately.<BR /> <BR /> <STRONG>Note</STRONG> − There are around 84 Analytical apps under this umbrella and out of these, you have 69 apps are smart business apps and rest 15 are Analytical Apps.<BR /> <BR /> <SPAN style="color: #0000ff"><STRONG>What is a KPI Modeler?</STRONG></SPAN><BR /> <BR /> It is a tool used to model KPI and report tiles for monitoring the business data using Fiori Launchpad. You can define KPIs and reports to which you can apply different calculations and it enables you to make adjustments according to changing market conditions.&nbsp;You can configure drill-down views.<BR /> <BR /> SAP HANA Live provides exceptional capability analytics for all business suite by enabling industry-standard access to SAP data through data models.<BR /> <BR /> The data models are used for analytical purposes using views in the HANA database. The views from a virtual data model that a customer and partner can reuse.<BR /> <BR /> Now, let's see the steps to follow to create a new KPI Report for any of your business processes.<BR /> <BR /> <STRONG>1</STRONG>. Open your Fiori Launchpad, you will see <STRONG>KPI Modeller Tiles</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/1-45.png" /><BR /> <BR /> <STRONG>2</STRONG>. Click on the <STRONG>Create KPI Tile</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/2-61.png" /><BR /> <BR /> <STRONG>3. </STRONG>You should enter <STRONG>Title</STRONG>, <STRONG>Description</STRONG>, Choose<STRONG> Goal Type</STRONG> from options Maximizing, Minimizing or Range<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/3-29.png" /><BR /> <BR /> <STRONG>4</STRONG>: You should select <STRONG>SAP HANA View</STRONG> from the Value Help<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/4-18.png" /><BR /> <BR /> <STRONG>5</STRONG>. Select the <STRONG>HANA View</STRONG> and then search for <STRONG>OData Service</STRONG> from OData Service Value help.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/5-18.png" /><BR /> <BR /> <STRONG>6</STRONG>. Now, select the respective <STRONG>OData Service</STRONG> and respective <STRONG>Entity Set</STRONG>.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/6-30.png" /><BR /> <BR /> 7: Now, Search for <STRONG>Value</STRONG> <STRONG>Measure</STRONG> from Measure Value help.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/7-16.png" /><BR /> <BR /> <STRONG>8</STRONG>. Click on <STRONG>Activate</STRONG> <STRONG>and</STRONG> <STRONG>Add Evaluation</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/8-18.png" /><BR /> <BR /> 9. Once clicked on <STRONG>Activate and Add Evaluation</STRONG>, the Add Evaluation page opens up. On this page some of the fields are prefilled. This data is fetched from KPI.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/9-11.png" /><BR /> <BR /> <STRONG>10</STRONG>. Select a few<STRONG> Additional Measures</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/10-17.png" /><BR /> <BR /> <STRONG>11: </STRONG>Now, Select <STRONG>optional Filters</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/11-10.png" /><BR /> <BR /> <STRONG>12:&nbsp;</STRONG>Select <STRONG>Value Type</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/12-9.png" /><BR /> <BR /> <STRONG>13: </STRONG>You can also Enter <STRONG>Target</STRONG>, <STRONG>Threshold,</STRONG> and <STRONG>Trend </STRONG>if required<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/13-10.png" /><BR /> <BR /> <STRONG>14: </STRONG>Now, click on <STRONG>Activate and Configure Tile</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/14-6.png" /><BR /> <BR /> <STRONG>15:&nbsp;</STRONG>Once you clicked on <STRONG>Add Tile</STRONG>, <STRONG>Add Tile page</STRONG> opens up, you can choose any tile type as per your requirement.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/15-4.png" /><BR /> <BR /> <STRONG>16:&nbsp;</STRONG>After clicking on <STRONG>Save</STRONG> <STRONG>and&nbsp;Configure Drill Down</STRONG>, the Drill-Down Configuration Details page will come up.<BR /> <BR /> Now, you have to select an Evaluation and click on Configure Button.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/16-7.png" /><BR /> <BR /> <STRONG>17:</STRONG> Now, select <STRONG>Measures</STRONG> and <STRONG>Dimensions</STRONG>.<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/17-5.png" /><BR /> <BR /> <STRONG>18</STRONG>: You can select the <STRONG>Visualization Type </STRONG>and <STRONG>Save View</STRONG><BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/18-3.png" /><BR /> <BR /> <STRONG>19:&nbsp;</STRONG>Save the new Configuration<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/19-4.png" /><BR /> <BR /> <STRONG>&nbsp;20:</STRONG> Now, you can go to <STRONG>Tile Catalog</STRONG> in <STRONG>Fiori Launchpad</STRONG> and search for the KPI Tile that was created and Add Tile to Group by Clicking on ‘+’ icon<BR /> <BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2019/12/20-4.png" /><BR /> <BR /> That's it!!! Your new KPI report will be available on your Fiori Launchpad.<BR /> <BR /> &nbsp;<BR /> <BR /> Thanks &amp; Regards,<BR /> <BR /> Rahul Patra 2019-12-13T06:08:12+01:00 https://community.sap.com/t5/technology-blogs-by-sap/asug-bi-and-dw-upcoming-influence-councils/ba-p/13428562 ASUG BI and DW Upcoming Influence Councils 2020-01-20T18:26:09+01:00 IngoH https://community.sap.com/t5/user/viewprofilepage/user-id/150260 Some of you might already be aware what ASUG Influence Councils are and some of you might be new to the topic.<BR /> <BR /> An ASUG Influence Council is basically your opportunity to "make your voice heard" and present any requirements and suggestions to the product team from SAP. In addition, you are not doing this just by yourself, but instead you are combining your voice with several other customers together, which then provides it an even stronger voice.<BR /> <BR /> &nbsp;<BR /> <BR /> In case you are interested to join some of these Influence Council, I highly recommend that you join these public calls to hear more about the scope and what type of profile the product team is looking for.<BR /> <BR /> &nbsp;<BR /> <BR /> <A href="https://www.asug.com/events/data-warehouse-cloud-influence-council" target="_blank" rel="nofollow noopener noreferrer">February 03 - Data Warehouse Cloud Influence Council 2020 Launch</A><BR /> <BR /> <A href="https://www.asug.com/events/enterprise-data-warehouse-influence-council" target="_blank" rel="nofollow noopener noreferrer">February 11 - Enterprise Data Warehouse Influence Council 2020 Launch</A><BR /> <BR /> <A href="https://www.asug.com/events/business-intelligence-platform-influence-council" target="_blank" rel="nofollow noopener noreferrer">February 20 - SAP BusinessObjects BI Platform Influence Council 2020 Launch</A><BR /> <BR /> <A href="https://www.asug.com/events/sap-businessobjects-web-intelligence-2020-launch" target="_blank" rel="nofollow noopener noreferrer">February 24 - SAP BusinessObjects Web Intelligence 2020 Launch</A><BR /> <BR /> <A href="https://www.asug.com/events/sap-analytics-cloud-integration-with-bw-influence-council-2020-launch-1" target="_blank" rel="nofollow noopener noreferrer">February 24 - SAP Analytics Cloud Integration with BW Influence Council 2020 Launch</A><BR /> <BR /> <A href="https://www.asug.com/events/sap-analysis-for-microsoft-office-influence-council" target="_blank" rel="nofollow noopener noreferrer">March 12 - SAP Analysis for Microsoft Office Influence Council 2020 Launch</A><BR /> <BR /> <A href="https://www.asug.com/events/mobile-analytics-influence-council" target="_blank" rel="nofollow noopener noreferrer">March 16 - Mobile Analytics Influence Council 2020 Launch</A> 2020-01-20T18:26:09+01:00 https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/s-4hana-analytics-bw-queries-with-or-without-bw-modeling-comparison/ba-p/13438412 S/4HANA Analytics: BW queries with or without BW modeling (comparison) 2020-05-06T15:42:03+02:00 dmitry_kuznetsov1 https://community.sap.com/t5/user/viewprofilepage/user-id/183443 Since I am a proponent of using BW queries even directly in S/4HANA Embedded Analytics, I have done some research whether stirring BW objects into the picture has any major down-sides.<BR /> <BR /> There are two major scenarios of virtual data consumption in BW:<BR /> <UL><BR /> <LI>A BW Query directly on a CDS view with <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/15206">@analytics</a>.dataCategory: #CUBE. I will call it CDS scenario further in the text.</LI><BR /> <LI>A BW Query on a Composite Provider that has an OpenODS that is based on DataSource that is based on CDS (mentioned above). I will call it HCPR scenario.</LI><BR /> </UL><BR /> We all realize that CDS-scenario is much simpler, robust, extendable, easier to support and so on. But... we have some BW fans amongst us that would maybe like to union the live data with something else like benchmarks, external system data, etc., so we have certainly valid reasons for HCPR scenario.<BR /> <BR /> Before we start doing any modeling, let us just measure if there is a penalty of using the triple-sandwich of BW objects. For the sake of real head-to-head comparison let us eliminate various factors that may influence performance like network time (if we have separate instances), additional data union operations, etc. I take just a plain and simple example of standard BW technical content consumed in two different ways. (Don't blame me for using BW technical content here, it is written in the same ABAP CDS nowadays and works in exact same fashion as S/4HANA CDS views).<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/overview.png" /></P><BR /> So, here we go, 2 queries with exact same set of fields built on top of CDS-view directly on one end and HCPR on the other.<BR /> <BR /> I execute (yes, in RSRT) three very basic tests:<BR /> <UL><BR /> <LI>Very aggregaed, i.e. just Key Figures and nothing in drill-down</LI><BR /> <LI>Slightly aggregated, i.e. just an Object is in drill-down</LI><BR /> <LI>Full details, i.e. all 10 characteristics are in rows</LI><BR /> </UL><BR /> In addition, I execute it on two very different data-sets, 1 being 20k records, the other – 1,6 mil (filtered to 0,4 mil in Query), so we see if there is growth related to data-volume.<BR /> <BR /> &nbsp;<BR /> <TABLE style="height: 782px" width="937"><BR /> <TBODY><BR /> <TR style="height: 42px"><BR /> <TD style="width: 127px;height: 42px" width="127">Scenario</TD><BR /> <TD style="width: 334px;height: 42px" width="348">Small data-set</TD><BR /> <TD style="width: 176px;height: 42px" width="184">Observation</TD><BR /> <TD style="width: 233px;height: 42px" width="184">Big data-set</TD><BR /> <TD style="width: 53px;height: 42px" width="95">Observation</TD><BR /> </TR><BR /> <TR style="height: 257px"><BR /> <TD style="width: 127px;height: 257px" width="127">Very aggregated</TD><BR /> <TD style="width: 334px;height: 257px" width="348"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/01.png" /></TD><BR /> <TD style="width: 176px;height: 257px" width="184"><BR /> <BR /> Nothing major, but Data Manager seems taking +45% more time in HCPR case<BR /> <BR /> &nbsp;<BR /> <BR /> HCPR also implies query regeneration even though I generated it before execution (1/10<SUP>th</SUP> of a second)</TD><BR /> <TD style="width: 233px;height: 257px" width="184"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/04.png" /></TD><BR /> <TD style="width: 53px;height: 257px" width="95">No major impact</TD><BR /> </TR><BR /> <TR style="height: 246px"><BR /> <TD style="width: 127px;height: 246px" width="127">Slightly aggregated</TD><BR /> <TD style="width: 334px;height: 246px" width="348"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/02.png" /></TD><BR /> <TD style="width: 176px;height: 246px" width="184"><BR /> <BR /> Nothing major, but Data Manager seems taking +25% more time and<BR /> <BR /> OLAP Data Transfer +70% more time in HCPR case<BR /> <BR /> &nbsp;<BR /> <BR /> HCPR also implies query regeneration even though I generated it before execution (1/10<SUP>th</SUP> of a second)</TD><BR /> <TD style="width: 233px;height: 246px" width="184"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/05.png" /></TD><BR /> <TD style="width: 53px;height: 246px" width="95">No major impact</TD><BR /> </TR><BR /> <TR style="height: 237px"><BR /> <TD style="width: 127px;height: 237px" width="127">Full details</TD><BR /> <TD style="width: 334px;height: 237px" width="348"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/03.png" /></TD><BR /> <TD style="width: 176px;height: 237px" width="184"><BR /> <BR /> OLAP Data Transfer +8%<BR /> <BR /> Data Manager +6%</TD><BR /> <TD style="width: 233px;height: 237px" width="184"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/06.png" /></TD><BR /> <TD style="width: 53px;height: 237px" width="95">The cumulative effect of DM and OLAP in HCPR case is +20 seconds (15% increase), which is a significant penalty</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> &nbsp;<BR /> <BR /> * a small remark that I am doing it on a system where there are 1,6 mil records<BR /> <BR /> So, to draw a conclusion – I’ve never noticed HCPR-based solution taking over the CDS<BR /> <BR /> There seems to be insignificant penalty for using HCPR in aggregated data-sets, so it is a viable way forward from performance point of view. For bigger, more detailed queries I would do the exact measurement and see if user-expectations will be met.<BR /> <BR /> If you would like to reproduce the same scenario, you may grab a BW system and work with Technical Content, e.g. OLAP statistics CDS views. I used RV_C_OlapStatACube 2020-05-06T15:42:03+02:00 https://community.sap.com/t5/technology-blogs-by-members/getting-bex-query-id-in-customer-exit-for-authorization-variables/ba-p/13439125 Getting BEx query ID in customer exit for authorization variables 2020-05-29T17:30:36+02:00 gdey_geminius https://community.sap.com/t5/user/viewprofilepage/user-id/13422 <H2 id="toc-hId-931778780">Introduction:</H2><BR /> The importing parameter "I_S_RKB1D"(query attribute) is not getting filled for authorization variable(I_STEP=0) in the FM "<STRONG>EXIT_SAPLRRS0_001"(FM for customer exit variable). </STRONG>Recently I have faced this issue in our system and came up with a workaround and thought to share it so that it will be helpful for someone who is having the same issues.<BR /> <H2 id="toc-hId-735265275"><STRONG>Problem Statement:</STRONG></H2><BR /> In customer exit/BAdI for BEx Variable, we often have requirements to get the query related attributes (e.g., ID of the query) so that we can mold our code accordingly. We already have an importing parameter(I_S_RKB1D in case of customer exit) for the query attributes in the FM/Class of the Customer exit/BAdI respectively.<STRONG> The importing parameter works fine for customer exit variables for I_STEP=1 and 2(work fine in the sense, the query id is filled in the imparting parameter). However, for authorization variables(that is when the value of I_STEP is 0), the values are not filled in the query attributes and remain blank.&nbsp;</STRONG><BR /> <BR /> Below screenshot for reference. We can see the variable "I_VNAM" which have the value for authorization variable name, "I_STEP" which have the value "0" which is for authorization check. We can see the value of the variable "I_S_RKB1D-COMPID" is empty, which should have the value of the query being run.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/FM-3.png" /><BR /> <BR /> <STRONG>(The above screenshot is from the function module "EXIT_SAPLRRS0_001" which belongs to the customer exit "RSR00001"-BI: Enhancements for Global Variables in Reporting).</STRONG><BR /> <BR /> We can see in the below screenshot, the value of I_STEP is "2" and the query id is populated successfully in the variable "I_S_RKB1D-COMPID".<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/FM2-1.png" /><BR /> <BR /> So, to summarize the issue, the query ID is not getting populated for Authorization Variable (I_STEP=0) but, it is working fine for the customer exit variable(I_STEP =1 or 2).<BR /> <H2 id="toc-hId-538751770">Proposed Solution:</H2><BR /> There is a standard class "CL_RSBOLAP_SELECTION_OBJECT" which is responsible for calling the customer exit/BAdI for authorization/customer exit variable of BEx. The class has an attribute "IF_RSBOLAP_MD_SELECTOR~N_S_COMPKEY" which stores the query attributes of the query which is being run.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/FM3.png" /><BR /> <BR /> So, we can take the help of the "static attribute" of Object-Oriented Programing. We will create a custom class and create a static attribute in the class for the query id. We set the value of query attribute from this class using a "Pre-exit" in the method. Then inside the customer exit/BAdI, we can use our custom class to get the query Id.<BR /> <BR /> Those who are new to Object-Oriented programming, static attributes are the attributes of the class which are not associated with the object of the class directly and exists on per class basis. Which means, there will be only one instance of the attribute for one class and these attribute can be accessed without creating the object of the class. For more information, please refer to the below link.<BR /> <BR /> <A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapclass-data.htm" target="_blank" rel="noopener noreferrer">https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapclass-data.htm</A><BR /> <BR /> As mentioned already, we will be creating a pre-exit in the class of the method. Pre-exit is nothing but the enhancement technique, where we can associate our code to the class which will be called automatically by the system whenever that particular method is called anywhere. As this is the pre-exit, so our code will be called followed by the code of the standard method. For more information, please refer to the below link<BR /> <BR /> <A href="https://wiki.scn.sap.com/wiki/display/ABAP/Enhancement+Framework+-+Class+Enhancements+-+Pre-exit,+Post-exit+and+Overwrite-exit+methods+-+Concept+and+Simple+Scenarios" target="_blank" rel="noopener noreferrer">https://wiki.scn.sap.com/wiki/display/ABAP/Enhancement+Framework+-+Class+Enhancements+-+Pre-exit,+Post-exit+and+Overwrite-exit+methods+-+Concept+and+Simple+Scenarios</A><BR /> <BR /> So, let's start.<BR /> <H2 id="toc-hId-342238265"><STRONG>Step 1: Creation of custom class</STRONG></H2><BR /> Let's create a custom class "ZCL_BW_QUERY_NAME". This class will be used to get the Query Id. This class will have below component:<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-2.png" /><STRONG>Attribute:</STRONG><BR /> <UL><BR /> <LI>MV_QUERY_ID -&nbsp; To store the query Id</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-2-1.png" /><BR /> <BR /> <STRONG>Methods:</STRONG><BR /> <UL><BR /> <LI><STRONG>SET_QUERY_ID</STRONG> - Sets the query ID - This will be used in the Pre-exit of the method of class "CL_RSBOLAP_SELECTION_OBJECT" to set the value</LI><BR /> <LI><STRONG>GET_QUERY_ID</STRONG> - Gets the query ID - This will be used in customer exit/BAdI to get the query id</LI><BR /> </UL><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-3.png" /><BR /> <BR /> <STRONG>Method: SET_QUERY_ID</STRONG><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-4.png" /><BR /> <PRE class="language-abap"><CODE> METHOD set_query_id.<BR /> "Set the query id<BR /> mv_query_id = im_v_query_id.<BR /> ENDMETHOD.</CODE></PRE><BR /> <STRONG>Method: GET_QUERY_ID</STRONG><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-5.png" /><BR /> <PRE class="language-abap"><CODE> METHOD get_query_id.<BR /> "Return the query id<BR /> rt_v_query_id = mv_query_id.<BR /> ENDMETHOD.</CODE></PRE><BR /> <H2 id="toc-hId-145724760"><STRONG>Step 2: Creation of pre-exit for setting the value of Query in the custom class</STRONG></H2><BR /> To create the Pre-exit go to the class "CL_RSBOLAP_SELECTION_OBJECT" in class builder(t-code: SE24) and click on "Class--&gt; Enhance" in the menubar.<BR /> <BR /> If you have already an enhancement implementation, then the created enhancement implementation will be shown in the pop-up. Select the implementation to proceed. In my case, there is no existing implementation, so I will go ahead and create one.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-7-1.png" /><BR /> <BR /> Once the Enhancement Implementation is created, place the cursor on the method "CREATE_OLAP_OBJECT". Then create a pre-exit method.<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-8.png" /><BR /> <BR /> Please click on "Yes" in the pop-up if the pop-up is displayed.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-9-1.png" /></P><BR /> Now click on the button shown in "Pre-exit" column of the method "CREATE_OLAP_OBJECT".<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-10.png" /><BR /> <BR /> Please add below code inside the pre-exit of the method method<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-11.png" /><BR /> <PRE class="language-abap"><CODE>METHOD IPR_ZEHN_QUERY_DETAILS~CREATE_OLAP_OBJECT.<BR /> *"------------------------------------------------------------------------*<BR /> *" Declaration of PRE-method, do not insert any comments here please!<BR /> *"<BR /> *"methods CREATE_OLAP_OBJECT<BR /> *" importing<BR /> *" !I_AUTHCHECK type RS_BOOL<BR /> *" raising<BR /> *" CX_RSBOLAP_UNKNOWN_DATA_PROV .<BR /> *"------------------------------------------------------------------------*<BR /> "Set the query ID <BR /> zcl_bw_query_name=&gt;set_query_id( im_v_query_id = core_object-&gt;if_rsbolap_md_selector~n_s_compkey-compid ).<BR /> ENDMETHOD.</CODE></PRE><BR /> So, we have created the custom class and set the query Id. We are all done. No kidding. Now we can use our method "GET_QUERY_ID" of our class "ZCL_BW_QUERY_NAME" inside customer exit to fetch the query id.<BR /> <H2 id="toc-hId--50788745"><STRONG>Step 3: Get the query id in customer exit&nbsp;</STRONG></H2><BR /> Now, let's go our customer exit for BEx Variable to use our class to get the query id. Let's<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2020/05/Class-12-3.png" /><BR /> <PRE class="language-abap"><CODE>IF i_s_rkb1d-compid IS INITIAL.<BR /> "Get the query id<BR /> i_s_rkb1d-compid = zcl_bw_query_name=&gt;get_query_id( ).<BR /> ENDIF.</CODE></PRE><BR /> We can call the method "GET_QUERY_ID" of the class "ZCL_BW_QUERY_NAME". We can see we get the name of the query in the which is being run. Please note the value of "I_STEP" is "0", which confirms we are dealing with the authorization variable.<BR /> <H2 id="toc-hId--247302250"><STRONG>Conclusion:</STRONG></H2><BR /> As we saw, we had an issue to get the Query Name for the authorization variable(I_STEP=0). The I_S_RKB1D-COMPID was blank. However, for I_STEP=1 or 2, there is no issues and the variable "I_S_RKB1D-COMPID" is filled correctly. To overcome the issue, we have created a pre-exit in the method "CREATE_OLAP_OBJECT" in the class to set the query id in the custom class "ZCL_BW_QUERY_NAME". Then, we used the class "ZCL_BW_QUERY_NAME" in the customer exit(for BAdI also it will work fine) to get the name of the query. Cheers! 2020-05-29T17:30:36+02:00 https://community.sap.com/t5/technology-blogs-by-members/how-to-recover-objects-not-visible-within-infoarea/ba-p/13541917 How to Recover Objects not visible within InfoArea 2021-12-31T09:20:53+01:00 siddhesh_kadam https://community.sap.com/t5/user/viewprofilepage/user-id/775176 In this Blog Post we will understand how to handle a situation when Objects are not visible within InfoArea.<BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG>Problem Statement :</STRONG></SPAN><BR /> <BR /> Often when there are Role level and authorization related Changes from Basis or Security Team on User ID, User's might not be able to see the Modelling Objects and Query related Elements within the InfoArea and it creates a kind of confusion when no object is visible to work upon which used to exists before.<BR /> <BR /> This issue often occurs due to Shared Buffer that exists on Application Server.<BR /> <BR /> &nbsp;<BR /> <BR /> Lets try to Understand how we can resolve this Issue.<BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG>Solution</STRONG></SPAN> :<BR /> <OL><BR /> <LI>Go to T-Code : <STRONG>RSOSM</STRONG>, which is often used for BW Search for SAP HANA Maintenance.</LI><BR /> </OL><BR /> <P style="overflow: hidden;margin-bottom: 0px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/12/RSOSM.png" height="344" width="461" /></P><BR /> &nbsp;<BR /> <BR /> 2.&nbsp; You will get the above Screen , Scroll to the bottom of the screen and click on "<STRONG>Configure BW Search</STRONG>" , You will be presented with the below Screen.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/12/configure_bw_search.png" height="321" width="505" /></P><BR /> &nbsp;<BR /> <BR /> 3. Once you are within "<STRONG>Configure BW Search</STRONG>" Section, You can see the status of your Shared Buffer as "<STRONG>Shared Buffer is Filled</STRONG>" and a Delete Icon besides that Status.<BR /> <BR /> &nbsp;<BR /> <BR /> 4. Click on that Delete Icon , it will delete your Shared Buffer and the Status will be changed to "<STRONG>Shared Buffer is not filled</STRONG>" as below.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2021/12/Pic3.png" height="113" width="508" /></P><BR /> &nbsp;<BR /> <BR /> 5. Now , go back to your InfoArea and hit Refresh , You will be able to see all your Modelling Objects and Query related Elements back within InfoArea.<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> <SPAN style="text-decoration: underline"><STRONG>Conclusion</STRONG></SPAN>:<BR /> <BR /> &nbsp;<BR /> <BR /> By Following the above steps you will be able to clear up your shared buffer and able to see the missing Objects back within your InfoArea.<BR /> <BR /> &nbsp;<BR /> <BR /> — Sources of the pictures are screenshots I have taken from SAP system and no image is taken from the internet.<BR /> <BR /> &nbsp;<BR /> <BR /> Hope the above Information added a bit of value to your time and knowledge .<BR /> <BR /> If you enjoyed reading it do give it a Like and would be happy to read your feedback in the comments section.<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp;<BR /> <BR /> &nbsp; 2021-12-31T09:20:53+01:00 https://community.sap.com/t5/technology-blogs-by-members/obtaining-mdx-data-in-sapui5-via-xmla/ba-p/13524695 Obtaining MDX data in SAPUI5 via XMLA 2022-02-12T15:06:04+01:00 ThorstenHoefer https://community.sap.com/t5/user/viewprofilepage/user-id/343 <H2 id="toc-hId-959340477">1. Introduction</H2><BR /> SAP UI5 developers often struggle with obtaining data from the backend. The common way to access backend data is the OData protocol.<BR /> <BR /> The OData interface provides such advantages as selecting. binding, filtering and sorting data.<BR /> On the other hand, there are some flaws in OData protocol as to handling OLAP Data for analysis.<BR /> <BR /> MDX (Multidimensional Expressions) has established itself as a common query language for OLAP data. XMLA (XML for analysis) is an open standard for requesting OLAP Data with MDX.<BR /> <BR /> Below find my description of&nbsp; how MDX Data can be obtained using XMLA in javascript for SAP UI5.<BR /> <BR /> SAP offers the ISCF node /sap/bw/xml/soap/xmla/ as a web service data provider interface.<BR /> <BR /> This web service offers two methods: <STRONG>Execute</STRONG> and <STRONG>Discover</STRONG>. In the following article is the focus on the <STRONG>Execute </STRONG>Method.<BR /> <BR /> A JQuery post request will send the MDX query envelop in a XML structure as a web service request.<BR /> <BR /> &nbsp;<BR /> <H2 id="toc-hId-762826972">2. Create and test the MDX Query</H2><BR /> Transaction MDXTEST allows us to create, test and execute a MDX Query.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/02/TA_MDX.png" /></P><BR /> The MDX query can be directly executed.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/02/mdx_result.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Execution of MDX Query</P><BR /> &nbsp;<BR /> <BR /> In this example, I used a Query which is provided in the trial SAP 7.52 Developer Edition.<BR /> <BR /> <A href="https://developers.sap.com/trials-downloads.html?search=7.52" target="_blank" rel="noopener noreferrer">https://developers.sap.com/trials-downloads.html?search=7.52</A><BR /> <BR /> MDX example<BR /> <PRE class="language-markup"><CODE>SELECT<BR /> NON EMPTY<BR /> { [48CSWO6CA6TXXHDU2Q35OLJW0].Members }<BR /> ON COLUMNS,<BR /> NON EMPTY<BR /> { [0D_FC_COUN 0D_FC_COUN_H001].Members }<BR /> DIMENSION PROPERTIES<BR /> LEVEL_NUMBER<BR /> ON ROWS<BR /> FROM<BR /> [0D_FC_C02/0D_FC_AE_EOIBV_Q001]</CODE></PRE><BR /> Key Figures are selected in the columns, the Country hierarchy is selected in the rows.<BR /> Additionally the property of the hierarchy level is included in the row dimension.<BR /> <BR /> &nbsp;<BR /> <H2 id="toc-hId-566313467">3. Preparing the MDX Statement for the XMLA call</H2><BR /> The MDX statement needs to be embedded in a xml structure for the web service post request.<BR /> <PRE class="language-javascript"><CODE> var _sRequest = `<BR /> &lt;Execute&gt;<BR /> &lt;Command&gt;<BR /> &lt;Statement&gt;<BR /> ${_sMdx}<BR /> &lt;/Statement&gt;<BR /> &lt;Properties&gt;<BR /> &lt;PropertyList&gt;<BR /> &lt;Format&gt;&lt;/Format&gt;<BR /> &lt;/PropertyList&gt;<BR /> &lt;/Properties&gt;<BR /> &lt;/Command&gt;<BR /> &lt;/Execute&gt;`;</CODE></PRE><BR /> The webservice request will be initialized by the JQuery post request to the endpoint.<BR /> <PRE class="language-javascript"><CODE> $.post("/sap/bw/xml/soap/xmla/Execute",_sRequest , _fProcessData); </CODE></PRE><BR /> <H2 id="toc-hId-369799962">4. Processing the XMLA response</H2><BR /> _fProcessData is the callback Method for processing the response of the request.<BR /> <BR /> The response can be analysed in the debugger.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/02/soap_response.png" /></P><BR /> From the response, the output in Axis0, Axis1 and CellData is relevant to obtain the MDX data..<BR /> <BR /> Axis0 delivers the columns Information about the key figure.<BR /> The element Caption contains the key figure name in the text node.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/02/Axis0.png" /></P><BR /> Axis1 contains the rows with the requested attribute of the hierarchy level of the row dimension.<BR /> The first attribute of the member, here "Hierarchy" contains the technical name of the row column.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/02/axis1-1.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Axis 1</P><BR /> &nbsp;<BR /> <BR /> At first the response for the root element needs to be checked. If this element is not present, it indicates an error present. The error message will be passed in the rejection of the promise.<BR /> <PRE class="language-javascript"><CODE> var _oRoot = oData.querySelector("ExecuteResponse&gt;return&gt;root")<BR /> if(!_oRoot){<BR /> debugger;<BR /> var _sError =<BR /> oData.querySelector("Error")?.getAttribute("Description") || <BR /> "undefined Error";<BR /> <BR /> _fReject(_sError)<BR /> return;<BR /> }</CODE></PRE><BR /> Column nodes will be extracted from the Axis0 and the row nodes from Axis1<BR /> <PRE class="language-javascript"><CODE>_ColumnNodes = _oRoot.querySelectorAll("Axes&gt;[name='Axis0']&gt;Tuples&gt;Tuple");<BR /> _RowNodes = _oRoot.querySelectorAll("Axes&gt;[name='Axis1']&gt;Tuples&gt;Tuple");</CODE></PRE><BR /> Data nodes are extracted from CellData<BR /> <PRE class="language-javascript"><CODE>_DataNodes = _oRoot.querySelectorAll("CellData&gt;Cell");</CODE></PRE><BR /> The rows of the output table will be determined from the row nodes, including the requested properties like "hierarchy level". We assume that the properties always occur starting from position 6 from the child nodes. If the technical name (remember 1. attribute of Member) contains blanks, replace them with one underscore.<BR /> <PRE class="language-javascript"><CODE> _RowNodes.forEach(pRow=&gt;{<BR /> let _oMemberNodes = pRow.querySelectorAll("Member")<BR /> let _aRow = [];<BR /> _oMemberNodes.forEach(pMember=&gt;{<BR /> let _sName = pMember.attributes[0].value.replace(/\s+/g,"_");<BR /> _aRow[_sName] = pMember.querySelector("Caption").textContent;<BR /> pMember.querySelectorAll(":nth-child(n+6)")<BR /> .forEach(pProperty=&gt;_aRow[_sName+pProperty.nodeName] = pProperty.textContent); <BR /> })<BR /> _aRowName.push(_aRow);<BR /> });</CODE></PRE><BR /> Keyfigures will be determine by text node of the caption element.<BR /> <PRE class="language-javascript"><CODE> _ColumnNodes.forEach(pRow=&gt;{<BR /> let _oMemberNodes = pRow.querySelectorAll("Member")<BR /> _oMemberNodes.forEach(pMember=&gt;{<BR /> _aColName.push(pMember.querySelector("Caption").textContent);<BR /> })<BR /> });</CODE></PRE><BR /> <SPAN style="font-size: 1rem">Finally the data has to be divided between the rows and columns</SPAN><BR /> <PRE class="language-javascript"><CODE> _iCntRow = _aRowName.length; <BR /> _iCntCol = _aColName.length;<BR /> <BR /> _DataNodes.forEach((pData,pIndex)=&gt;{<BR /> let _sValue = pData.querySelector("Cell&gt;Value").textContent;<BR /> let _iRow = Math.trunc(pIndex / _iCntCol)<BR /> let _iCol = pIndex % _iCntCol;<BR /> _aRowName[_iRow][_aColName[_iCol]] = _sValue<BR /> }); </CODE></PRE><BR /> <H2 id="toc-hId-173286457"></H2><BR /> <H2 id="toc-hId--23227048">5. Binding the OLAP output to the Datamodel</H2><BR /> As a result a promise is returned. Data from this promise can be bound to the model.<BR /> <PRE class="language-abap"><CODE> this.getMdxData(this.getMdx())<BR /> .then(aData=&gt;{<BR /> this.getView().getModel("viewModel").setProperty("/mdxData",aData);<BR /> })<BR /> .catch((oError)=&gt;{<BR /> debugger<BR /> })</CODE></PRE><BR /> &nbsp;<BR /> <H3 id="toc-hId--90657834">5.1 Result of the MDX Query in SAP UI5</H3><BR /> After obtaining data from the XMLA web service, it can be bound directly to a table.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2022/02/result.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Final result</P><BR /> <BR /> <H2 id="toc-hId--416254058">6. Conclusion</H2><BR /> XMLA enables SAP UI5 developers to benefit from the dynamics of<BR /> Multidimensional Expressions (MDX).<BR /> <BR /> Multidimensional Expressions (MDX) is the query language you use to work with and retrieve multidimensional data. This includes the definition of calculated members, named sets, scoped assignments and key performance indicators (KPIs).<BR /> <BR /> MDX offers the flexibility to fetch data, pivot data in dynamic structures based on your needs,<BR /> without restriction of structured data types in the backend.<BR /> <BR /> With MDX you use the flexibility of your multidimensional OLAP queries.<BR /> <BR /> Thank you for reading this blog post. I want to encourage you to share your knowlege about SAPUI5 using this tag link <A href="https://answers.sap.com/tags/500983881501772639608291559920477" target="_blank" rel="noopener noreferrer">https://answers.sap.com/tags/500983881501772639608291559920477</A><BR /> <BR /> &nbsp;<BR /> <H3 id="toc-hId--483684844">Appendix: Project Code</H3><BR /> Three files are required to test the project_<BR /> <BR /> zxmla/index.html<BR /> zxmla/Test.view.xml<BR /> zxmla/Test.controller.xml<BR /> <PRE class="language-markup"><CODE>File: zxmla/index.html<BR /> <BR /> &lt;!DOCTYPE html&gt;<BR /> &lt;html&gt;<BR /> &lt;head&gt;<BR /> &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;<BR /> &lt;meta charset="utf-8"&gt;<BR /> &lt;title&gt;XMLA-Test&lt;/title&gt;<BR /> &lt;script<BR /> <BR /> id="sap-ui-bootstrap"<BR /> src="resources/sap-ui-core.js" <BR /> data-sap-ui-theme="sap_bluecrystal"<BR /> data-sap-ui-libs="sap.m"<BR /> data-sap-ui-compatVersion="edge"<BR /> data-sap-ui-preload="async" <BR /> data-sap-ui-resourceroots='{<BR /> "zxmla": "./"<BR /> }' &gt;<BR /> &lt;/script&gt;<BR /> &lt;script&gt;<BR /> sap.ui.getCore().attachInit(function () {<BR /> sap.ui.xmlview({<BR /> viewName : "zxmla.Test"<BR /> }).placeAt("content");<BR /> });<BR /> &lt;/script&gt;<BR /> &lt;/head&gt;<BR /> &lt;body class="sapUiBody" id="content"&gt;<BR /> &lt;/body&gt;<BR /> &lt;/html&gt;</CODE></PRE><BR /> <PRE class="language-markup"><CODE>File: zxmla/Test.view.xml<BR /> <BR /> &lt;core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" <BR /> xmlns="sap.m"<BR /> controllerName="zxmla.Test"&gt;<BR /> <BR /> &lt;Table id="idProductsTable" items="{viewModel&gt;/mdxData}"&gt;<BR /> &lt;headerToolbar&gt;<BR /> &lt;Toolbar&gt;<BR /> &lt;content&gt;<BR /> &lt;Title text="Products" level="H2"/&gt;<BR /> &lt;ToolbarSpacer /&gt;<BR /> &lt;Button text="Go" press=".onPress"/&gt;<BR /> &lt;/content&gt;<BR /> &lt;/Toolbar&gt;<BR /> &lt;/headerToolbar&gt;<BR /> &lt;columns&gt;<BR /> &lt;Column&gt;&lt;Text text="Level" /&gt;&lt;/Column&gt;<BR /> &lt;Column&gt;&lt;Text text="Land" /&gt;&lt;/Column&gt;<BR /> &lt;Column&gt;&lt;Text text="konsolidiertes Netto" /&gt;&lt;/Column&gt;<BR /> &lt;Column&gt;&lt;Text text="netto Umsatz" /&gt;&lt;/Column&gt;<BR /> &lt;/columns&gt;<BR /> &lt;items&gt;<BR /> &lt;ColumnListItem&gt;<BR /> &lt;cells&gt;<BR /> &lt;Text text="{viewModel&gt;0D_FC_COUN_0D_FC_COUN_H001LEVEL_NUMBER}" /&gt;<BR /> &lt;Text text="{viewModel&gt;0D_FC_COUN_0D_FC_COUN_H001}" /&gt;<BR /> &lt;Text text="{viewModel&gt;Konsolidierter Netto}" /&gt;<BR /> &lt;Text text="{viewModel&gt;Nettoumsatz}" /&gt;<BR /> &lt;/cells&gt;<BR /> &lt;/ColumnListItem&gt;<BR /> &lt;/items&gt;<BR /> &lt;/Table&gt;<BR /> &lt;/core:View&gt;</CODE></PRE><BR /> <PRE class="language-abap"><CODE>File: zxmla/Test.controller.js<BR /> <BR /> sap.ui.define([<BR /> "sap/ui/core/mvc/Controller",<BR /> "sap/ui/model/json/JSONModel"<BR /> ], function(Controller, JSONModel) {<BR /> "use strict";<BR /> <BR /> return Controller.extend("zxmla.Test", {<BR /> <BR /> <BR /> onInit: function() { <BR /> var _oModel = new JSONModel({mdxData: []});<BR /> this.getView().setModel(_oModel, "viewModel");<BR /> },<BR /> <BR /> onPress: function(oEvent){<BR /> this.getMdxData(this.getMdx())<BR /> .then(aData=&gt;{<BR /> debugger<BR /> this.getView().getModel("viewModel").setProperty("/mdxData",aData);<BR /> <BR /> })<BR /> .catch((oError)=&gt;{<BR /> debugger<BR /> })<BR /> },<BR /> getMdxData: function(sMdx){<BR /> var _fResolve, _fReject, <BR /> _oPromise = new Promise((resolve,reject)=&gt;{<BR /> _fResolve = resolve;<BR /> _fReject = reject;<BR /> });<BR /> var _sMdx = this.getMdx();<BR /> var _sRequest = `<BR /> &lt;Execute&gt;<BR /> &lt;Command&gt;<BR /> &lt;Statement&gt;<BR /> ${_sMdx}<BR /> &lt;/Statement&gt;<BR /> &lt;Properties&gt;<BR /> &lt;PropertyList&gt;<BR /> &lt;Format&gt;&lt;/Format&gt;<BR /> &lt;/PropertyList&gt;<BR /> &lt;/Properties&gt;<BR /> &lt;/Command&gt;<BR /> &lt;/Execute&gt;`;<BR /> <BR /> var _fProcessData = function(oData, sStatus){<BR /> <BR /> var _oRoot = oData.querySelector("ExecuteResponse&gt;return&gt;root")<BR /> if(!_oRoot){<BR /> debugger;<BR /> var _sError =<BR /> oData.querySelector("Error")?.getAttribute("Description") || <BR /> "undefined Error";<BR /> <BR /> _fReject(_sError)<BR /> return;<BR /> }<BR /> <BR /> var _aColName = [], _iCntRow = 0, _iCntCol = 0;<BR /> var _aRowName = []<BR /> var _ColumnNodes =<BR /> _oRoot.querySelectorAll("Axes&gt;[name='Axis0']&gt;Tuples&gt;Tuple")<BR /> var _RowNodes = <BR /> _oRoot.querySelectorAll("Axes&gt;[name='Axis1']&gt;Tuples&gt;Tuple")<BR /> var _DataNodes = _oRoot.querySelectorAll("CellData&gt;Cell")<BR /> <BR /> _RowNodes.forEach(pRow=&gt;{<BR /> let _oMemberNodes = pRow.querySelectorAll("Member")<BR /> let _aRow = [];<BR /> _oMemberNodes.forEach(pMember=&gt;{<BR /> let _sName = pMember.attributes[0].value.replace(/\s+/g,"_");<BR /> _aRow[_sName] = pMember.querySelector("Caption").textContent;<BR /> pMember.querySelectorAll(":nth-child(n+6)")<BR /> .forEach(pProperty=&gt;_aRow[_sName+pProperty.nodeName] = pProperty.textContent); <BR /> })<BR /> _aRowName.push(_aRow);<BR /> });<BR /> <BR /> _ColumnNodes.forEach(pRow=&gt;{<BR /> let _oMemberNodes = pRow.querySelectorAll("Member")<BR /> _oMemberNodes.forEach(pMember=&gt;{<BR /> _aColName.push(pMember.querySelector("Caption").textContent);<BR /> })<BR /> });<BR /> <BR /> _iCntRow = _aRowName.length; <BR /> _iCntCol = _aColName.length;<BR /> <BR /> _DataNodes.forEach((pData,pIndex)=&gt;{<BR /> let _sValue = pData.querySelector("Cell&gt;Value").textContent;<BR /> let _iRow = Math.trunc(pIndex / _iCntCol)<BR /> let _iCol = pIndex % _iCntCol;<BR /> _aRowName[_iRow][_aColName[_iCol]] = _sValue<BR /> }); <BR /> debugger<BR /> _fResolve(_aRowName)<BR /> // check _aRowName<BR /> };<BR /> <BR /> $.post("/sap/bw/xml/soap/xmla/Execute",_sRequest , _fProcessData); <BR /> return _oPromise <BR /> },<BR /> <BR /> getMdx: function(){<BR /> var _sMdx =<BR /> `SELECT<BR /> NON EMPTY<BR /> { [48CSWO6CA6TXXHDU2Q35OLJW0].Members }<BR /> ON COLUMNS,<BR /> NON EMPTY<BR /> { [0D_FC_COUN 0D_FC_COUN_H001].Members }<BR /> DIMENSION PROPERTIES<BR /> LEVEL_NUMBER<BR /> ON ROWS<BR /> FROM<BR /> [0D_FC_C02/0D_FC_AE_EOIBV_Q001]`<BR /> return _sMdx;<BR /> }<BR /> <BR /> });<BR /> });</CODE></PRE> 2022-02-12T15:06:04+01:00 https://community.sap.com/t5/technology-blogs-by-sap/embedded-analytics-with-abap-cloud-the-multidimensional-cube-part-2/ba-p/13554045 Embedded Analytics with ABAP Cloud – The Multidimensional Cube (Part 2) 2023-03-31T03:23:36+02:00 fabianfellhauer https://community.sap.com/t5/user/viewprofilepage/user-id/354017 <SPAN data-contrast="auto">Cheers ABAP folks!</SPAN><SPAN data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <BR /> <SPAN data-contrast="auto">The multidimensional cube view is the heart of the analytical model in ABAP CDS. In this blog post, I want to give you an insight into the modeling patterns of analytical cube views and their role within the ABAP Application Server.</SPAN><SPAN data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <BR /> <SPAN data-contrast="auto">New to analytics? Then I urgently recommend that you read the previous part of this blog post series:</SPAN> <A style="font-size: 1rem" href="https://blogs.sap.com/2022/11/30/embedded-analytics-with-abap-cloud-a-brief-overview-part-1/" target="_blank" rel="noopener noreferrer">Embedded Analytics with ABAP Cloud – A Brief Overview (Part 1)</A><BR /> <BR /> &nbsp;<BR /> <H1 id="toc-hId-833022400">What Is a Multidimensional Cube?</H1><BR /> <SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">A multidimensional cube </SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">view</SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)"> spans up all the dimensions</SPAN>&nbsp;<SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">that </SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">exist for a specific data set </SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">to</SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)"> which an analytical reporting is applied. A sales order, for example, may contain dimensional attributes </SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">such as</SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)"> an order date, an associated product, as well as a business partner reference. Querying the multidimensional cube with </SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">parameterization of specific</SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)"> dimensions returns an aggregated result for the matching cells </SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">that</SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)"> represent a measure, </SPAN><SPAN class="NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">e.g.</SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)"> the turnover, in the multi</SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">-</SPAN><SPAN class="NormalTextRun SCXW180760360 BCX0" data-ccp-parastyle="Normal (Web)">dimensional model:</SPAN><BR /> <PRE><CODE>f(Dimension 1, Dimension 2, Dimension 3) -&gt; Measure<BR /> <BR /> Example: f('Targot Corp.', '2023-02-25', 'Lemonade') -&gt; turnover of this particular company</CODE></PRE><BR /> <IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Cube-Pruning.png" /><BR /> <BR /> <SPAN class="TextRun SCXW127570977 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW127570977 BCX0" data-ccp-parastyle="Normal (Web)">Pruning single dimensions </SPAN><SPAN class="NormalTextRun SCXW127570977 BCX0" data-ccp-parastyle="Normal (Web)">whe</SPAN><SPAN class="NormalTextRun SCXW127570977 BCX0" data-ccp-parastyle="Normal (Web)">n</SPAN><SPAN class="NormalTextRun SCXW127570977 BCX0" data-ccp-parastyle="Normal (Web)"> querying a multidimensional data set leads to the aggregation of the pruned dimension:</SPAN></SPAN><SPAN class="EOP SCXW127570977 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <PRE><CODE>f(Dimension 2, Dimension 3) -&gt; Aggregation of Measure over Dimension 1<BR /> <BR /> Example: f('2023-02-25', 'Lemonade') -&gt; sum of turnovers of all companies</CODE></PRE><BR /> <SPAN class="TextRun SCXW142908008 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)">Based on </SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)">th</SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)">is</SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)">, a multidimensional cube always provides the overall data basis for your analytical reporting</SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)">.</SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)"> This </SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)">can</SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)"> include </SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)">defini</SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)">ng</SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)"> foreign key relationships to dimensions based on dimensional attributes for further data exploration, defaulting for aggregations, </SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)">and defining</SPAN><SPAN class="NormalTextRun SCXW142908008 BCX0" data-ccp-parastyle="Normal (Web)"> text relationships for labeling your attributes.</SPAN></SPAN><SPAN class="EOP SCXW142908008 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <H1 id="toc-hId-636508895">Multidimensional Reporting on Transactional Data</H1><BR /> <SPAN class="TextRun SCXW147682123 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">Ok, enough theor</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">y</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">. Let’s get concrete: Imagine </SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">you run</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> a company</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> that</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> ships soft drinks to </SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">retailers,</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> and </SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">you have</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> the following given transactional data model: A sales order is defined </SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">at the</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> header level with references to the paying business partner, the business partner to </SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">whom</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> the products </SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">are</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> to be shipped</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">,</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">&nbsp;</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">and an order date. </SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">In addition</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">, each sales order </SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">can</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> consist of multiple sales order items</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> that</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> have priced products, as well as a quantity assigned. Additionally, each sales order </SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">must</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> be paid</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> for</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">. All</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> these</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> details are represented by different CDS </SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">e</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)">ntities</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> that are</SPAN><SPAN class="NormalTextRun SCXW147682123 BCX0" data-ccp-parastyle="Normal (Web)"> linked by a relational data model.</SPAN></SPAN><SPAN class="EOP SCXW147682123 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Transactional-Model.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">The Transactional Model - Represented as Relational Data Model</P><BR /> <SPAN class="TextRun SCXW30825004 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">In the corresponding transactional UI service, all </SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">this </SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">relational data is properly </SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">joined</SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)"> so the transactional business user can </SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">quickly act</SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)"> on specific sales orders. However, </SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">it</SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)"> seems </SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">a bit</SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)"> challenging </SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">to get a summary of last quarter’s </SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">sales </SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">with this data representation, </SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)">doesn’t</SPAN><SPAN class="NormalTextRun SCXW30825004 BCX0" data-ccp-parastyle="Normal (Web)"> it?</SPAN></SPAN><SPAN class="EOP SCXW30825004 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Transactional-UI.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">The Transactional Model - User Interface</P><BR /> <BR /> <H1 id="toc-hId-439995390">Preparing your Data Model Is Key</H1><BR /> <SPAN class="TextRun SCXW220625224 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW220625224 BCX0" data-ccp-parastyle="Normal (Web)">Therefore, </SPAN><SPAN class="NormalTextRun SCXW220625224 BCX0" data-ccp-parastyle="Normal (Web)">it is recommended that you </SPAN><SPAN class="NormalTextRun SCXW220625224 BCX0" data-ccp-parastyle="Normal (Web)">prepare</SPAN><SPAN class="NormalTextRun SCXW220625224 BCX0" data-ccp-parastyle="Normal (Web)"> your transactional data model before building an analytical model on top of it. I’ll show you how to do </SPAN><SPAN class="NormalTextRun SCXW220625224 BCX0" data-ccp-parastyle="Normal (Web)">this</SPAN><SPAN class="NormalTextRun SCXW220625224 BCX0" data-ccp-parastyle="Normal (Web)">.</SPAN></SPAN><SPAN class="EOP SCXW220625224 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <H2 id="toc-hId-372564604">Identify Relevant Data Sources</H2><BR /> <SPAN class="TextRun SCXW225269429 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">First, ask yourself: What are the relevant </SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">metrics</SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)"> that I want to report </SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">on to best run</SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)"> my business? In our current transactional sales order model</SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">, there are several possible</SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)"> analytical use cases. Let’s focus on reporting </SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">on </SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">the </SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">revenue</SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)"> of sales order items</SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)"> sold</SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)"> and</SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)"> the payment </SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">history</SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">. The following relational CDS </SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">e</SPAN><SPAN class="NormalTextRun SCXW225269429 BCX0" data-ccp-parastyle="Normal (Web)">ntities are involved in this reporting:</SPAN></SPAN><SPAN class="EOP SCXW225269429 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <UL><BR /> <LI>Sales Order Item(s)</LI><BR /> <LI>Payment(s)</LI><BR /> </UL><BR /> <H2 id="toc-hId-176051099">Identify Relevant Relationships</H2><BR /> <SPAN class="TextRun SCXW260562778 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">Isolated reporting on th</SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">e</SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">se CDS </SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">e</SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">ntities would be easy to </SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">implement but</SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)"> wouldn’t provide </SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">much value to</SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)"> our business. Therefore, it's essential to identify the relevant relationships between th</SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">e</SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">se CDS </SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">e</SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">ntities and to take CDS </SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">e</SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">ntities in between into the reporting scope. The following CDS </SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">e</SPAN><SPAN class="NormalTextRun SCXW260562778 BCX0" data-ccp-parastyle="Normal (Web)">ntity is added to our reporting scope:</SPAN></SPAN><SPAN class="EOP SCXW260562778 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <UL><BR /> <LI>Sales Order(s)</LI><BR /> </UL><BR /> <H2 id="toc-hId--20462406">Span up Multidimensional Data Basis</H2><BR /> <SPAN class="TextRun SCXW204985564 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">Working </SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">at</SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)"> a conceptual level is </SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">certainly</SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)"> fun for all </SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">the </SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">theorists out there. However, at this point we need to hit the keys and span up our multidimensional data model&nbsp;</SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">directly on</SPAN> <SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">to</SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">p of</SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">&nbsp;</SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">our relational data model. </SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">To do </SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">this</SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">, it's important to</SPAN><SPAN class="NormalTextRun SCXW204985564 BCX0" data-ccp-parastyle="Normal (Web)">:</SPAN></SPAN><SPAN class="EOP SCXW204985564 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <OL><BR /> <LI>Preserve the unique keys across all involved CDS entities</LI><BR /> <LI>Unite your measure-based data sets by using UNIONs in CDS entities</LI><BR /> <LI>Resolve to-many-relationships by denormalization via dimension-based relations</LI><BR /> </OL><BR /> <SPAN class="TextRun SCXW12841610 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW12841610 BCX0" data-ccp-parastyle="Normal (Web)">In our example, the plain multidimensional data basis could be achieved with the following implementation of a CDS </SPAN><SPAN class="NormalTextRun SCXW12841610 BCX0" data-ccp-parastyle="Normal (Web)">e</SPAN><SPAN class="NormalTextRun SCXW12841610 BCX0" data-ccp-parastyle="Normal (Web)">ntity:</SPAN></SPAN><SPAN class="EOP SCXW12841610 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <PRE class="language-sql"><CODE>@EndUserText.label: 'Sales Order Cube Basis'<BR /> define view entity P_DD_TSM_ANA_SALESORDER<BR /> as select from sdd_tsm_ana_soi as SalesOrderItem<BR /> left outer join SDD_TSM_ANA_SO as SalesOrder<BR /> on SalesOrder.sales_order_id = SalesOrderItem.sales_order_id<BR /> <BR /> {<BR /> key SalesOrder.sales_order_id as SalesOrder,<BR /> key SalesOrderItem.sales_order_item_id as SalesOrderItem,<BR /> key abap.raw'00000000000000000000000000000000' as Payment<BR /> }<BR /> <BR /> union all select from SDD_TSM_ANA_PAYM as Payment<BR /> left outer join SDD_TSM_ANA_SO as SalesOrder<BR /> on SalesOrder.sales_order_id = Payment.sales_order<BR /> <BR /> {<BR /> key SalesOrder.sales_order_id as SalesOrder,<BR /> key abap.raw'00000000000000000000000000000000' as SalesOrderItem,<BR /> key Payment.payment_id as Payment<BR /> }</CODE></PRE><BR /> &nbsp;<BR /> <BR /> <SPAN class="TextRun SCXW255917638 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">This CDS </SPAN><SPAN class="NormalTextRun CommentStart SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">v</SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">iew </SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">helps to span up the data basis for our multidimensional reporting. </SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">Proper key</SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)"> handling is essential here. Further attributes </SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">can</SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)"> be added later in the cube again. Key elements </SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">that do </SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">not </SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">bel</SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">o</SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)">ng</SPAN><SPAN class="NormalTextRun SCXW255917638 BCX0" data-ccp-parastyle="Normal (Web)"> to the reported data set are initialized with corresponding default values. The result of a data preview should then look like the following picture:</SPAN></SPAN><SPAN class="EOP SCXW255917638 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Data-Preview.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Data preview of the cubes data basis</P><BR /> <SPAN class="TextRun SCXW101775143 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW101775143 BCX0" data-ccp-parastyle="Normal (Web)">Each data record contains a reference to </SPAN><SPAN class="NormalTextRun SCXW101775143 BCX0" data-ccp-parastyle="Normal (Web)">either</SPAN><SPAN class="NormalTextRun SCXW101775143 BCX0" data-ccp-parastyle="Normal (Web)"> a concrete sales order item or to a concrete payment. </SPAN><SPAN class="NormalTextRun SCXW101775143 BCX0" data-ccp-parastyle="Normal (Web)">Each record also contains a reference to a specific </SPAN><SPAN class="NormalTextRun SCXW101775143 BCX0" data-ccp-parastyle="Normal (Web)">sales order header.</SPAN></SPAN><SPAN class="EOP SCXW101775143 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <BR /> &nbsp;<BR /> <H1 id="toc-hId--346058630">Slice and Dice Your Cube</H1><BR /> <SPAN class="TextRun SCXW154017958 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">After </SPAN><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">preparing</SPAN><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)"> our data basis, we now have a fine</SPAN><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">-</SPAN><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">granular reporting of all available data records</SPAN><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)"> that</SPAN><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)"> can be aggregated </SPAN><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">safely</SPAN> <SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">by the HANA engine without counting any measure twice. </SPAN></SPAN><SPAN class="TextRun SCXW154017958 BCX0" lang="DE-DE" lang="DE-DE" data-contrast="auto"><SPAN class="NormalTextRun SpellingErrorV2Themed SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">To</SPAN><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)"> design a multidimensional </SPAN><SPAN class="NormalTextRun SpellingErrorV2Themed SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">cube</SPAN><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">, </SPAN><SPAN class="NormalTextRun SpellingErrorV2Themed SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">we</SPAN> <SPAN class="NormalTextRun SpellingErrorV2Themed SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">now</SPAN> <SPAN class="NormalTextRun SpellingErrorV2Themed SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">need</SPAN> <SPAN class="NormalTextRun SpellingErrorV2Themed SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">to</SPAN><SPAN class="NormalTextRun SCXW154017958 BCX0" data-ccp-parastyle="Normal (Web)">:</SPAN></SPAN><SPAN class="EOP SCXW154017958 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <OL><BR /> <LI>Classify the cube view as such</LI><BR /> <LI>Introduce measures, which are used for aggregations</LI><BR /> <LI>Introduce dimensions, which are used for grouping based on drilldowns</LI><BR /> </OL><BR /> &nbsp;<BR /> <H2 id="toc-hId--413489416">Definition of a Cube</H2><BR /> <SPAN class="TextRun SCXW117564020 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)">The cube simply selects from our prepared data model and creates joins</SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)"> to</SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)"> the </SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)">original</SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)"> data sources </SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)">to access</SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)"> further attributes. Don’t worry about performance: </SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)">Th</SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)">e</SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)">se</SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)"> additional joins are optimized by the HANA engine anyway. Just </SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)">be</SPAN><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)"> sure to flag your cube with the annotation </SPAN></SPAN><SPAN class="TextRun SCXW117564020 BCX0" lang="EN-US" style="color: #3366ff" lang="EN-US" data-contrast="none"><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)"><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/15206">@analytics</a>.dataCategory: #CUBE</SPAN></SPAN><SPAN class="TextRun SCXW117564020 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW117564020 BCX0" data-ccp-parastyle="Normal (Web)">.</SPAN></SPAN><SPAN class="EOP SCXW117564020 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <BR /> &nbsp;<BR /> <H2 id="toc-hId--610002921">Measures</H2><BR /> <SPAN class="TextRun SCXW263236811 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW263236811 BCX0" data-ccp-parastyle="Normal (Web)">Next, add all measure-like fields to your cube</SPAN><SPAN class="NormalTextRun SCXW263236811 BCX0" data-ccp-parastyle="Normal (Web)"> that</SPAN><SPAN class="NormalTextRun SCXW263236811 BCX0" data-ccp-parastyle="Normal (Web)"> you're interested in for your analytical reporting. Measures are identified by their numeric data type, as well as by their capability to be </SPAN><SPAN class="NormalTextRun SCXW263236811 BCX0" data-ccp-parastyle="Normal (Web)">aggregated by</SPAN><SPAN class="NormalTextRun SCXW263236811 BCX0" data-ccp-parastyle="Normal (Web)"> default, also called standard aggregation. This property can be set with </SPAN><SPAN class="NormalTextRun SCXW263236811 BCX0" data-ccp-parastyle="Normal (Web)">the</SPAN><SPAN class="NormalTextRun SCXW263236811 BCX0" data-ccp-parastyle="Normal (Web)"> annotation </SPAN></SPAN><SPAN class="TextRun SCXW263236811 BCX0" lang="EN-US" style="color: #3366ff" lang="EN-US" data-contrast="none"><SPAN class="NormalTextRun SCXW263236811 BCX0" data-ccp-parastyle="Normal (Web)">@Aggregation.default</SPAN></SPAN><SPAN class="TextRun SCXW263236811 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW263236811 BCX0" data-ccp-parastyle="Normal (Web)">.</SPAN></SPAN><SPAN class="EOP SCXW263236811 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <BR /> Please consider the following recommendations for measures:<BR /> <TABLE style="border-collapse: collapse;width: 100%" border="1"><BR /> <TBODY><BR /> <TR style="height: 14px"><BR /> <TD style="width: 6.48%;height: 14px"><SPAN style="color: #339966"><STRONG>Do</STRONG></SPAN></TD><BR /> <TD style="width: 93.52%;height: 14px">Measures should be added to the cube if aggregated reporting is required for them.</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 6.48%;height: 14px"><SPAN style="color: #339966"><STRONG>Do</STRONG></SPAN></TD><BR /> <TD style="width: 93.52%;height: 14px">Aggregations are defined on element level for measures only.</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 6.48%;height: 14px"><SPAN style="color: #339966"><STRONG>Do</STRONG></SPAN></TD><BR /> <TD style="width: 93.52%;height: 14px">Aggregations are defined with annotation <SPAN style="color: #3366ff">@Aggregation.default</SPAN>.</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 6.48%;height: 14px"><SPAN style="color: #339966"><STRONG>Do</STRONG></SPAN></TD><BR /> <TD style="width: 93.52%;height: 14px">Supported default aggregations on cube level are #SUM, #MIN, #MAX. Other aggregations need to be defined in concrete analytical queries.</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 6.48%;height: 14px"><SPAN style="color: #800000"><STRONG>Don't</STRONG></SPAN></TD><BR /> <TD style="width: 93.52%;height: 14px">Calculated measures based on formulas shouldn't be introduced in the cube, but in the analytical query on top.</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> &nbsp;<BR /> <H2 id="toc-hId--806516426">Dimensions</H2><BR /> <SPAN data-contrast="auto">To fine-tune your reporting, it is mandatory to define dimensions in your cube, for example, to group aggregated measures based on the characteristics of a data record. Dimensions are modeled either as foreign key fields, such as a business partner ID, or as pure attribute, such as an order date. Foreign key fields should also be linked via an association to the corresponding dimension view to span up the analytical star schema around your cube. This gives you further possibilities to deep dive into your analytical model at the query level.</SPAN><SPAN data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <BR /> <SPAN data-contrast="auto">Please consider the following recommendations for dimensions:</SPAN><SPAN data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <TABLE style="border-collapse: collapse;width: 100%" border="1"><BR /> <TBODY><BR /> <TR style="height: 28px"><BR /> <TD style="width: 5.68%;height: 28px"><SPAN style="color: #339966"><STRONG>Do</STRONG></SPAN></TD><BR /> <TD style="width: 94.32%;height: 28px"><SPAN class="TextRun SCXW251117459 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW251117459 BCX0">Dimensions should be added to the cube if drill downs </SPAN><SPAN class="NormalTextRun SCXW251117459 BCX0">are to</SPAN><SPAN class="NormalTextRun SCXW251117459 BCX0"> be applied</SPAN><SPAN class="NormalTextRun SCXW251117459 BCX0">.</SPAN></SPAN><SPAN class="EOP SCXW251117459 BCX0" data-ccp-props="{&quot;201341983&quot;:0,&quot;335559740&quot;:259}">&nbsp;</SPAN></TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 5.68%;height: 14px"><SPAN style="color: #339966"><STRONG>Do</STRONG></SPAN></TD><BR /> <TD style="width: 94.32%;height: 14px">Dimensions may be represented by a dedicated dimension view associated with your cube.</TD><BR /> </TR><BR /> <TR style="height: 14px"><BR /> <TD style="width: 5.68%;height: 14px"><SPAN style="color: #339966"><STRONG>Do</STRONG></SPAN></TD><BR /> <TD style="width: 94.32%;height: 14px">Be sure to link such an association with annotation <SPAN style="color: #3366ff">@ObjectModel.foreignKey.association</SPAN>.</TD><BR /> </TR><BR /> </TBODY><BR /> </TABLE><BR /> <H2 id="toc-hId--655775574"></H2><BR /> <H2 id="toc-hId--852289079">Special Case: Dimeasures</H2><BR /> <SPAN class="TextRun SCXW25633379 BCX0" lang="EN-US" lang="EN-US" data-contrast="auto"><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">There </SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">may </SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">be use cases</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)"> where</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)"> some attributes need to represent a measure in one analytical reporting, but </SPAN> <SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">also</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)"> a dimension in another one. Ok – I’</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">ll be</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)"> honest – </SPAN><SPAN class="NormalTextRun SpellingErrorV2Themed SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">Dimeasure</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)"> is</SPAN> <SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">n</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">o</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">t an official term, but I think you know what I mean, right?</SPAN> <SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">Like </SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">calculating the average response time of incident processing based on a timestamp field, as well as using the same timestamp field for grouping the results </SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">by</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)"> month. In such a case, make sure to simply introduce the field</SPAN> <SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">twice in</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)"> your cube view</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">. One with a measure-like flavor, the other one with a dimension</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">-</SPAN><SPAN class="NormalTextRun SCXW25633379 BCX0" data-ccp-parastyle="Normal (Web)">like flavor.</SPAN></SPAN><SPAN class="EOP SCXW25633379 BCX0" data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <BR /> &nbsp;<BR /> <H2 id="toc-hId--1048802584">TL;DR – Just Give Me Some Coding</H2><BR /> The result of an analytical cube could look like the following:<BR /> <PRE class="language-sql"><CODE>@Analytics.dataCategory: #CUBE<BR /> define view entity I_DD_TSM_ANA_SALESORDERCUBE<BR /> as select from P_DD_TSM_ANA_SALESORDER as SalesOrder<BR /> <BR /> left outer join I_DD_TSM_ANA_SALESORDERITEM as SalesOrderItem<BR /> on SalesOrder.SalesOrderItem = SalesOrderItem.SalesOrderItemId<BR /> <BR /> left outer join I_DD_TSM_ANA_PAYMENT as Payment <BR /> on SalesOrder.Payment = Payment.PaymentId<BR /> <BR /> association [0..1] to I_DD_TSM_ANA_BUPA as _Buyer <BR /> on $projection.Buyer = _Buyer.BupaId<BR /> <BR /> {<BR /> <BR /> key SalesOrder.SalesOrder,<BR /> key SalesOrder.SalesOrderItem,<BR /> key SalesOrder.Payment,<BR /> SalesOrder.OrderDate,<BR /> <BR /> @Aggregation.default: #SUM<BR /> @Semantics.amount.currencyCode: 'ItemCurrency'<BR /> SalesOrderItem.amount as ItemAmount,<BR /> SalesOrderItem.currency as ItemCurrency,<BR /> <BR /> @Aggregation.default: #MAX<BR /> Payment.PaymentDueDate as PaymentDueDate,<BR /> @Aggregation.default: #MAX<BR /> Payment.PaymentDate as PaymentDate,<BR /> <BR /> Payment.PaymentMethod as PaymentMethod,<BR /> <BR /> @Aggregation.default: #SUM<BR /> @Semantics.amount.currencyCode: 'PaymentCurrency'<BR /> Payment.PaymentAmount as PaymentAmount,<BR /> Payment.PaymentCurrency as PaymentCurrency,<BR /> <BR /> @ObjectModel.foreignKey.association: '_Buyer'<BR /> SalesOrder.Buyer,<BR /> <BR /> _Buyer<BR /> }</CODE></PRE><BR /> &nbsp;<BR /> <H1 id="toc-hId--951913082">Great – But Where’s My Fancy Analytical Reporting?</H1><BR /> <SPAN data-contrast="auto">I love your excitement! Building a dedicated CDS Analytical Query on top of our cube will be the next step – in the next part of this series. So, stay tuned!</SPAN><SPAN data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <BR /> <SPAN data-contrast="auto">Ok – I just can’t leave you behind with such a spoiler. Here's a preview of what an analytical reporting could look like when accessed via SAP Analytics Cloud.</SPAN><SPAN data-ccp-props="{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}">&nbsp;</SPAN><BR /> <P class="image_caption" style="text-align: center;font-style: italic;overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/03/Analytical-Preview-SAC-2.png" /></P><BR /> <P class="image_caption" style="text-align: center;font-style: italic">Analytical Story in SAP Analytics Cloud (SAC)</P><BR /> &nbsp;<BR /> <BR /> Don't forget to checkout further material:<BR /> <BR /> Developer Guide: <A href="https://help.sap.com/docs/btp/sap-business-technology-platform/analytical-data-modeling" target="_blank" rel="noopener noreferrer">Analytical Data Modeling</A><BR /> <BR /> &nbsp;<BR /> <BR /> Cheerio ABAP folks! 2023-03-31T03:23:36+02:00 https://community.sap.com/t5/technology-blogs-by-members/sap-native-hana-procedure-to-create-and-populate-a-transpose-table/ba-p/13574828 SAP Native HANA Procedure to Create and Populate a Transpose Table 2023-08-08T18:16:56+02:00 pavani_sappati6 https://community.sap.com/t5/user/viewprofilepage/user-id/870399 <H2 id="toc-hId-963959790">Scenario:</H2><BR /> The scenario is to transpose a table by a single transpose column and populate the new table with the data.<BR /> <BR /> <STRONG>PRODUCT_DATA:</STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Product_data.png" /></P><BR /> <STRONG>PRODUCT_TRANSPOSE:</STRONG><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/Product_transpose.png" /></P><BR /> &nbsp;<BR /> <H2 id="toc-hId-767446285"><STRONG>Solution Approach:</STRONG></H2><BR /> The solution is to create the dynamic SQL statement as below which combines both creation and population of data into one step, where the bolded parts of the statement are dynamically created.<BR /> <PRE class="language-sql"><CODE>Create table Product_transpose as ( <BR /> <BR /> SELECT Product, Large,Small,Medium FROM ( <BR /> <BR /> SELECT Product,<BR /> <BR /> MAX(CASE WHEN Product_Type = 'Large' THEN Unit_Price END) AS Large,<BR /> <BR /> MAX(CASE WHEN Product_Type = 'Small' THEN Unit_Price END) AS Small,<BR /> <BR /> MAX(CASE WHEN Product_Type = 'Medium' THEN Unit_Price END) AS Medium<BR /> <BR /> From Product_data<BR /> <BR /> Group By Product ))</CODE></PRE><BR /> &nbsp;<BR /> <BR /> First two statements are to create the table Product_transpose with the desired columns.<BR /> <BR /> The inner select statement reads the data from product_data by transposing it as below.<BR /> <H2 id="toc-hId-570932780"><STRONG><U>Solution:</U></STRONG></H2><BR /> <H3 id="toc-hId-503501994"><STRONG>Step1:</STRONG></H3><BR /> First, we will use the SQL function “STRING_AGG”, to get the distinct values in the transpose column.<BR /> <BR /> In our case “Product_Type”. This is the dynamic column list for the transpose table.<BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/08/String_Agg.png" /></P><BR /> We will store this list it in &nbsp;'ProductTypeList' variable.<BR /> <PRE class="language-sql"><CODE>SELECT string_agg(PRODUCT_TYPE, ', ')<BR /> INTO ProductTypeList<BR /> FROM (SELECT DISTINCT PRODUCT_TYPE from PRODUCT_DATA as b);</CODE></PRE><BR /> <H3 id="toc-hId-306988489"><STRONG>Step2:</STRONG></H3><BR /> Create the first part of the dynamic SQL statement as below.<BR /> <PRE class="language-sql"><CODE>DynamicSQL := 'Create table Product_transpose as (<BR /> <BR /> SELECT PRODUCT, ' || ProductTypeList || ' FROM (<BR /> <BR /> SELECT PRODUCT,<BR /> <BR /> ';</CODE></PRE><BR /> <H3 id="toc-hId-110474984"><STRONG>Step3:</STRONG></H3><BR /> Dynamically create the statement for populating the data as below.<BR /> <PRE class="language-sql"><CODE>SELECT <BR /> STRING_AGG('MAX(CASE WHEN PRODUCT_TYPE = ''' || PRODUCT_TYPE || ''' THEN <BR /> Unit_Price END) AS ' || PRODUCT_TYPE, ', ')<BR /> <BR /> INTO ColumnExpressions<BR /> <BR /> FROM (SELECT DISTINCT PRODUCT_TYPE FROM Product_data);</CODE></PRE><BR /> <H3 id="toc-hId--86038521"><STRONG>Step4:</STRONG></H3><BR /> Combine all the 3 steps and create the complete dynamic SQL.<BR /> <PRE class="language-sql"><CODE>DynamicSQL := DynamicSQL || ColumnExpressions || <BR /> ' FROM Product_data GROUP BY PRODUCT))';</CODE></PRE><BR /> <H3 id="toc-hId--282552026"><STRONG>Step5:</STRONG></H3><BR /> Execute the dynamic SQL.<BR /> <PRE class="language-sql"><CODE>EXEC DynamicSQL;</CODE></PRE><BR /> <H3 id="toc-hId--479065531"><STRONG>Step6: </STRONG></H3><BR /> Call the procedure from the SQL console as below.<BR /> <PRE class="language-abap"><CODE>CALL "MYSCHEMA"."MYPACKAGE::product_transpose" ( ) ;</CODE></PRE><BR /> <H3 id="toc-hId--675579036">Complete Code:</H3><BR /> <PRE class="language-sql"><CODE>PROCEDURE "MYSCHEMA"."MYPACKAGE::product_transpose" ( )<BR /> <BR /> LANGUAGE SQLSCRIPT<BR /> <BR /> SQL SECURITY INVOKER<BR /> <BR /> --DEFAULT SCHEMA &lt;default_schema_name&gt;<BR /> <BR /> --READS SQL DATA<BR /> <BR /> AS<BR /> <BR /> BEGIN<BR /> <BR /> DECLARE ProductTypeList NVARCHAR(10000);<BR /> <BR /> DECLARE DynamicSQL NVARCHAR(60000);<BR /> <BR /> DECLARE ColumnExpressions NVARCHAR(50000);<BR /> <BR /> <BR /> SELECT string_agg(PRODUCT_TYPE, ', ')<BR /> <BR /> INTO ProductTypeList<BR /> <BR /> FROM (SELECT DISTINCT PRODUCT_TYPE from PRODUCT_DATA as b);<BR /> <BR /> <BR /> DynamicSQL := 'Create table Product_Transpose as (<BR /> <BR /> SELECT PRODUCT, ' || ProductTypeList || '<BR /> <BR /> FROM (<BR /> <BR /> SELECT PRODUCT,<BR /> <BR /> ';<BR /> <BR /> SELECT STRING_AGG('MAX(CASE WHEN PRODUCT_TYPE = ''' || PRODUCT_TYPE || ''' <BR /> <BR /> THEN UNIT_PRICE END) AS ' || PRODUCT_TYPE, ', ')<BR /> <BR /> INTO ColumnExpressions<BR /> <BR /> FROM (SELECT DISTINCT PRODUCT_TYPE FROM PRODUCT_DATA);<BR /> <BR /> <BR /> DynamicSQL := DynamicSQL || ColumnExpressions || ' FROM PRODUCT_DATA<BR /> <BR /> GROUP BY PRODUCT))';<BR /> <BR /> EXEC DynamicSQL;<BR /> <BR /> <BR /> END;</CODE></PRE><BR /> &nbsp;<BR /> <H3 id="toc-hId--947323910">In Conclusion,</H3><BR /> SAP Native HANA procedures are a powerful feature to execute complex data transformations, which can significantly enhance data manipulation and processing efficiency.<BR /> <BR /> Embrace the advantages of streamlined data processing, optimized performance, and simplified code maintenance that these procedures offer.<BR /> <BR /> Feel free to like, comment and share your thoughts! Your insights, questions, and feedback are invaluable in developing a collaborative learning environment.<BR /> <BR /> &nbsp;<BR /> <BR /> <EM><STRONG>&nbsp;</STRONG></EM> 2023-08-08T18:16:56+02:00 https://community.sap.com/t5/technology-blogs-by-sap/cds-hierarchy-directory-how-to-use-notassignednode-annotation-to-suppress/ba-p/13576317 CDS Hierarchy Directory: How to use NOTASSIGNEDNODE Annotation to suppress or to filter the Not Assigned(REST_H) nodes 2023-12-19T23:56:31+01:00 LinaRaut https://community.sap.com/t5/user/viewprofilepage/user-id/179963 This blog is about how to handle Not Assigned(REST_H) nodes in CDS Hierarchy Directory of Analytical query, to get the result set either without Not Assigned node or filtered Not Assigned node. Let’s start with some basic information about CDS Hierarchy Directory.<BR /> <H2 id="toc-hId-964014535"><STRONG>Introduction to CDS Hierarchy Directory</STRONG></H2><BR /> There are two types of Hierarchy views. First where we use annotation <STRONG>‘</STRONG><STRONG>@Hierarchy</STRONG><STRONG>’</STRONG> and new one where we use <STRONG>‘define hierarchy &lt;NAME&gt;’</STRONG> (from 2023 on Prem and 2308 Cloud). In both the ways we can define association to a view which is then used as Hierarchy Directory.<BR /> <BR /> Hierarchy Directory is CDS view.<BR /> <UL><BR /> <LI>It contains the List of all hierarchies available in the hierarchy view.</LI><BR /> <LI>It can have Text for the hierarchies (language independent case) Or it can have an association to a text view (language dependent case)</LI><BR /> <LI>It can contain a field which determine whether the Not Assigned node will be displayed or not.</LI><BR /> <LI>It can contain a field which describes a filter which should be applied to the Not Assigned node.</LI><BR /> <LI>It can contain a field which describes when a hierarchy was changed last time and which has annotation as ‘@Semantics.systemDate.lastChangedAt : true (for date)’ or ‘@Semantics.systemDateTime.lastChangedAt: true (for timestamp)’</LI><BR /> </UL><BR /> When this field exist, then analytical engine will buffer the hierarchy and will renew the buffer when hierarchy is changed. Without this field hierarchy will always be rebuild and it can be performance overhead.<BR /> <H2 id="toc-hId-767501030"><STRONG>Use of </STRONG><STRONG>NOTASSIGNEDNODE</STRONG> <STRONG>Annotations in CDS Hierarchy Directory</STRONG></H2><BR /> <UL><BR /> <LI><STRONG>@HIERARCHY.NOTASSIGNEDNODE.SUPPRESSINDICATOR</STRONG> can be used to suppress the display of Not Assigned nodes.</LI><BR /> </UL><BR /> It can be used for one field in a Hierarchy Directory view. The data type of the field must be Boolean (CHAR field with length 1 and with values '' or 'X'). If the flag is set for an entry in the directory, then the analytical engine doesn't create a 'Not Assigned' node. In this case the hierarchy itself acts as a filter and data which is not a leaf in the hierarchy is not part of the resultset.<BR /> <UL><BR /> <LI><STRONG>@HIERARCHY.NOTASSIGNEDNODE.</STRONG><STRONG>FILTER</STRONG> can be used to restrict the display of Not Assigned nodes.</LI><BR /> </UL><BR /> It can be used for a field in the Hierarchy Directory view. The field needs in addition, a foreign-key association to a dimension view. This dimension view has also to be target of a foreign-key association defined in the dimension view which holds the hierarchy. The field with that foreign-key association must be a non representative key field. When the analytical engine resolves the 'Not Assigned' node, it derives a filter from the hierarchy’s name and applies this filter to the dimension values which have to be added to the 'Not Assigned' node. The other dimension values, which don't fulfil the filter criteria are ignored. In this case the hierarchy itself acts as a filter. The annotation can be used for key and for non-key fields in the Hierarchy Directory. Only constraint is that the field needs a foreign-key association.<BR /> With this feature you can improve the performance. It is only useful for hierarchies on dimensions with more than one key field and if one hierarchy should only contain leaves belonging to one value of a key field. A typical example is a cost center hierarchy. All cost centers of one hierarchy should belong to the same controlling area. Without this feature the analytical engine would also add cost centers of other controlling areas to the 'Not-Assigned' node. Notice that this happens independent of the filters used in a query. Therefore, in a query result there is no difference if the query contains a filter on the same controlling area. But the performance will be much better if the filter is also defined in the Hierarchy Directory.<BR /> <H2 id="toc-hId-570987525"><STRONG>Examples</STRONG></H2><BR /> <H3 id="toc-hId-503556739"><STRONG>Example 1: Without @HIERARCHY.NOTASSIGNEDNODE </STRONG></H3><BR /> <DIV><BR /> <DIV><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@EndUserText.label:</SPAN> <SPAN style="color: #335ca2">'Connection Hierarchy Directory View'</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2"><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/15206">@analytics</a></SPAN> <SPAN style="color: #335ca2">:</SPAN> <SPAN style="color: #335ca2">{</SPAN> <SPAN style="color: #335ca2">dataCategory:</SPAN> <SPAN style="color: #335ca2">#DIMENSION,</SPAN> <SPAN style="color: #335ca2">dataExtraction.</SPAN><SPAN style="color: #335ca2;text-decoration: underline">enabled:</SPAN> <SPAN style="color: #335ca2;text-decoration: underline">true</SPAN> <SPAN style="color: #335ca2">}</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@ObjectModel.representativeKey:</SPAN> <SPAN style="color: #335ca2">'hieid'</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">define</SPAN> <SPAN style="color: #7f0074;font-weight: bold">view entity</SPAN> <SPAN style="color: #000000;text-decoration: underline">ZOQ_CONNECTION_HIERARCHY_DIR</SPAN> <SPAN style="color: #7f0074;font-weight: bold">as</SPAN> <SPAN style="color: #7f0074;font-weight: bold">select</SPAN> <SPAN style="color: #7f0074;font-weight: bold">from</SPAN> <SPAN style="color: #000000">ZOQ_CONNID_HD</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">{</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@ObjectModel.text.element:</SPAN> <SPAN style="color: #335ca2">'hiertxt'</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">key</SPAN> <SPAN style="color: #000000">hieid</SPAN><SPAN style="color: #7f0074;font-weight: bold">,</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@Semantics.text:</SPAN> <SPAN style="color: #335ca2">true</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #000000">hiertxt</SPAN><SPAN style="color: #7f0074;font-weight: bold">,</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@Semantics.systemDate.</SPAN><SPAN style="color: #335ca2;text-decoration: underline">lastChangedAt:</SPAN> <SPAN style="color: #335ca2;text-decoration: underline">true</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #000000">last_changed</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">}</SPAN></P><BR /> Resultset will display Not assigned (REST_H) nodes<BR /> <BR /> </DIV><BR /> <P style="margin: 0px;overflow: hidden"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/all-4.jpg" /></P><BR /> &nbsp;<BR /> <BR /> </DIV><BR /> <H3 id="toc-hId-307043234"><STRONG>Example 2: With&nbsp;@HIERARCHY.NOTASSIGNEDNODE.SUPPRESSINDICATOR</STRONG></H3><BR /> <DIV><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@EndUserText.label:</SPAN> <SPAN style="color: #335ca2">'Connection Hierarchy Directory View'</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2"><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/15206">@analytics</a></SPAN> <SPAN style="color: #335ca2">:</SPAN> <SPAN style="color: #335ca2">{</SPAN> <SPAN style="color: #335ca2">dataCategory:</SPAN> <SPAN style="color: #335ca2">#DIMENSION,</SPAN> <SPAN style="color: #335ca2">dataExtraction.</SPAN><SPAN style="color: #335ca2;text-decoration: underline">enabled:</SPAN> <SPAN style="color: #335ca2;text-decoration: underline">true</SPAN> <SPAN style="color: #335ca2">}</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@ObjectModel.representativeKey:</SPAN> <SPAN style="color: #335ca2">'hieid'</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">define</SPAN> <SPAN style="color: #7f0074;font-weight: bold">view entity</SPAN> <SPAN style="color: #000000;text-decoration: underline">ZLR_CONNECTION_HIERARCHY_DIR</SPAN> <SPAN style="color: #7f0074;font-weight: bold">as</SPAN> <SPAN style="color: #7f0074;font-weight: bold">select</SPAN> <SPAN style="color: #7f0074;font-weight: bold">from</SPAN> <SPAN style="color: #000000">zoq_connid_hd</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">{</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@ObjectModel.text.element:</SPAN> <SPAN style="color: #335ca2">'hiertxt'</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">key</SPAN> <SPAN style="color: #000000">hieid</SPAN><SPAN style="color: #7f0074;font-weight: bold">,</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@Semantics.text:</SPAN> <SPAN style="color: #335ca2">true</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #000000">hiertxt</SPAN><SPAN style="color: #7f0074;font-weight: bold">,</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@Semantics.systemDate.</SPAN><SPAN style="color: #335ca2;text-decoration: underline">lastChangedAt:</SPAN> <SPAN style="color: #335ca2;text-decoration: underline">true</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #000000">last_changed</SPAN><SPAN style="color: #7f0074;font-weight: bold">,</SPAN></P><BR /> <P style="margin: 0"><STRONG><SPAN style="color: #335ca2">@Hierarchy.notAssignedNode.suppressIndicator:</SPAN> <SPAN style="color: #335ca2">true</SPAN></STRONG></P><BR /> <P style="margin: 0"><STRONG><SPAN style="color: #008000">'X'</SPAN> <SPAN style="color: #7f0074">as</SPAN> <SPAN style="color: #000000">suppressNotAssigned</SPAN></STRONG></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">}</SPAN></P><BR /> Resultset will not display Not Assigned (REST_H) nodes<BR /> <BR /> </DIV><BR /> <P style="overflow: hidden;margin-bottom: 0px"><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/supress_rest1.jpg" /></P><BR /> &nbsp;<BR /> <H3 id="toc-hId-110529729"><STRONG>Example 3: With&nbsp;@HIERARCHY.NOTASSIGNEDNODE.FILTER</STRONG></H3><BR /> <DIV><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@EndUserText.label:</SPAN> <SPAN style="color: #335ca2">'Connection Hierarchy Directory View'</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2"><a href="https://community.sap.com/t5/user/viewprofilepage/user-id/15206">@analytics</a></SPAN> <SPAN style="color: #335ca2">:</SPAN> <SPAN style="color: #335ca2">{</SPAN> <SPAN style="color: #335ca2">dataCategory:</SPAN> <SPAN style="color: #335ca2">#DIMENSION,</SPAN> <SPAN style="color: #335ca2">dataExtraction.</SPAN><SPAN style="color: #335ca2;text-decoration: underline">enabled:</SPAN> <SPAN style="color: #335ca2;text-decoration: underline">true</SPAN> <SPAN style="color: #335ca2">}</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@ObjectModel.representativeKey:</SPAN> <SPAN style="color: #335ca2">'hieid'</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">define</SPAN> <SPAN style="color: #7f0074;font-weight: bold">view entity</SPAN> <SPAN style="color: #000000;text-decoration: underline">ZLR_CONNECTION_HIERARCHY_DIR</SPAN> <SPAN style="color: #7f0074;font-weight: bold">as</SPAN> <SPAN style="color: #7f0074;font-weight: bold">select</SPAN> <SPAN style="color: #7f0074;font-weight: bold">from</SPAN> <SPAN style="color: #000000">zoq_connid_hd</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">association</SPAN> <SPAN style="color: #7f0074;font-weight: bold">to</SPAN> <SPAN style="color: #000000">ZOQ_AIRLINE</SPAN> <SPAN style="color: #7f0074;font-weight: bold">as</SPAN> <SPAN style="color: #000000">_carrid</SPAN> <SPAN style="color: #7f0074;font-weight: bold">on</SPAN> <SPAN style="color: #000000">_carrid</SPAN><SPAN style="color: #7f0074;font-weight: bold">.</SPAN><SPAN style="color: #000000">carrid</SPAN> <SPAN style="color: #7f0074;font-weight: bold">=</SPAN> <SPAN style="color: #7f0074;font-weight: bold">$projection.</SPAN><SPAN style="color: #000000">carrid</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">{</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@ObjectModel.text.element:</SPAN> <SPAN style="color: #335ca2">'hiertxt'</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">key</SPAN> <SPAN style="color: #000000">hieid</SPAN><SPAN style="color: #7f0074;font-weight: bold">,</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@Semantics.text:</SPAN> <SPAN style="color: #335ca2">true</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #000000">hiertxt</SPAN><SPAN style="color: #7f0074;font-weight: bold">,</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@Semantics.systemDate.</SPAN><SPAN style="color: #335ca2;text-decoration: underline">lastChangedAt:</SPAN> <SPAN style="color: #335ca2;text-decoration: underline">true</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #000000">last_changed</SPAN><SPAN style="color: #7f0074;font-weight: bold">,</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@ObjectModel.foreignKey.association:</SPAN> <SPAN style="color: #335ca2">'_carrid'</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #335ca2">@Hierarchy.notAssignedNode.filter:</SPAN> <SPAN style="color: #335ca2">true</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">cast(</SPAN> <SPAN style="color: #008000">'LH'</SPAN> <SPAN style="color: #7f0074;font-weight: bold">as</SPAN> <SPAN style="color: #000000;font-style: italic;text-decoration: underline">s_carr_id</SPAN> <SPAN style="color: #7f0074;font-weight: bold">)</SPAN> <SPAN style="color: #7f0074;font-weight: bold">as</SPAN> <SPAN style="color: #000000">carrid</SPAN><SPAN style="color: #7f0074;font-weight: bold">,</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #000000">_carrid</SPAN></P><BR /> <P style="margin: 0"><SPAN style="color: #7f0074;font-weight: bold">}</SPAN></P><BR /> Resultset will display Not Assigned(REST_H) node but only with LH as we have provided filter on carrid LH<IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/blog_attachments/2023/12/filter-2.jpg" /><BR /> <BR /> &nbsp;<BR /> <BR /> Following are some of correction which are done for this feature:<BR /> <BR /> 3348310 - Problem with Hierarchy.notAssignedNode.filter<BR /> 3377570 - Dump: GETWA_NOT_ASSIGNED in class CL_RSR_RRK0_HIERARCHY<BR /> <BR /> </DIV><BR /> &nbsp;<BR /> <BR /> &nbsp; 2023-12-19T23:56:31+01:00 https://community.sap.com/t5/technology-blogs-by-sap/cds-view-time-comparison/ba-p/13620651 CDS View: Time comparison 2024-02-28T22:27:29.400000+01:00 LinaRaut https://community.sap.com/t5/user/viewprofilepage/user-id/179963 <P><FONT color="#000000">This blog is about CDS scalar functions - CALENDER_SHIFT and CALENDER_OPERATIONS and how to use it in analytical queries for time comparison. Similarly FISCAL_CALENDAR_SHIFT and FISCAL_CALENDAR_OPERATION can be used.</FONT></P><P><FONT color="#000000">These CDS scalar functions are used to compare the measure value of current time period with previous time period. Further it can be used to calculate measure value for year to date (YTD), month to date (MTD) or quarter to date (QTD). Current member can only be used when time dimensions are in drilldown else restricted measure is used. The usage of current member is not as fast as restricted measure. Detail specification of the mentioned scalar functions can be found in Help.</FONT></P><H2 id="toc-hId-987850336">&nbsp;</H2><H2 id="toc-hId-791336831"><FONT color="#000000"><STRONG>Usage of Current Member</STRONG></FONT></H2><P><FONT color="#000000">This function can be used by modeling an association with the cube. In the ON-condition, the scalar functions are specified on the right side.</FONT></P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>association to ZOQ_FLIGHT as _previousMonth on _previousMonth.fyearMonth = calendar_shift( base =&gt; $projection.fyearMonth, base_level =&gt; calendar_date_level.#MONTH, shift =&gt; abap.int2'-1', shift_level =&gt; calendar_date_level.#MONTH )</code></pre><P>&nbsp;</P><P>&nbsp;</P><P><FONT color="#000000"><STRONG>Constraints:</STRONG></FONT></P><UL><LI><FONT color="#000000">Current member to work properly, we have to mark all the time fields which are related with annotation - @ObjectModel.value.derivedFrom. We should also specify semantics. </FONT><FONT color="#000000">for example,</FONT></LI></UL><P><FONT color="#000000">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<STRONG>key</STRONG> fldate,<BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<STRONG>@ObjectModel.value.derivedFrom: 'fldate'</STRONG><BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@Semantics.calendar.yearMonth: true<BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ EndUserText.label: 'FL Month'<BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_calday.calmonth <STRONG>as</STRONG> fyearMonth,&nbsp;</FONT><FONT color="#000000">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</FONT></P><UL><LI><FONT color="#000000">The base parameter must be filled with the same field name as it appears on the left: for example, the field name __previousMonth<STRONG>.</STRONG><SPAN><STRONG>fyearMonth</STRONG> &nbsp;&nbsp;should be same as base </SPAN><STRONG>=&gt;</STRONG> $projection<STRONG>.fyearMonth</STRONG></FONT></LI></UL><UL><LI><FONT color="#000000">The Semantics of field $projection.fyearMonth must match the base_level parameter. As In the cube view example, the fyearMonth field has the annotation &nbsp;@Semantics.calendar.yearMonth: true, &nbsp;base_level is specified as calendar_date_level<STRONG>.</STRONG>#MONTH.</FONT></LI><LI><FONT color="#000000">In the example to restrict the measure to the previous month, shift is set to -1 and shift_level is set to #MONTH. There is a constraint in using shift_level with base_level : for example for base level #MONTH, shift _level can be #MONTH,#QUARTER or #YEAR But can’t be #DAY.</FONT></LI></UL><P><FONT color="#000000">&nbsp;&nbsp;<STRONG>Example 1:&nbsp;</STRONG> Time comparison with time in drill-down (Current Member Variables)</FONT></P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>@AccessControl.authorizationCheck: #NOT_ALLOWED @EndUserText.label: 'Query: Current Memeber on Month' define transient view entity ZLR_PC_CM_1 provider contract analytical_query as projection on ZOQ_FLIGHT association to ZOQ_FLIGHT as _previousMonth on _previousMonth.fyearMonth = calendar_shift( base =&gt; $projection.fyearMonth, base_level =&gt; calendar_date_level.#month, shift =&gt; abap.int2'-1', shift_level =&gt; calendar_date_level.#month ) association to ZOQ_FLIGHT as _firstMonthOfQuarter on _firstMonthOfQuarter.fyearMonth between calendar_operation( base =&gt; $projection.fyearMonth, base_level =&gt; calendar_date_level.#month, operation =&gt; calendar_date_operation.#first, operation_level =&gt; calendar_date_level.#quarter ) and $projection.fyearMonth association to ZOQ_FLIGHT as _CMM1_CMP1 on _CMM1_CMP1.fyearMonth between calendar_shift( base =&gt; $projection.fyearMonth, base_level =&gt; calendar_date_level.#month, shift =&gt; abap.int2'-1', shift_level =&gt; calendar_date_level.#month ) and calendar_shift( base =&gt; $projection.fyearMonth, base_level =&gt; calendar_date_level.#month, shift =&gt; abap.int2'1', shift_level =&gt; calendar_date_level.#month ) { @AnalyticsDetails.query: { axis: #ROWS, totals: #SHOW } @EndUserText.label: 'Year Quarter' flquarter, @AnalyticsDetails.query: { axis: #ROWS, totals: #SHOW } @EndUserText.label: 'Year Month' fyearMonth, @AnalyticsDetails.query.axis: #FREE .hidden: true currency, @Semantics.amount.currencyCode: 'currency' paymentsum, _previousMonth.currency as PrevMonthCurrency, @Semantics.amount.currencyCode : 'PrevMonthCurrency' @EndUserText.label: 'Previous Month' _previousMonth.paymentsum as PrevMonthPayment, _firstMonthOfQuarter.currency as firstMonthOfQuartCurrency, @Semantics.amount.currencyCode : 'firstMonthOfQuartCurrency' @EndUserText.label: 'Quarter to today' _firstMonthOfQuarter.paymentsum as firstMonthOfQuartPayment, _CMM1_CMP1.currency as last3MonthCurrency, @Semantics.amount.currencyCode : 'last3MonthCurrency' @EndUserText.label: 'Previous month To next month' _CMM1_CMP1.paymentsum as CMM1_CMP1Payment } where flyear = '2019' and currency = 'EUR'</code></pre><P>&nbsp;</P><P>&nbsp;</P><P><FONT color="#000000"><STRONG>Result:</STRONG></FONT></P><P><FONT color="#000000"><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LinaRaut_2-1709031740486.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/71830iDE9646596608699E/image-size/large?v=v2&amp;px=999" role="button" title="LinaRaut_2-1709031740486.png" alt="LinaRaut_2-1709031740486.png" /></span></FONT></P><P><FONT color="#000000">In this Result</FONT></P><UL><LI><FONT color="#000000"><FONT color="#FF0000"><STRONG>Red</STRONG></FONT>- column Previous Month -shows value from previous month.</FONT></LI><LI><FONT color="#000000"><FONT color="#FFCC00"><STRONG>Yellow</STRONG></FONT>- column Quarter to Today- shows the aggregate values of previous months in this quarter.</FONT></LI><LI><FONT color="#000000"><FONT color="#339966"><STRONG>Green</STRONG></FONT>- column Gliding window of 3 month- shows aggregate value of previous month + current month + next month.</FONT></LI></UL><P>&nbsp;</P><H2 id="toc-hId-594823326"><FONT color="#000000"><STRONG>Usage of Restricted Measure</STRONG></FONT></H2><P><FONT color="#000000">This can be done using the CASE statement, where one of the scalar function is used.&nbsp;</FONT></P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code> case when fyearMonth = calendar_shift( base =&gt; $parameters.p_month, base_level =&gt; calendar_date_level.#MONTH, shift =&gt; abap.int2'-1', shift_level =&gt; calendar_date_level.#MONTH ) then paymentsum end as paymentPrev</code></pre><P>&nbsp;</P><P>&nbsp;</P><P><FONT color="#000000"><STRONG>Constraints:</STRONG></FONT></P><UL><LI><FONT color="#000000">The base parameter must be a parameter or a literal.</FONT></LI><LI><FONT color="#000000">The type of parameter or literal must match to &nbsp;base_level. In the example for base_level &nbsp;calendar_date_level.#MONTH, the type of parameter p_month must be NUMC6.</FONT></LI><LI><FONT color="#000000">In the example to restrict the measure to the previous month, shift is set to -1 and shift_level is set to #MONTH.</FONT></LI></UL><P><FONT color="#000000"><STRONG>Example 2:</STRONG> Time comparison (Restricted key figure)</FONT></P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>@AccessControl.authorizationCheck: #NOT_ALLOWED @EndUserText.label: 'Query: Current Memeber on Month' define transient view entity ZLR_PC_RSRT_SHIFT1 provider contract analytical_query with parameters p_month : /bi0/oicalmonth as projection on ZOQ_FLIGHT { @AnalyticsDetails.query: { axis: #ROWS, totals: #SHOW } carrid, currency, virtual currCur : abap.cuky, @Semantics.amount.currencyCode : 'currCur' @Consumption.dynamicLabel: { label: 'Bookings &amp;1', binding: [{ index : 1 , element : 'fyearMonth' }] } case when fyearMonth = $parameters.p_month then paymentsum end as paymentCur, virtual currPrev : abap.cuky, @Semantics.amount.currencyCode : 'currPrev' @Consumption.dynamicLabel: { label: 'Previous Bookings &amp;1', binding: [{ index : 1 , element : 'fyearMonth' }] } case when fyearMonth = calendar_shift( base =&gt; $parameters.p_month, base_level =&gt; calendar_date_level.#month, shift =&gt; abap.int2'-1', shift_level =&gt; calendar_date_level.#month ) then paymentsum end as paymentPrev, virtual currLastInYear : abap.cuky, @Semantics.amount.currencyCode : 'currLastInYear' @Consumption.dynamicLabel: { label: 'Bookings from &amp;1 To &amp;2', binding: [{ index : 1 , element : 'fyearMonth', replaceWith: #LOW }, { index : 2 , element : 'fyearMonth', replaceWith: #HIGH }] } case when fyearMonth between calendar_operation( base =&gt; $parameters.p_month, base_level =&gt; calendar_date_level.#month, operation =&gt; calendar_date_operation.#first, operation_level =&gt; calendar_date_level.#year ) and $parameters.p_month then paymentsum end as paymentToDate } where currency = 'EUR'</code></pre><P>&nbsp;</P><P>&nbsp;</P><P><FONT color="#000000"><STRONG>Result:</STRONG></FONT></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LinaRaut_3-1709031740488.png" style="width: 800px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/71829i4C6A60C9C4189EE8/image-dimensions/800x159?v=v2" width="800" height="159" role="button" title="LinaRaut_3-1709031740488.png" alt="LinaRaut_3-1709031740488.png" /></span></P><P><FONT color="#000000">In this example I have used @Consumption.dynamicLabel to dynamically set the column label with values calculated from parameter.</FONT></P><H2 id="toc-hId-398309821">&nbsp;</H2><H2 id="toc-hId-201796316"><FONT color="#000000">Release Info:</FONT></H2><P><FONT color="#000000">On-Prem SAP_BW from 7.58 and Cloud from 2308</FONT></P><H2 id="toc-hId-5282811"><FONT color="#000000">Related Notes:</FONT></H2><P><FONT color="#000000">3270090-CurrentMember + FemsN</FONT></P><P><FONT color="#000000">3359468-Current Member on reference characteristic and selection for Partial Time Characteristic</FONT></P> 2024-02-28T22:27:29.400000+01:00 https://community.sap.com/t5/technology-blogs-by-sap/cds-view-hierarchy-node-sign-reversal/ba-p/13599337 CDS View: Hierarchy node sign reversal 2024-04-15T13:30:04.285000+02:00 LinaRaut https://community.sap.com/t5/user/viewprofilepage/user-id/179963 <P><SPAN>This blog is about how to use @Semantics.signReversal in CDS Views</SPAN> <SPAN>to revert the sign of a measure in</SPAN> <SPAN>dependence of the settings of a hierarchy node. Analytic query offers the functionality to reverse a sign after aggregation based on a hierarchy node attribute.&nbsp;</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>This functionality shall be made accessible from a CDS Query,</SPAN> <SPAN>for this it is necessary to determine the hierarchy node attribute which stores the sign reverse indicator.</SPAN><SPAN>&nbsp;</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>To make use of the sign reversal feature in an analytical query, the following field needs to be added to the related hierarchy view:</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>@Semantics.signReversalIndicator</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; signref </SPAN><STRONG><SPAN>as</SPAN></STRONG><SPAN> signReversalFlag</SPAN><STRONG><SPAN>,</SPAN></STRONG><SPAN>&nbsp;</SPAN></P><P><FONT color="#0000FF"><STRONG><SPAN class=""><SPAN class="">Example</SPAN><SPAN class="">:</SPAN> <SPAN class="">Hierarchy </SPAN><SPAN class="">v</SPAN><SPAN class="">iew</SPAN></SPAN><SPAN class="">&nbsp;</SPAN></STRONG></FONT></P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>@AbapCatalog.sqlViewName: 'ZOQ_CONNIDHIER' @EndUserText.label: 'Connection Hierarchy View' @ObjectModel.dataCategory: #HIERARCHY @Hierarchy.parentChild : { name : 'ConnectionHierarchy', label : 'Connection', siblingsOrder: [{ by: 'seqno' , direction: 'ASC' }] , recurseBy : '_parent', directory: '_dir' } define view ZOQ_CONNECTION_HIERARCHY as select from zoq_connid_h association [0..1] to ZOQ_CONNECTION_HIERARCHY as _parent on $projection.parentid = _parent.nodeid association [1] to ZOQ_CONNECTION_HIERARCHY_DIR as _dir on $projection.hieid = _dir.hieid association [1] to ZOQ_CONNECTION_NODENAME as _node on $projection.hieid = _node.hieid and $projection.nodename = _node.nodeName and $projection.carrid = '' and $projection.connid = '0000' association [1] to ZOQ_AIRLINE as _airline on $projection.carrid = _airline.carrid and $projection.connid = '0000' association [1] to ZOQ_CONNECTION as _connection on $projection.carrid = _connection.carrid and $projection.connid = _connection.connid { @Consumption.filter: { mandatory : true, selectionType : #SINGLE, multipleSelections : false } @ObjectModel.foreignKey.association: '_dir' key hieid, key nodeid, parentid, seqno, @ObjectModel.foreignKey.association: '_airline' carrid, @ObjectModel.foreignKey.association: '_connection' connid, @ObjectModel.foreignKey.association: '_node' nodename, @Semantics.signReversalIndicator signref as signReversalFlag, _parent, _dir, _node, _airline, _connection } </code></pre><P>&nbsp;</P><P><FONT color="#0000FF"><SPAN><STRONG><SPAN class=""><SPAN class="">Preview:</SPAN></SPAN><SPAN class="">&nbsp;</SPAN></STRONG></SPAN></FONT></P><P><FONT color="#0000FF"><SPAN><STRONG><SPAN class=""><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="preview.png" style="width: 791px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95121i6179BCE8DA569035/image-size/large?v=v2&amp;px=999" role="button" title="preview.png" alt="preview.png" /></span></SPAN></STRONG></SPAN></FONT></P><P><SPAN>In CDS views with "Analytics.query : true"</SPAN><SPAN> or define as "transient view entity",</SPAN><SPAN> function "HRY_NODE_SIGN_VALUE(elemRef)" </SPAN><SPAN>is </SPAN><SPAN>used in a formula (AnalyticsDetails.query.formula). This function works in the following way</SPAN><SPAN>, </SPAN><SPAN>At first the path from the element to its hierarchy view is evaluated. In the hierarchy view there should exist exactly one field with semantics signReversal. For each hierarchy node for which the value of the sign reversal element returns space, the function HRY_NODE_SIGN_VALUE will return +1. If the value is not initial, the function returns -1. With this,</SPAN></P><P><SPAN>for example- </SPAN><SPAN>the formula</SPAN> <STRONG><SPAN>$projection.</SPAN></STRONG><SPAN>paymentsum </SPAN><STRONG><SPAN>*</SPAN></STRONG><SPAN> hry_node_sign_value</SPAN><STRONG><SPAN>(</SPAN></STRONG><SPAN> dimension </SPAN><STRONG><SPAN>=&gt;</SPAN></STRONG> <STRONG><SPAN>$projection.</SPAN></STRONG><SPAN>connid</SPAN><STRONG><SPAN>)</SPAN></STRONG> <STRONG><SPAN>as</SPAN></STRONG><SPAN> paymentsumSignRef</SPAN></P><P><SPAN>will return the key figure </SPAN><SPAN>paymentsum</SPAN><SPAN> for all nodes/leaves in the hierarchy with initial sign reversal indicator</SPAN><SPAN> and </SPAN><SPAN>It will return "- </SPAN><SPAN>paymentsum</SPAN><SPAN>" for all nodes/leaves with not initial sign reversal indicator.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>If there is no field with semantics signReversal in the hierarchy view, the function HRY_NODE_SIGN_VALUE always returns +1.</SPAN><SPAN>&nbsp;</SPAN></P><P><FONT color="#0000FF"><STRONG><SPAN class=""><SPAN class="">Example:</SPAN></SPAN><SPAN class=""> <SPAN class="">Analytical query</SPAN></SPAN><SPAN class="">&nbsp;</SPAN></STRONG></FONT></P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>@AccessControl.authorizationCheck: #NOT_ALLOWED @EndUserText.label: 'SIGN REVERSAL' @Metadata.ignorePropagatedAnnotations: true define transient view entity ZLR_SIGN_REV_FLIGHT_1 provider contract analytical_query with parameters @EndUserText.label: 'Hierarchy' @Consumption.defaultValue: 'CNTRY' p_hienm : char5 as projection on ZOQ_FLIGHT { @AnalyticsDetails.query.axis: #ROWS @AnalyticsDetails.query: { displayHierarchy: #ON, hierarchyBinding: [{ type : #PARAMETER , value : 'p_hienm' }] } connid, @AnalyticsDetails.query.axis: #FREE currency, @Semantics.amount.currencyCode: 'CURRENCY' @Aggregation.default: #SUM @AnalyticsDetails.query.axis: #COLUMNS curr_to_decfloat_amount( paymentsum ) as paymentsum, @AnalyticsDetails.query.axis: #COLUMNS @EndUserText.label: 'HierSignRev' @Aggregation.default: #FORMULA $projection.paymentsum * hry_node_sign_value( dimension =&gt; $projection.connid) as paymentsumSignRef }</code></pre><P>&nbsp;</P><P><FONT color="#0000FF"><STRONG>Result:</STRONG></FONT></P><P><FONT color="#0000FF"><STRONG><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.png" style="width: 761px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/95125iE96DEC39C036AD90/image-size/large?v=v2&amp;px=999" role="button" title="result.png" alt="result.png" /></span></STRONG></FONT></P><P><SPAN>In this example for Hierarchy ZOQ_CONNECTION_HIERARCHY (which is defined in the </SPAN><SPAN>ZOQ_FLIGHT)</SPAN><SPAN>, </SPAN><SPAN>signReversalFlag is set for Carried id 'A', 'JL', 'UA'. Therefore, in result of analytical query HierSignRev field is showing the –ve result of the booking total.</SPAN><SPAN>&nbsp;</SPAN></P><P><FONT color="#0000FF"><STRONG><SPAN>SAP Delivered Hierarchies:</SPAN></STRONG><SPAN>&nbsp;</SPAN></FONT></P><P><SPAN>There are few SAP delivered hierarchies which have this feature.</SPAN></P><P><SPAN>Following fields name:&nbsp;</SPAN><SPAN>FinancialStatementItem, </SPAN><SPAN>CnsldtnFinancialStatementItem, FinancialStatementLeafItem, GLAccount, etc.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>Can have this feature because they have foreign key association with dimension view which has hierarchy association to hierarchy view supporting this feature.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>For example:</SPAN><SPAN>&nbsp;</SPAN><SPAN>Field with name ‘</SPAN><SPAN>FinancialStatementItem</SPAN><SPAN>’ typically have a foreign key association to dimension view </SPAN><SPAN>I_CnsldtnFinStmntItem and corresponding hierarchy view </SPAN><SPAN>I_FinStmntItmHier will support this feature.</SPAN><SPAN>&nbsp;</SPAN></P><P><FONT color="#0000FF"><STRONG><SPAN>Constraints:</SPAN></STRONG><SPAN>&nbsp;</SPAN></FONT></P><P><SPAN>Only one element in a view of data category HIERARCHY can be marked with semantics signReversal. The data type of the element should be CHAR of length 1.</SPAN><SPAN>&nbsp;<SPAN class=""><SPAN class="">Allowed values are X or space.</SPAN></SPAN><SPAN class="">&nbsp;</SPAN></SPAN></P><P><FONT color="#0000FF"><STRONG><SPAN>Related Note:</SPAN></STRONG><SPAN>&nbsp;</SPAN></FONT></P><P><SPAN>1385580 - How does a formula variable with a replacement path work?</SPAN><SPAN>&nbsp;</SPAN></P><P><FONT color="#0000FF"><STRONG><SPAN>Availability:</SPAN></STRONG><SPAN>&nbsp;</SPAN></FONT></P><P><SPAN>This feature is available from </SPAN><SPAN>S/4HANA 1909 (ABAP Platform 7.54).</SPAN><SPAN>&nbsp;</SPAN></P> 2024-04-15T13:30:04.285000+02:00