36 1 5MB
5Steps2Analytics – Custom Analytical Fiori Application Analytical Query for WebDynpro Grid Public
Brought to you by: SAP Enterprise Support Value Maps SAP Analytics Solutions
SAP S/4HANA Regional Implementation Group
TABLE OF CONTENTS Introduction ..................................................................................................................................................... 3 Prerequisites ................................................................................................................................................... 5 Exercise 1: Check the Virtual Data Model ...................................................................................................... 6 Exercise 2: Execute an Analytical Query ..................................................................................................... 11 Exercise 3: Create Analytical Query using Custom Analytical Queries ..................................................... 18 Exercise 4: Create Multidimensional Reporting Application ...................................................................... 32 Optional - Exercise 5: Consume Analytical Query from Analysis Office.................................................... 42 Optional - Exercise 6: Create an Analytical Query Using ADT .................................................................... 48
2
Introduction The purpose of this hands-on is to understand the creation and use of Analytical Query, a type of CDS view, and how to use the predefined VDM. The communication protocol commonly used in Fiori applications is OData Service, but only analytical apps use Analytical Queries that communicate with the Transient Provider. CDS views created as Analytical Queries can be used in the same way as BW queries.
In this Step4, you learn how to create a custom Analytical Query (Consumption View) using a predefined VDM (Interface View). Furthermore, you also learn how to register the created Analytical Query as a Fiori application.
3
Hands-on exercises This hands-on consists of the following exercises: Exercise 1: Review how to investigate Virtual Data Models (VDMs) Exercise 2: Execute standard Analytical Query “C_GLLINEITEMSQ0001” with T-cd: RSRT and check how it works Exercise 3: Create an Analytical Query “ZZ1_GLITEMQ_XXX” with Fiori Key User Tool “Custom Analytical Query” Exercise 4: Create Fiori Multidimensional Reporting Application from “ZZ1_GLITEMQ_XXX” with Launchpad Designer Optional - Exercise 6: Create an Analytical Query “ZXC_ GLITEMQ_XXX” with ABAP Development Tools Note: Replace XXX in the hands-on steps with a unique string or assigned number in order not to overlap the technical name within the S/4HANA system. In this document, all screen shots use "00" (2 digit) as a unique number. *Multidimensional reporting in Exercise 4 can also be created using BW query as a source. The BPC Optimized for S/4HANA Fiori Multidimensional Reporting app has created a BW query in its source.
4
Prerequisites For the following exercises to work satisfactorily, the following needs to be considered. [PFCG roles] It is assumed that you have the following roles in addition to SAP_ALL profile: l
l
SAP_BR_ANALYTICS_SPECIALIST Ø
F2170 View Browser
Ø
F1572 Custom Analytical Queries
SAP_BR_EMPLOYEE Ø
F1068 Query Browser
[Tool] l
Web Browser Google Chrome / Edge (Chromium) / Firefox are recommended.
l
(Optional) ABAP Development Tools In order to do Exercise 6 (Optional), ABAP Development Tools must be installed. If you want to follow Exercise 6 (Optional), refer to the guide below for installation. Note that if you have already installed ADT in an older version, you do not need to perform this task. Installing ABAP Development Tools Chapter 6 “Installation” describes the prerequisites and installation steps.
[User] In this Hands-on content, DEVELOPERXXX is assumed to be used where XXX stands for a pre-assigned 3-digit number. It is assumed that DEVELOPERXXX have the roles listed above. In the screenshots, “DEVELOPER00” (2 digits) is used to show Hands-on steps. If a user has PFCG Roles listed above on S/4HANA system, you can go through this Hands-on with the user.
5
Exercise 1: Check the Virtual Data Model In this exercise, you will see two different Virtual Data Models (predefined CDS views): We will also use the Fiori app F2170 View Browser to explore VDMs. l I_GLAccountLineItemCube … it is a VDM, which acts as a data source (Cube) used throughout this hands-on. l C_GLLineItemsQ0001 … An Analytical Query used in the standard Fiori app F0956A Journal Entry Analyzer. Steps / Comments
Screenshots
1.
Start by reviewing and exploring CDS Views using Fiori application. Log on to Fiori Launchpad with your user. URL: https://:/sap/bc/ui2/flp#Shell-home URL in CAL: https://vhcals4hcs.dummy.nodomain:44301/ sap/bc/ui2/flp#Shell-home
Information provided here is an example only. Same applies throughout document. If you would like to use the Cloud Appliance Library you will need to subscribe and set up your account: https://cal.sap.com/
6
Steps / Comments 2.
Screenshots
Launch the Fiori app F2170 View Browser from the "Query Design" group. Select the “Query Design” Group and click the tile “View Browser”. * PFCG Role “SAP_BR_ANALYTICS_SPECIALIST“ i s required
3.
You can see the list of CDS Views. In the header part, there are icons for each VDM type. You can click them to filter CDS Views by its VDM type.
4.
For example, if you are looking for “a data source VDM for G/L Account”, you might be able to proceed as follows: A) Enter "G/L" in the search window B) Click the “Data Category” column and filter as follows: l
“Data Category” contains “Cube” … because we want to find
Enter "G/L" in the search window
Filter by "Data Category" contains "Cube"
7
Steps / Comments
Screenshots
data source l
5.
“Name” starts with “I_” … because we want to specify Interface View
Then the associated “Cube” VDMs are selected. In the selected list, there is also the VDM “I_GLAccountLineItemCube” that we use later. Click and see what’s in it.
Filter by "Name" starts with "I_"
Click "I_GLAccountLineItemCube"
8
Steps / Comments 6.
Here you can view the metadata of the selected VDM. You can see the names of the columns and their data elements, the Annotations that are configured, and the dependencies between the objects.
7.
For other examples, if you want to search VDMs that SELECT from a physical table “ACDOCA" and work as dimension, you can do as follows: • Remove filters which we configured in the previous step • Enter "ACDOCA" in search window • Click “Basic” icon on the header area VDMs which have ACDOCA as a source table appear. In addition, you could filter "Basic" type VDM from here.
Screenshots
Remove filters
Enter “ACDOCA” and click “Basic” icon
9
Steps / Comments
Screenshots
In this chapter, we learned the following point: • How to look for Virtual Data Models from F2170 View Browser and check its metadata
10
Exercise 2: Execute an Analytical Query Analytical Query, one of the types of CDS views, can be used on the front side just like BW queries. Analytical Query allows OLAP operations such as drill down, slicing, and so on. In this exercise, we run an Analytical Query "C_GLLINEITEMSQ0001" - which is used by Standard Fiori app F0956 Journal Entry Analyzer – in BW query test transaction T-cd: RSRT. Then perform OLAP operations such as drill down and understand the characteristics of Analytical Query. Finally, we check the definition of the CDS View which generates the Analytical Query. Steps / Comments
Screenshots
1. Check the query name of F0956 Journal Entry Analyzer. Go To the URL below to show the details of this application.
IMPLEMENTATION INFORMATION -> Configuration
https://fioriappslibrary.hana.ondemand.c om/sap/fix/externalViewer/#/detail/Apps( 'F0956')/S19OP Navigate as follows: IMPLEMENTATION INFORMATION -> Configuration -> BEx Query Take a memo of its technical name – “2CCFIGLLITMQ0001”. This is an Analytical Query to be executed on this exercise. BEx Query
11
Steps / Comments
Screenshots
2. Execute the query in test tool. Login your S/4HANA system with WebGUI and run T-cd: RSRT. [WebGUI URL] https://:/sap/bc/gui/sap/it s/webgui [WebGUI URL in CAL] https://vhcals4hcs.dummy.nodomain:44301/ sap/bc/gui/sap/its/webgui 3. Enter the query name "2CCFIGLLITMQ0001" that you have investigated in Fiori apps library earlier, and press Enter.
4. "2CIFIGLLITMCUBE/2CCFIGLLITMQ00 01" is automatically filled in. It means that the entered query is recognized by the system. Then select “WD Grid” in “Query Display” option. Press “Execute” button to execute the Analytical Query.
12
Steps / Comments
Screenshots
5. Enter the filter values in the search screen and execute the result:
Search Screen
•
Company Code: 1710
•
Ledger:0L
•
Ledger Fiscal Year: 2021
* The input values above are examples in CAL environment. The system displays the results. Result
13
Steps / Comments 6. OLAP Operation 1: Exclude Company Code.
Screenshots Exclude Company Code
Press “Navigation Panel” on the upper left of the screen. In the navigation panel, right click “Company Code” and navigate to “Remove Drilldown”. The system excludes the Company Code from the table on the right of the screen.
Result
14
Steps / Comments 7. OLAP Operation 2: Expand Cost Center vertically (drill down). In the navigation panel on the left of the screen, press " " next to Cost Center. In the table on the right of the screen, Cost Center is expanded.
Screenshots Cost Center Drilldown
Result
15
Steps / Comments
Screenshots
8. Let’s investigate the CDS View which generated this query. Enter T-cd: SE11.
9. Enter "CFIGLLITMQ0001" on View" field and press "Display". * The naming convention of the query, which is generated from CDS View, is "2C" + . Therefore, we remove the prefix "2C" from the technical name and search the view name here. This concept is also explained in the following exercises. 10. You can see the below information: • CDS Database View name (= SQL View name of the CDS View): CFIGLLITMQ0001 • Data Definition (= Name of the CDS View): C_GLLINEITEMSQ0001 Here we get the name of CDS View. Double click the CDS View name “C_GLLINEITEMSQ0001”.
16
Steps / Comments
Screenshots
11. You can see that the definition of CDS View is also visible on WebGUI (or SAPGUI) without ADT.
•
•
Let’s check 2 annotations below: @Analytics.query: true A CDS View generates an executable query if this annotation is added. @AbapCatalog.sqlViewName: 'CFIGLLITMQ0001' Defines the name of SQL View. SQL View is on the database layer and has different technical name from its CDS View. If @Analytics.query: true is also added, the technical name of the query is defined based on SQL View name as explained in previous step. Query name: "2C" +
In this exercise, we learned the following points: • How an Analytical Query works • How to check the CDS View definition of the query and the technical architecture
17
Exercise 3: Create Analytical Query using Custom Analytical Queries In this exercise, you will create an Analytical Query using F1572 Custom Analytical Queries, one of the Key User Extensibility Tools. Analytical Query is a type of CDS view that allows OLAP operations such as drill down (can be used in the same way as BW queries). In addition to being able to create Analytical Query in ADT (see Exercise 6), F1572 Custom Analytical Queries is provided as one of the Key User Extensibility Tools. In this exercise, you will use this tool to create an Analytical Query. In addition to this, this exercise uses the predefined VDM "I_GLAccountLineItemCube" as the source. It is also intended to understand the creation of content using predefined VDMs. Steps / Comments
Screenshots
1. Launch the Fiori app F1572 Custom Analytical Queries. Select the “Query Design” group and click the tile “Custom Analytical Queries”. *PFCG Role “SAP_BR_ANALYTICS_SPECIALIST” is required
2. Create a new Analytical Query. Press “Create”.
18
Steps / Comments
Screenshots
3. Configure the query name, the data source, and a prefix is set automatically. l Query Name: “ZZ1_” + GLITEMQ_XXX l DataSource: I_GLACCOUNTLINEITEMCUBE Replace XXX with a unique string or assigned number.
4. Sets the Label. l
Label: Custom Analytical Query CAQ XXX
5. Press "Field Selection" and go to the field selection screen.
Press "Field Selection"
19
Steps / Comments
Screenshots
6. Add the measure “AmountIn CompanyCodeCurrency”.
Add the measure “AmountInCompanyCodeCurrency”
Type "AmountIn" in the search window to search. Add the measure by clicking “Selection” checkbox.
7. Add the following fields in the same way:
Selected fields in this step
- Controlling area (ControllingArea) - Cost center (CostCenter) - Segment - G/L account (GLAccount) - Fiscal year (FiscalYear) And, exclude the following by pressing icon: - Account Assignment (AccountAssignment) Selected fields should be like the screenshot on the right. 8. Configure the display settings for each field. Press “Display” to go to the configuration screen and select "Fiscal Year".
Press “Display” and “Fiscal Year”
20
Steps / Comments
Screenshots
9. Set as follows:
Fiscal Year
l
Display Result: Check
l
Dimension Format: Text
l
Axis: Row
10. Select “G/L Account” and set as follows: l
Dimension Format: Key and Text
l
Axis: Row
l
Enable Hierarchy: Check
l
Hierarchy ID: YCOA
G/L Account
21
Steps / Comments
Screenshots
11. Make your filter settings. Press “Filters” to go to the filter settings screen and select “Fiscal year”.
Press “Filters” and “Fiscal Year”
12. Set as follows:
Fiscal Year
l Select 'User Input Values' l Mandatory: Check l Default value: 2021
22
Steps / Comments
Screenshots
13. Press “Save Draft” on the bottom right of the screen to save the draft. And, press “Preview” to execute.
Save Draft
Preview
14. Press “Preview” to the right of “Save Draft” to execute.
Prompt
Fiori Design Studio launches, reads the query you just created, and executes the report. A prompt displays the filter for the fiscal year you have set. Click OK to view the results. Result
23
Steps / Comments
Screenshots
15. Move the “Cost Center” in the “Dimensions” to the “Rows” on the left side of the screen. You can see that the dimension “Cost Center” is expanded.
Expand Cost Center
Result
24
Steps / Comments
Screenshots
16. Publish.
Back
Return with the "Back" button and press the "Publish" button at the bottom right of the screen to publish the Analytical Query you created. Publish
17. Execute the Analytical Query you created from the Query Browser.
Back to Home and launch Query Browser
Press the home button, go back to the home screen, and press “F1068 Query Browser” from “Query Browser” group. * PFCG role “SAP_BR_EMPLOYEE” is required
18. Execute the query.
Search 'ZZ1_GLITEMQ_XXX'
Set the Analytical Query 'ZZ1_GLITEMQ_XXX' to your search criteria, search and execute. Click the search results to view the definition.
25
Steps / Comments
Screenshots
19. Press “Open for Analysis” to launch Fiori Design Studio screen and run multi-dimensional reports.
You can check the query definition - Press “Open for Analysis” on the right bottom corner.
The query is displayed as we saw earlier.
26
Steps / Comments
Screenshots
20. The query definition can be saved as a tile for yourself in a group and launched later from the FLP. Click on the icon in the upper right corner of the screen and press “Save as Tile”. Set the following and press OK:
Select "Save as Tile"
l Title: Custom Query View XXX l Group: My Home Note: Replace XXX with a unique string or assigned number.
27
Steps / Comments
Screenshots
21. Launch the saved view from FLP.
Back to Home and launch the Tile
Go back to the FLP home screen. Click on the tile “Custom Analytical Query View XXX” on “My Home”.
Result
28
Steps / Comments
Screenshots
22. Check its name of the query. You created the Analytical Query “ZZ1_GLITEMQ_XXX” explicitly. In fact, it generates an executable query in the background with a different technical name. You must investigate the name of that generated query to proceed to next Exercise.
Press gear icon -> Information…
Press gear icon on the screen and jump to “Information…”.
23. Then you can see the Information of the Analytical Query. Please take a memo of your “Query Name”. It will be needed in the following exercise to create a Fiori application.
Check your “Query Name” – in this case “2CZZ1_GLITEMQ__1”
29
Steps / Comments
Screenshots
[Comment] What is the naming convention for the query? When a CDS view is given “@Analytics.query: true”, an executable query is created in the background. The created query has a different technical name from the CDS View itself. The naming convention of the query is as follows:
2C In the case of ZZ1_GLITEMQ_XXX above, the SQL View was named “ZZ1_GLITEMQ__1” automatically. Then, the query name is "2CZZ1_GLITEMQ__1". Transaction RSRT 24. Check your query can be executed also from T-cd: RSRT. Start WebGUI and execute transaction RSRT. [WebGUI URL] https://:/sap/bc/gui/sap/its /webgui [WebGUI URL in CAL] https://vhcals4hcs.dummy.nodomain:44301 /sap/bc/gui/sap/its/webgui 25. Specify an object name for the query name with the following name: l
Enter Query Name
2C
In the case of this screenshot, it will be 2CZZ1_GLITEMQ__1. 26. Please do not forget to set “WD Grid” on “Query Display” option.
Set “WD Grid” on “Query Display” and Execute
Execute the query.
30
Steps / Comments
Screenshots
27. Enter “2021” as a Fiscal Year and aggregated data is on the screen.
Enter Fiscal Year and execute
In this exercise, we learned the following points: • How to create an CDS View which is published as an Analytical Query using F1572 Custom Analytical Queries, one of the Key User Extensibility Tools • The created query has a different technical name from the CDS View itself, and can also be executed from T-cd : RSRT.
31
Exercise 4: Create Multidimensional Reporting Application In this exercise, you will create a Fiori Multidimensional Reporting application. Analytical Query created in Exercise 3 can be run from Query Browser and saved as a tile. However, it cannot be shared with other users yet. To make it available to any user, you need to create a separate custom tile. You will create tiles in Launchpad Designer, in which you create apps by using the Web Screen Grid screen framework (FPM_BICS_OVP) and assigning it a query name (2C) as a parameter. Until S/4HANA 1909, a standard multidimensional report was created with “Fiori Design Studio” that was also run in the Exercise 3, but from 2020 it is basically replaced by a WebDynpro Grid based application. Please check the following SAP Blog for details if you are interested. It also explains how to create multi-dimensional analysis apps with Fiori Design Studio that are not included in this exercise and how to configure them in detail. How to create custom Fiori Multidimensional Reporting Application in S/4HANA on-premise In this exercise, Launchpad Designer is used to create a custom Catalog / Tile. You can also use a new Fiori application Manage Launchpad Business Catalogs to create a custom Catalog as also introduced in Step2. Please refer to the SAP Blog to see more details. SAP Fiori for SAP S/4HANA – Overview of tools for maintaining custom launchpad content and layout | SAP Blogs Steps / Comments
Screenshots
1. Launch Launchpad Designer. [Launchpad Designer URL] https://:/sap/bc/ui5_ui5/sap/arsrvc_upb_admn/main.html?scope=CUST&sap-language=EN [Launchpad Designer URL in CAL] https://vhcals4hcs.dummy.nodomain:44301/sap/bc/ui5_ui5/sap/arsrvc_upb_admn/main.html?scope=CUST&sap-client=100&saplanguage=EN 2. Create your catalog. Select “Catalogs” tab and press the “Plus” icon corner.
on the lower left
32
Steps / Comments
Screenshots
3. Enter as follows and Save. •
Title: Hands-on Catalog XXX
•
ID: ZCAT_HANDSON_XXX
Note: Replace XXX with a unique string or assigned number.
4. Create a tile.
Create Tile on the catalog
Click Add Tile to launch “App Launchpad – Static”.
App Launcher - Static
33
Steps / Comments
Screenshots
[Comment] Understand "Semantic Object", "Action" and "Target Mapping" In the following steps, we are going to do following things: l
Set "Semantic Object" and "Action" to a Fiori tile. It uniquely determines an URL for the created tile, as described in the slide on the right section. The combination of "Semantic Object" and "Action" is called "Intent".
l
Create a "Target Mapping" for the "Intent". "Target Mapping" is the bridge between "Intent" and Analytical Query in this Hands-on.
These configurations enable a Tile to run the designated query when it is pressed. 5. Make the following settings and save:
Tile Definition
l Title: Custom Multidimensional Report XXX l Icon: optional. (e.g.) sap-icon://Fiori2/F0003 l Semantic Object: MultiTestXXX l Action: analyze Note: Replace XXX with a unique string or assigned number. Press “Save” on lower right of the page after your settings have done. 34
Steps / Comments
Screenshots
6. You can see that a tile is created in your Catalog.
7. Create a Target Mapping for the Semantic object/Action(=Intent) you configured in the tile.
Target Mapping -> Create Target Mapping
Click on “Target Mapping” tab, then click on “Create Target Mapping” on the bottom right of the screen under.
35
Steps / Comments 8. Enter as follows:
Screenshots Intent section / Target section / General Section
Intent section: l
Semantic Object: MultiTestXXX
l
Action: analyze
l
Application Type: Web Dynpro
Target section: l
Title: Custom Analytical Query with WD Grid XXX
l
Application: FPM_BICS_OVP
l
System Alias: S4FIN (in CAL system)
Note: Replace XXX with a unique string or assigned number. * "FPM_BICS_OVP" is a technical application name of WebDynpro Grid.
Result:
General section: l
Exclude Device Types: Tablet, Phone
l
Parameters: Ø
Name=bsa_query
Ø
Defalut Value=2C *e.g. 2CZZ1_GLITEMQ__1
Save after all settings have done. 36
Steps / Comments
Screenshots
9. Create a PFCG role which include the authorization to the catalog you created. Logon with WebGUI and enter T-cd: PFCG. [WebGUI URL] https://:/sap/bc/gui/sap/it s/webgui [WebGUI URL in CAL] https://vhcals4hcs.dummy.nodomain:443 01/sap/bc/gui/sap/its/webgui 10. Create a single role. Role: Z_HANDSONROLE_XXX Note: Replace XXX with a unique string or assigned number. 11. Go to “Menu” tab -> SAP Fiori Launchpad -> Launchpad Catalog
37
Steps / Comments
Screenshots
12. Enter as follows: Catalog ID: ZCAT_HANDSON_XXX Note: Replace XXX with a unique string or assigned number.
13. Go to “User” tab and enter your user ID and Save it.
Assign your user and Save
38
Steps / Comments
Screenshots
14. Check if you can access the Catalog. Go back to Fiori Launchpad and refresh the browser to read the added PFCG role.
Refresh the browser
15. Then go “App Finder”. You will be able to see your Catalog “Hands-on Catalog XXX” on it.
App Finder
Move to the Catalog and assign the tile in the Catalog to “My Home”.
Assign created tile to My Home
39
Steps / Comments 16. Execute the app and check the result.
Screenshots Launch Tile
Click on the tile.
17. The app for Multidimensional Analytical Reporting appears on the screen of the Web Dynpro Grid. Make sure the filter for the fiscal year is set and click “Go”.
40
Steps / Comments
Screenshots
18. Verify that the results come back.
In this exercise, we learned the following points: • How to create a WebDynpro Grid application from your custom Analytical Query • The concept of « Target Mapping », « Semantic Object », « Action » to create a tile
41
Optional - Exercise 5: Consume Analytical Query from Analysis Office In this exercise, we will use Analysis Office to consume Analytical Query on S/4HANA and realize multidimensional reporting. The Analytic Query can be used from the front-end tools in the same way as BW queries, so it can be used in the BusinessObjects tools – like Analysis Office - without WebDynpro Grid framework. Steps / Comments
Screenshots
1. Start Analysis Office. Click on Windows flag " " and search "Analysis for Microsoft Excel". MS Excel should be launched.
42
Steps / Comments
Screenshots
2. Access Analytical Query. Proceed as follows: •
Select "Analysis" tab,
•
Click on "Insert Data Source"
•
Click on "Select Data Source for Analysis…".
3. A logon prompt appears. Please skip this prompt.
43
Steps / Comments
Screenshots
4. Here you can select SAP systems on your SAPGUI Logon pad. Select the system where you created your Analytical Query and press "Next".
5. Enter your User DEVELOPERXXX and password. Note: Replace XXX with a unique string or assigned number.
44
Steps / Comments
Screenshots
6. "Insecure Connection" prompt may appear. Please press "Continue" to go further.
7. Find and select the following query •
2C (See Exercise 4 )
(e.g.) 2CZZ1_GLITEMQ__1
45
Steps / Comments
Screenshots
8. Check the prompt is set correctly and press "OK".
9. Analytical Query is called from Analysis Office and it is now visible on your client. Let's add a dimension dynamically. Drag-and-drop the "Cost Center" column into "Rows" between "Fiscal Year" and "G/L Account".
46
Steps / Comments
Screenshots
10. "Cost Center" is added and data is reaggregated. We now experienced that Analysis Office can also dynamically analyze multidimensional report in the way WebDynpro Grid and Fiori Design Studio do.
47
Optional - Exercise 6: Create an Analytical Query Using ADT In this exercise, we use ADT to create an Analytical Query “ZXC_GLITEMQ_XXX”. Analytical Query is a type of CDS view that is created by adding “@Analytics.query: true” annotation in the CDS View definition. In the CDS view with this annotation we can add analytic annotations to make settings specific to analytical scenario. The purpose of this exercise is to understand that Analytical Queries can be created not only by “Custom Analytical Queries” from Exercise 3, but also created by ADT. Steps / Comments
Screenshots
1. Start Eclipse. 2. Right click on the ABAP Project (which you logged on to) that you created in advance and click New -> Other .
48
Steps / Comments
Screenshots
3. Choose ABAP -> Core Data Services -> Data Definition and click Next
4. On this page of the wizard, specify a name and description for the CDS view. l
Package: $TMP
l
Name: ZXC_GLITEMQ_XXX
l
Description: CustomAQ with ADT XXX
Note: Replace XXX with a unique string or assigned number.
49
Steps / Comments
Screenshots
5. Not assigned to a transport request since you assigned it to the package $TMP in the previous step. Click Next.
6. In the wizard, select the default template “Define View” and click Finish.
50
Steps / Comments
Screenshots
7. A default CDS view is created in the template.
8. Copy the source code on the right and paste it into the ADT edit screen. When doing so, Replace XXX with a unique string or assigned number. There are three places in total to replace. Also check the following points: l
@Analytics.query: true is defined
l
You have specified the name of the SQL View on the first line. The name here is prefixed with 2C and a query is generated.
@AbapCatalog.sqlViewName : 'ZXCGLITEMQXXX' @Analytics.query: true @OData.publish: true @EndUserText.label: 'Custom Analytical Query CAQ XXX' define view ZXC_GLITEMQ_XXX as select from I_GLACCOUNTLINEITEMCUBE { @AnalyticsDetails.query.totals: #SHOW @AnalyticsDetails.query.display: #TEXT @Consumption.filter :{ selectionType: #SINGLE, multipleSelections: false, mandatory: true, defaultValue: '2021' } @AnalyticsDetails.query.axis:#ROWS FiscalYear, @AnalyticsDetails.query.display: #KEY_TEXT @AnalyticsDetails.query.axis:#ROWS @AnalyticsDetails.query.displayHierarchy: #ON @AnalyticsDetails.query.hierarchyInitialLevel: 3 @AnalyticsDetails.query.hierarchyBinding : [ {type :#CONSTANT,value :'YCOA'} ] GLAccount, ControllingArea, Segment, CostCenter, AmountInCompanyCodeCurrency }
51
Steps / Comments 9. Save your changes ( CDS View.
Screenshots Activate (
)
10. Use transaction RSRT in WebGUI to run the Analytical Query and check the results of the execution. [WebGUI URL] https://:/sap/bc/gui/sap/it s/webgui [WebGUI URL in CAL] https://vhcals4hcs.dummy.nodomain:44301/ sap/bc/gui/sap/its/webgui 11. Run the Analytical Query. Enter as follows and Execute: l
Query Name: 2CZXCGLITEMQXXX (2C) Note: Replace XXX with a unique string or assigned number.
l
Query Display: “WD Grid”
Execute transaction “RSRT”
Query: “2C”
Query Display: “WD Grid” -> Execute
52
Steps / Comments
Screenshots
12. On the prompt, enter the following:
Prompt
l
Fiscal Year: 2021
Check that the query is executed, and data is shown.
Result
53
www.sap.com/contactsap
© 2021 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forwardlooking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they should not be relied upon in making purchasing decisions. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies. See www.sap.com/trademark for additional trademark information and notices.