Extending a SAP HANA Live ViewDescripción completa
sap hana video training courses of 70 hrsFull description
Descripción: SAP-HANA
fiori
Description : HCP
Description : Complete tutorial on SAP HANA
Complete tutorial on SAP HANAFull description
SAP System Refresh HANA
Admin guide
ha
SAP Hana S4Full description
Descripción: SAP HANA Certification Questions_PART2
Full description
SAP HANA practical guide
SAP HANA.. Sap S/4 HANA.. Modules. Simple Finance.. Simple Logistics This Presentation is based on the Intro of SAP HANA and a bit of description regarding Simple Finance and Simple Log…Description complète
Complete tutorial on SAP HANA
SAP HANA Interactive Education (SHINE) for SAP HANA 2.0 SPS02
List of current HANA Cloud versions with pricingFull description
HA450
Full description
List of current HANA Cloud versions with pricingDescripción completa
ABAP- HANA developement
Akash Kumar
Building and Extending SAP HANA®Live Views
~ Rheinwerk® Pub is'1ing Bonn • Boston
What You'll Learn Nowadays, the connected wor.ld generates a vast amount of data at a significant rate. With the right tools, this data can help companies answer many questions about their customers and their products, such as who they are, what they do, and how they do it. SAP HANA can provide real-
time analytics on both structured and unstructured data, and SAP HANA Live enhances these capabilities even more. In this E-Bite, you'll get step-by -step instructions on working with SAP HANA Live views. Start by learning how to build private, reuse, query, and value help views, and then find out how to extend these views for common requirements such as including or excluding fields or including custom tables. Finally, you'll round off your knowledge with steps on how to integrate SAP HANA Live with SAP BusinessObjects BI and SAP BW. 1
Introduction to Virtual Data Models 1.1 1.2 1.3 1.4 1.5
2
3
5
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . Types of Virtual Data Models . . . . . . . . . . . . Viewing SAP HANA Live Virtual Data Models Basic Virtual Data Modeling Rules . . . . . . . . . Basic Virtual Data Modeling Terms . . . . . . . .
.. .. .. .. ..
5 7 9 11 12
Building SAP HANA Live Views . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.1 2.2 2.3 2.4
. . . .
15 19 23 26
Extending SAP HANA Live Views . . . . . . . . . . . . . . . . . . . . . . . .
29
3.1 3.2 3.3 3.4
30 34 38 41
Private Views . . . Reuse Views . . . . Query Views . . . . Value Help Views
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
.. . ... .. . ...
. . . .
. . . .
. . . .
.. .. .. ..
. . . .
. . . .
. . . .
. . . .
.. .. .. ..
. . . . .
.. .. .. ..
. . . . .
. . . .
. . . . .
. . . .
.. .. .. .. ..
.. .. .. ..
In cluding Unexposed Fields from a Standard Model Exclud ing Unnecessary Fields from t he Query View In cluding Custom Tables ............... In cluding Custom Fields . . . . . . . . . . . . . . . . . . . .
. . . . .
. . . .
. .. .. ..
. . . . .
. . . .
. . . .
. . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
4
4
Integrating SAP HANA Live Views with SAP Business Intelligence Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 4.2
5
1
45
Integrating SAP HANA Live and SAP BusinessObjects 81 . . Integrating SAP HANA Live a nd SAP BusinessObjects Bl Tools with SAP BW . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SAP HANA Live, which is built on top of SAP HANA, provides new highquality analytics and reporting capabilities to SAP Business Suite. Its purpose is to provide virtual data models (known as SAP HANA Live views) that expose data for reporting to SAP BusinessObjects BI tools via OData, HTTPS, or SQL/MDX.
In this section, we 'll introduce you to the basics of virtual data models: their architecture, their types , options for viewing them, basic modeling rules to fo llow, and basic terms that you should be familiar with.
1.1
Architecture
SAP HANA Live allows real-time operational analytics and is based on a two-tier architecture as shown in Figure 1. » Tier 1 consists of SAP HANA as the database system, application , and web server. » Tier 2 consists of user interface (UI) clients such as SAP BusinessObjects BI tools that are connected to SAP HANA from OData, SQL, or HTTPS.
5
Introduction to Virtual Data Models
Real -Time Business Intell igence Specific Analytical Ul (HTML5 Based)
Generic Analytical Ul (BOBJ, etc.)
OData, HTTPS
SQUMDX
SAP HANA Platform SAP HANA Live
Calculation Engine and Search
Security
History and Hierarchy Handling
Broadcast and Documents
Predictive Analysis
Cross-System Analytics
Fi gure 1 SAP HANA live's Two-Tier Arch itecutre
SAP HANA Live delivers more than 2,000 virtual data models, which are preconfigured and easy for you to use. The included virtual data models are optimized for data throughput and the best performance in transactional scenarios. The virtual data models are present in the SAP HANA database. SAP HANA Live's detailed architecture, including virtual data models, is shown in Figure 2.
6
I
1
I
1
-J,
I
Introduct ion to Virtual Data Models
HTML5 -based (Web and Mobile) Other SAP Solutions
SAP BusinessObj ects Bl
Third Party
Open Interfaces: HITPS, OData, SQL, MDX
Web Resource
SAP-
OData Service
Delivered Query Views
SAP HANA XS Engine Application Services
Customer Extensoons Value Help Views Reuse Views Private Views
Virtual data models (Figure 3) are accessed through the UI client using OData, SQL, MDX, or HTTP$ and are built entirely with SAP HANA calculation views. These calculation views can be broken down into the following types:
» Query views Query views are created for direct consumption by analytical applications such as SAP BusinessObj ects BI tools. Query views must not be subsumed by another view and are always the top view in the hierarchy. A query view mainly fulfills one or more analytical scenarios.
7
Introduction to Virtual Data Models
Consuming App licat ion (BOBJ, HTML5 Application, etc.)
\
SAP HANA Database
/
----------- ------------------------- ' Semantic View Layer Query Views Query views are designed for direct consumpt ion by an analytical application. They must not be cons umed by another view.
t Reuse Views Intended to be reused in other views by customers and partners. Can reuse other reuse views and private views.
''
-----
-
-----------j----------
~----- ~
I
Private Views Intended to be reused in other views internally.
"
SAP HANA Database Tables
I
Fields
I
\_ Figure 3 SAP HANA Li ve Virtual Data Model Views
» Reuse views Reuse views are the most important view in virtual data models. A reuse view exposes the business data present in the SAP HANA database to the query views. It does not fulfill any specific analytical scenario and can be reused in any other reuse view or in a query view to facilitate development. You can also use these views to create your own extended models to fulfill custom scenarios. Reuse views should not be consumed directly by analytical tools.
8
I
1
Introduction to Virtual Data Models
» Private views A private view consists ofSQL scripts on one or more database tables or views. Private views are not consumed directly by or reused in other views, including reuse views or other private views.
» Value help views Value help views provide possible valid values for a field. In a virtual data model, the value help view provides possible valid values to the fields in SAP BusinessObjects BI tools such as SAP BusinessObjects Design Studio. This feature lessens the probability of an incorrect value being entered by end users.
1.3
Viewing SAP HANA Live Virtual Data Models
You can view SAP HANA Live virtual data models via SAP HANA Studio and the SAP HANA Live Browser. In SAP HANA Studio, SAP HANA Live's virtual data models are present in the hba subpackage in the sap main package as shown in Figure 4. For example, the sap . hba . ecc package contains all of the SAP ECC ·Content. You can view the package under a CoNTENT folder, which is present for every SAP system; in our case, the SAP HANA System is DE3 (Figure 4). You can view the existing model or extend the model according to your business needs. The SAP HANA Live Browser is an SAP UI5-based web application that allows accessing, searching, and tagging SAP HANA Live models. The browser can be used both by the business end user and the developer to analyze or extend the virtual model. The SAP HANA Live Browser (Figure 5) can be accessed by entering the SAP HANA server host and instance number (which can be viewed from SAP HANA's system properties or provided by your SAP Basis team) in the following URL: http:II
ServerHost>:BO/sap/hba!explorer.
9
I
1
Introduction to Virtual Data Models
I
1
.
- ,. nf.o ~5tflnl 13 • !lil • I IJ II • • 18 " 1o e {fb oo
You must enter your credentials to access SAP HANA content either by the package or by the application component (Figure 6). The SAP HANA Live Browser can be useful to the business user, who may not have enough detailed knowledge of SAP HANA Studio to explore metadata, to view live transactional data, or to visualize the relationships between vir-
tual data model objects. You can even select a view and use it in various SAP BusinessObjects BI tools such as SAP Lumira, SAP BusinessObjects Analysis (edition for Microsoft Office), SAP Crystal Reports, and SAP BusinessObjects Design Studio for detailed analysis . The only prerequisite is to have the relevant SAP BusinessObjects BI tools installed on your local machine.
' PS • PtoiOCt S\'SI«ll .. SO · S<*!SancJDiSirlbUtion
VBRK.COM
,J•
VBUK_COM
."J•
• RwSie(
TVFKffi e
• VM.ltt~IP (1)
BllllngDoc....
:J•
MtKT ffi •
· $().81l-KNA1. COM
- """Y(2)
.' J•
J ........COCI( TVTW ffi e
Wt£·'·"'-·§:
TVrNT ffi •
• Reuse(12) . ~a~(2)
• SD.aiL-cA • AcccuAt k
ADRC
' SQ.elt,..()l! . Basic ru
PA0001
ffi e
ill e
VBPA..HDR ] • SAPCtientV...
:J •
SAPCIIent
J•
Figure 6 SAP HANA Live Browser
1.4
Basic Virtual Data Modeling Rules
Before we get any further into the discussion of SAP HANA Live views, you should know the following basic SAP HANA Live model rules, which apply to all views: » For design reasons, graphical calculation views are the preferred SAP HANA view for SAP HANA Live. )) If there are complex calculations that cannot be implemented from a graphical calculation view, then a script-based calculation view must be used. » You should not use attribute or analytic views in virtual data models as their functionality is too restricted. » Views that are based on client-dependent tables should expose SAPC l ient as the first column of the view output.
11
I
1
Introduct ion to Virtual Data Models
I
1
» The flag ENFORCE SQL ExECUTIONS should be set to true for all graphical calculation views (Figure 7). Sc:enano
·;)
Pak ..
(otumns(l.&)
jv.ew Prop~rtiu
Ht~rarchtts Paramettrs.Nanablu
G~~r~
(ll) Join
8
Unfon .ill Proj-t
o'
Aggregn...
.
· o· - .......,
r
~
v..cc..
- ~ v_cc
j;J R.ll'll.
·I
=
Figure 7 SQL Engine Execution
» You should not modify SAP delivered views; instead, use the SAP delivered view as a template andl create a custom view with your enhancements.
1.5
Basic Virtual Data Modeling Terms
Before we dive into the nitty-gritty details of building and extending SAP HANA Live views, let's establish and define some basic terms you should know:
» Variables A variable is an element entered manually by the user in the UI of a view. It defines the filter on the attribute of the view and can be specified before executing a query on the view. » Counters Counters are special types of columns that display the distinct count of attribute columns. They are defined only on query views and not on private or reuse views.
12
Building SAP HANA Live Views
» Hierarchies A hierarchy is an ordered list of levels or a collection of items. Each query item in a hierarchy must have a unique name.
2
Building SAP HANA Live Views
SAP HANA Live provides prebuilt models to help you use the functionality quickly and easily by directly consuming the virtual data model in SAP BusinessObjects BI tools; this gives the business user the flexibility to consume data models without involving IT. However, it is also possible for developers to build SAP HANA Live views from scratch. In this section, we will show you how you can develop virtual data models using a detailed example. In our example, which is representative of most virtual data models, the virtual data model consists of the following views (Figure 8): » Query views » Reuse views » Private views » Value help views SAP Query V iews
Incl. Value Help Views
I
SAP Reuse View s
SAP Private Views
Physical SAP Tables of SAP Business Suite Applications SAP HANA Live VDM
Figure 8 SAP HANA Live Virtual Data Model
13
I
2
Building SAP HANA Live Views
In this section, we will create a model view for the creation of daily production allocation reports. After seeing the steps in this example, you will have a basic understanding of how to create SAP HANA Live views for multiple purposes. Production allocation is done in the upstream oil and gas industry and is the process of allocating the actual production of crude oil at upstream nodes (i.e., well completion) after taking into consideration downtime, network loss, and so on. The daily report helps the user analyze production trends and also helps them to conduct future forecasting. Figure 9 shows a high-level process diagram for production allocation, and Figure 10 shows the virtual data model for creating daily production allocation reports. Model Production Network
----+
Field Data Capture
~ Production Allocation
~ Daily Reporting
Fi gure 9 Upstream Oil and Gas Production Allocation
Figure 10 shows the production allocation data model. The model consists of multiple database tables , several private and reuse views, and only one query view, which exposes the data to the analytical tools. The basic design principle is that data aggregation is performed first and then calculations, joins, or unions are performed on the aggregated data. In this scenario, the virtual data model is kept simple so that it is easy to understand.
14
I
2
Building SAP HANA Live Views
Specific Frontend Adaptations: Gen erated to
make a view consumable by J'eports OJ' analytical applications (e.g .• currency conversion. input vAriables, t&Jd joins. user-specific calculations, SAP Que()' Views
I Incl . Value Help Views I
-
or data type conversions)
-
Semantic Integration: Enhanced with key business logic (e.g .. caltulated fields. j oins of related obj ~ts. or constant filters)
SAP Reuse Views
-
-
0
I
I e I I
-
Physical SAP Tables
-
o f SAP Business Suite App lications
Te<:hnlcal loss
Weii_Data Volume_Oata
might be relevant for business reporting , basic calculatio ns, o r joins (only where needed, i.e., for maj or OLTP tables)
SAP HANA Live VDM
0
Fi gure 10 Explanation of Virtual Data Model Scenario
Each view in the virtual data model has its own specific task (Figure 10): For example, a private view only takes the relevant fields from the database table required for reporting to, for instance, a reuse view. The reuse view then enhances those fields by combining them with other reuse or private views to provide the key business logic, whereas the query views acts as the single point of contact for the analytical or business application. Now that we have created the model design (Figure 1 0), the next steps are to create the individual virtual data model views that will make up the complete SAP HANA Live virtual data model. The first view that is created in the virtual data model is the private view.
2.1
2
Volume Query
Syntactic Integration: (Selection of fields that SAP Ptivate Views
I
Private Views
Private views are the most basic views that can access database tables or other private views. These views can be reused in reuse views or in query views. The main task of a private view is to expose the data of database
15
I I I I
Building SAP HANA Li ve Views
I
2
tables to other views. Only the fields that are to be used in a report, a calculation, or a join are selected in the view. Private views are required when you want to encapsulate some logic but are not mandatory and can be compared to private methods in programming languages. The steps to create private views are as follows: 1. Right-click on the package (Figure 11) under which the view will be cre-
ated and then go to NEw • CALCULATION VIEW .... You should create your own package for the virtual data model and should not create the model in the SAP namespace. For our scenario, we selected the package Demo Cont ent .
Figure 11 Opening the Calculation View in SAP HANA
2. Once the calculation view is created, then you can select the relevant
tables or another private view that will be consumed in the calculation view (Figure 12). In our example, table Y_CC_WELL_DETAILS is selected because it contains all the fields required for the production allocation report.
16
Building SAP HANA Live Views
J
2
tmp.OemoContent::Y_CCC_WELL VSA " . . . ...
....
8 Union
....... .:1
••
Aggr...
.... ,g
(I)
T
Z••X
w MAKOT
ClttM
e oH.,.NO e w l_NO e wc_NO
Delivery network..._
e MAn flt
Mlterial Nu •~ C.ontr~t ,._,mber s~~te PAAowntf
e o _oo
e s.a...o1
Weii Onv11ber
wco:n Co•pkt.ion Nt.L-
wO\'YN_NO e OWNJ NT_fYP(JDP.r..,..,.t lntelt>t t 610WNJSQ.NO 0wnt'l' ~~er~t Seq...
e ORtG.MP. NO • r lt:NSP_NO w FRI:Q.CO w AC1'l.VOt.U AC fl. VOl HEAT_V.U._U w HEAT. V.U
O.ic}INI •u•:uure•Tr.,'fO'IHno.tmbfor
fltquttK)'
Actu.- \lolumt UnrtJ Artua \!olumt
:t! + •
li-t &
I ON_NO: r_cc_;•.nt_DfTAU-0 ... 1 ON_NO_t: .,.._ cc_wr~~-orrA.tS I WC.._NO: .CC.Mh_OG'A .s.··· I MATNR: Y_(c_,•lfti._OE:r'AQ.S.~ I CT_HO: V_CC'. WHLOEiA'LS.(f I SA_OT: ycc Mtt.D£7.A1!S.~
Y.CC..Wtu,.DETAJlS
l
I
owH,.IHT. 1YJ>t..a>. r.cc..wu
owH,.ISQ..NO: r.cc_.-.m..oo OlliG. MP. HO:
."'-""'
1 ~~:
Mn~t~gVl<~tU'I•t
tu'tlngvtlt.e
Y
CC MH 0(7 "' >
Value
Filter
ACTL.EXER.GV.U
Attua Ent,gyU"tt
ACTL. EN"EilGY WG.OVRD.PC
At:Na f<'~t19'1 ~>t G'' Ov.m
HITt...CT. VOl
ff'trtled Co.~tn
~.o.!·'~'-':1'·"''
""' ''""'~·•<•
L.tn~h
'""" 1'
10
Scale
(!)
'0
•
0
~ Tom...
ts
..
Figure 12 Addi ng Objects to Calculation Views in SAP HANA Live
3. Now, we have to assign the virtual data model properties under the VDM PROPERTIES tab (Figure 13) of the calculation view by clicking on the PROPERTIES tab in the lower-left corner of the calculation view. These properties are as follows: CATEGORY: Here, developers can select which view category should be used: private, reuse, query, or value help. APPLICATION COMPONENT: This property assigns the virttual data model to the specified application component. This must be assigned specifically by the developer and is assigned on the basis of business domain (such as Controlling, etc.). TERMINOLOGY DoMAIN: This property tells us the domain of the virtual data model view and is automatically derived from the application component. For example, if a view contains information about the controlling domain, then it will be assigned to CO - CONTROLLING. PERSON RESPONSIBLE: This field names the person responsible for the development of the view. This information is not delivered to the customers with the product and is not visible to users.
4. Since we are creating a private view, then we will select the PRIVATE category from the dropdown menu (Figure 14). Once you click on the FINISH button, the calculation view type will be set to PRIVATE. 5. The private virtual data model view is created, as shown in Figure 15. lmp.DomoConloni .:Y_CCC_WELl VSA