Documente Academic
Documente Profesional
Documente Cultură
~ Rheinwerk®
Pub is'1ing
Bonn • Boston
What You'll Learn
4
4 Integrating SAP HANA Live Views with SAP Business
Intelligence Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.1 Integrating SAP HANA Live and SAP BusinessObjects 81 . . 46
4.2 Integrating SAP HANA Live a nd SAP BusinessObjects
Bl Tools with SAP BW . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5 What's Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
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
5
Introduction to Virtual Data Models I 1
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 transac-
tional 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
Introduct ion to Virtual Data Models I 1
Web
Resource
OData Service SAP-
Delivered
Query
SAP HANA XS Engine Views Customer Extensoons
Application Services
Value Help Views
Reuse Views
Private Views
SAP HANA Platform
Physical Tabl es
SAP HANA Live (VOM)
Database Layer
L - - - - - - - - - - - - - - - - -Ph
-_y_
sic_a_
l l_a_bl-es________________ -J, I
Virtual data models (Figure 3) are accessed through the UI client using
OData, SQL, MDX, or HTTP$ and are built entirely with SAP HANA calcu-
lation views. These calculation views can be broken down into the follow-
ing types:
» Query views
Query views are created for direct consumption by analytical applica-
tions such as SAP BusinessObj ects BI tools. Query views must not be
subsumed by another view and are always the top view in the hierar-
chy. A query view mainly fulfills one or more analytical scenarios.
7
Introduction to Virtual Data Models I 1
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.
I
'' - -----
-----------j---------- ~----- ~
Private Views
Intended to be reused in other views
internally.
» 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 data-
base to the query views. It does not fulfill any specific analytical sce-
nario 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
Introduction to Virtual Data Models I 1
» 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.
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<HANA-
ServerHost>:BO<SAPHANA!nstanceNumber>/sap/hba!explorer.
9
Introduction to Virtual Data Models I 1
- ,. .
n-
f.o ~5tflnl 13 • 0 iJ IOf))PlOOAll O<RLP 13 - 0 ,i Q a: - 0
!lil • I IJ II • • 18 " 1o v ,a PRODALLOCREP
e {fb oo
(i.l ie (~log
®., ,,...,_,
$ Wt C<iW~t~
(! mDtmo<onw" ~ o....
:!: fi 6UI!I">I»M
(!: IJI, donognsll.odto.~>«<m>Oftl tc-<ch.onobu$1<Hdfrom~c b.odo ~. '"'" Oener
~ &; t;ty.~j«t
:E5 ~ (hcJ.Of,.~IFS•ukrtftk· ) P.dlcloflto rclo~tttc rt~.our<t. ~ Conti{;
Btl up
..
"' "'
l!) fli bo
S tl boc-
dJ Ot11f
~ tnport
.. .c -
fi1 8h6 .:J .!.I...J £
Figure 4 The SAP HANA Live Package
HANA Log i n
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.
10
In t rod uct ion t o Virtual Data Mod els I 1
SAPCtientV... :J • SAPCIIent J•
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 i-
ent as the first column of the view output.
11
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
<J ·;) Pak ..
(otumns(l.&) jv.ew Prop~rtiu Ht~rarchtts Paramettrs.Nanablu
G~~r~
(ll)
Join v..cc..
- ~ v_cc
8
Unfon
.
· o· - .......,
r
~
.ill
Proj-t<tion
o'
Aggregn...
·I
j;J
R.ll'll.
=
» You should not modify SAP delivered views; instead, use the SAP deliv-
ered view as a template andl create a custom view with your enhance-
ments.
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 speci-
fied 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 I 2
» 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.
» Query views
» Reuse views
» Private views
» Value help views
13
Building SAP HANA Live Views I 2
In this section, we will create a model view for the creation of daily pro-
duction 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 produc-
tion 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
----+ Field Data Capture
Network
Production Allocation
~
Daily Reporting
Figure 10 shows the production allocation data model. The model con-
sists 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
Building SAP HANA Live Views I 2
-
Specific Frontend Adaptations: Gen erated to
make a view consumable by J'eports OJ' analytical
applications (e.g .• currency conversion. input 0 I Volume Query I
vAriables, t&Jd joins. user-specific calculations,
SAP Que()' Views - or data type conversions)
I I
I Incl . Value Help Views I
SAP Reuse Views
-
Semantic Integration: Enhanced with key
business logic (e.g .. caltulated fields. j oins of
related obj ~ts. or constant filters)
Weii_Data
Volume_Oata
I
I
might be relevant for business reporting , basic
SAP Ptivate Views - calculatio ns, o r joins (only where needed, i.e.,
for maj or OLTP tables)
Physical SAP Tables
o f SAP Business Suite App lications -
SAP HANA Live VDM
0
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 data-
base 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 applica-
tion.
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.
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
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 .
"' .. .
"~ ~ '""""'·"
Pfoxtduft-
• o~-r.t~lc
'if IILHICOP't
......
_,._.._'"_"
"' _"'_______, £ .!1
' ---------' .!.l
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
l
Union
e MAn flt Mlterial Nu •~ I SA_OT: ycc Mtt.D£7.A1!S.~
.......
.:1 e o _oo
e s.a...o1
C.ontr~t ,._,mber
s~~te
I owH,.IHT. 1YJ>t..a>. r.cc..wu
owH,.ISQ..NO: r.cc_.-.m..oo
••
Aggr...
wO\'YN_NO PAAowntf
e OWNJ NT_fYP(JDP.r..,..,.t lntelt>t t -
OlliG. MP. HO: Y CC MH 0(7 "'
>
....
,g 610WNJSQ.NO
e ORtG.MP. NO
• r lt:NSP_NO
w FRI:Q.CO
0wnt'l' ~~er~t Seq...
O.ic}INI •u•:uure•-
Tr.,'fO'IHno.tmbfor
fltquttK)' ."'-""'
w AC1'l.VOt.U Actu.- \lolumt UnrtJ
1 ~~:
Value
AC fl. VOl Artua \!olumt
HEAT_V.U._U Mn~t~gVl<~tU'I•t
w HEAT. V.U tu'tlngvtlt.e
ACTL.EXER.GV.U Attua Ent,gyU"tt Filter
ACTL. EN"EilGY At:Na f<'~t19'1 L.tn~h 10
WG.OVRD.PC ~>t G'' Ov.m<t• Pn Scale
HITt...CT. VOl ff'trtled Co.~tn<! Vo
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 vir-
tual data model view and is automatically derived from the applica-
tion component. For example, if a view contains information about
the controlling domain, then it will be assigned to CO - CONTROL-
LING.
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.
17
Building SAP HANA Live Views 2
'
Gen era I
~ Note: Changes are Saved Directly!
Global Field Names Category Unassigned d
VOM Properties Requested by' NGMAN' t o be <et t o ' Private' (Status 'new'). The approver is " ... J
Apphcatoon Component Unassigned [J
4. Since we are creating a private view, then we will select the PRIVATE cat-
egory from the dropdown menu (Figure 14). Once you click on the FIN-
ISH 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
""""'
<1 '.1 ·-
C..tout
•• s i $ • li• St
., _ (I)
D ON_IIo. •. CC_Wf(Ul!TAUD •
Cll>
0 ON~N0_1 ~ I'_CC_t•.tu_OfTA lS:
,.;. ~ Wc..,HO: r '"f'_MU..O(TA' to•,
0 MATNR: Y.CC•••.tfl!_OC1A!t$.
6 CT_HO: ,-_((_\'.:.~.oErA ..S.Cl
; SA.OT~ Y..CC. ,Vfi(_ O(TA ~s.SA
D owtt.INTJYK..co. vcc_.~n
n OWN_ISQJ«); Y..CC.I'4-U..Ot
fi ORIG..MP..NO:
·-
f4•fi';C:
o~-. T)'IM
,..,..
fllttt
......
TRNSP..NO
H'IAACHAit
10
""'
: Neoghbor
Not ~ Changfl owe Swed Directf)'!
'
C.fltgOI)' ~ned ·-
Globf,1 f iddN.mu
YOM Propcrtin APfl, ution Component Unassigned
18
Building SAP HANA Live Views 2
.,._ ..
I ·.i ·-
'"tWtANGMAN".Y_«._Wtu_0£TAII.S
n oN.. Y_cc ..iUO!TA ~so ...
HC).
I-
!-
' PTOftC:I~
ttWl,.NO
8 W(..NO
Wf'll>t10•b"
WdiC-ompkticlnt-.k&..
D MATNR: Y..cc_ ..ru:_DC7A s ...
n CT.. CC.O'l!..L..DVA3C1
HC). ' ..
-=-v_ee_~
e MATNIR t..._loi•l Nu•lkf ~ SA.,.OT: CC ,'If J Df1A. '>.SA
*Cf..NO (en1rKI ......bfof n OWN_IHT_TYP(_CO: Y_CC_.~t~
~SA..DT
wOWN.NO
Solk$&ote
I'AAc..,. r•!!
n OWN)SQ._HO: Y..CC.. l'.:.(_Di'
C OR.IG_MtJ_NO: ' ,..., NrU OCT. .,
..0WN_INT..T"''ft_(0P¥""'¥ltlnt~~ct -
>
..O'WNJSQ...NO Own.er lnte1e't Seq._
4fOIRIG.,MP..NO Ork)m~ •f'•U.Iff'111-
Vl llN$PJ.:> r,.,..tp«,~ nu"'bft
., fR!Q..CO I C:'~"'c t</
wACTI..,.\IOI..,.U
wACTI..,.\101.
w HtAT..VAJ..U
A-nal Vc o--r• UM.
AtW41'>etu!T.c-
''''"~:JV~I:." lf'l,t
:::r
l
HlAT..VAl t-•l'•"~J"' <a oa.. t)'pe:
• ACTI.,.ENtltGY..U Act~.~~l {rc g•,-Ur t fllttl
,).;.t~,~lfno!'~) 10
ACTLJ:mR.GY
'"'~~'"
\vG..OYRO..PC
ENTl._CT_YOL
· tt c,l, lNtPICiot J!.,
E •Wtd Ccr ~· <t I
x••
~-E~l-C.T..\'~)l A ·~H ·d C
1X>% c • ;J :J C!o€
'
VOM Propertin Requested by 'NARAHGMAN' tlO be Sod to 'Prfo.o~t e' (St«\11 •neW). The tpp!O\'tf is " -
4pplout101'1 ( ompol'ltnt t/AHsltned G)
13 Consolt tl
Tt~minoJogyOomtWI ~Md c...-
The new private view contains the database table containing details for
W ELL ID NUMBER (WL_NO), WELL COMPLETION (WC_NO), VOLUME
QUANTITY (ACTL_VOL_U), and other required parameters. The newly cre-
ated private view will now be consumed by the reuse views.
Reuse views, the most important views in the virtual data model, expose
the business data present in the SAP system to the query view in a well-
structured and comprehensive way. Reuse views should not be directly
consumed by the analytic tools and are created to work for multiple ana-
lytical scenarios. Some of the general guidelines for reuse views are as fol-
lows:
19
Building SAP HANA Live Views I 2
» The interfaces of reuse views should be kept stable so that the existing
consumption scenario for the delivered view is not disrupted by view
changes in subsequent deliveries.
» You should not modifY the reuse view delivered by SAP; instead, use
the SAP delivered view as a template and create a custom reuse view.
» Variables should not be used in reuse views or private views as they do
not directly interact with analytic tools.
» Counters should not be defined in reuse or private views. Instead,
counters should be defined only on the output node of the query view.
The steps to create a reuse view are as follows:
1. Right-click on the package under which a view will be created and then
go to NEw • CALCULATION VIEW ... (Figure 16). 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 have selected the package
OemoCo ntent .
• SAt HAt iA IAodel«
£ ·I o Reoevor
..:l .!.J__ __ _ J
- "
~ , ~ '0' ... 0 Job log $3 tJ I . I.Pi x 0 ~ "
I Oo
20
Building SAP HANA Live Views I 2
2 Once the calculation view is created, then you can select the database
tables, private view, or another reuse view that will be consumed in the
calculation view (Figure 17). You can select the table or the view on the
basis of attributes that fulfill the requirements. In our example, we have
selected table Y_CC_ALLOCATED because it contains the allocatted oil at
each of the nodes, and we have selected view Y_CCC_WELL because it
contain all the attributes of the well. Reuse views expose all the relevant
attributes for a business entity.
lmp.OemoConleni::Y_CC_WELLALLOCATION VSA ilt d6 ~ o - ~ · e. - .; •, · «"
3
!P
1
' J;,:
.1... . "--.....8' ..
. ...
.. '"'"
Sl>ow.AI
"
.,.,_
8
X
l yl)t ... "'""
[J HU11ngVa-.11 """
Hutong'lalut
A9911f9M.c>n v......
"
~jt.• [J lnttWUnill fntl~
....••. [J
0
AttutNdurne
<~111Y
Aclwi'/OMY!~
(ntilll~(f'oO'ty ''"'
''"'
....
il d <J»JoiiU $0
Y_O::_,f.U,()CATS)
Jv_c:::e_v.e..L
[J
a:::J
[J
VoiRed'ucnUtul
Wt1Complet10r1
Wtll
Vclttck.lclll.kVt
WdiC:OfTipk¢10n
Wtll •
[J WttG•~ct \\'ttGnO...tmcttP<1
[J Entitkdt:nv,«eceuc.n fnlitl<d[ng)~edlKn
0 ActwEntr~dv<n A<tu•t(n(lgyltc:ducn
0 AautNciR.t.ducft A.(tu•IVoiP.•ducl'l
[J (nt<dfcNoiRtcho~cn (nh!l.cf'loiRotducll
0 Adjus.ltdEI'IUitdVOI Ad)VSttd£ntflkocNct
0 A~tcd£t«tc:d£ft9Y Ad~tc:d(t Adjwt«<ltit~OI I
3. Since we are creating a reuse view, then we will select the REUSE cate-
gory from the dropdown menu. Once you click on the FINISH button,
the calculation view type will be set to reuse (Figure 18).
4. The reuse view is created as shown in Figure 19.
21
Building SAP HANA Live Views 2
(!!) '"'~
Jon
•
Union
- c
VtNI:IIt Sci'IWI'ItoC l ypt Lfbtl Cohtmn Mi "'
.. ------------------------~~~. . 0
Hc.1e: {Nnge-5 •re s.-d Ditertlyl
'"''tftC KslOtY
.I. I IC
ClttgOfY UnHJigii«S -
Job Typt
VOM Pf~'tiet ~iutiOt\(O~ U~ - ""'
Ttf!nin~Oo~n VNS~
'"'"
,_ .. ,....
_,
t~ l «y ~mt ........
0 Ht.l'tlngVIIUt Muttn.gV• k.lt
0 ftloH'f)4Uf..l f ntrgyUn!t
0 Anwft/OII.II'M A<t,..Wo...,.t Sum
0 ltltiUcdtntrgy (l'lti41<d(~ty Sum
8 <Il>Joln_1 ~n 0
•
VoiRtd'u cnUnll VciU:~
- v_et:._lld.J./:JCATtJ:J. a:::J Wt iiComplttiotl w...Comjiii«IOI'I
>r..cce_Y.fll 0 Wd
0 WttGn.Ov.,ricte9ct WetGuOYtrridePd
0 £ndtlc«~uc" (ntitled£"9)-fttducn
0 Ac:t\l~Ener9)'tttdu<fl A<tvti(I\.0'9"JRedu<.l'l
0 ActuaNdR.fllucn A<tueiVoiReducn
0 lllttdt<NoiRtcl\ltn Enb41tdVoiRtdv<n
0 ACIMttdE,.._~ItdVol Adjusttd(t~tidtd'Jcl
22
Building SAP HANA Live Views I 2
Query views expose the data to the outside world and are consumed
directly by an analytical application or tool such as SAP BusinessObjects
Web Intelligence, SAP BusinessObjects Dashboards, SAP Crystal Reports,
SAP BusinessObjects Analysis, and SAP BusinessObjects Design Studio.
The query view is a single entry point for the analytical application to
access data from an SAP HANA database. The query view can consist of
database tables, reuse views, and private views. Some general guidelines
about query views are as follows:
» A query view should not be consumed by any other view and should
always be at the top of the hierarchy.
» A query view can have multiple input parameters according to the busi-
ness logic, and values can be assigned from analytical applications or
business tools. You can also define new analytic privileges according to
business scenarios and assign them to a new role.
» The output field provided by a query view should be in a format that is
consumable by Uls.
» You should not modify the query view delivered by SAP; instead, use
the SAP delivered view as a template and create a custom query view.
The custom query view can then be consumed by analytical applica-
tions or SAP BusinessObjects BI tools.
» Query views are visible to SAP BusinessObjects BI tools only when the
MULTIDIMENSIONAL REPORTING flag is enabled. This flag is also enabled
automatically as soon as a measure or counter exists.
» Define analytic privileges and assign them to roles or users to ensure
proper authorization checks.
» Amount fields must have correct decimals.
» Description fields should be available for all IDs and codes.
23
Building SAP HANA Live Views I 2
1. Right-click on the package under which the view should be created and
then go to NEw· CALCULATION VIEW .... You should create your own
package for the virtual data model and should not modify the model in
the SAP namespace. For our scenario, we have selected the package
DemoCon t ent .
Ct.. -
$ .
.tllotg
PfCMIIotlln9
~ Qt Co~ttn'll
-
IBilDCII:'
$ Bl~•>tvllto
... ·I
$ 8l~\tvdto_ W hck~- t:;. Con'lg~e IIT'CICI'I 8eNef
g tilpubli<
"'' ...
&. d s.tp·;~mpl•t:
-.. . .--d CIJI••
¥
An1obUII't'lo...,_
AnllytltVotw~· rJ DM• P101Hi0Mg
t9 1-W~
<; # t:fltcm-Nul
""'"'
Autol>oc.~
" AA~Pmlltgot-
&:;,11'1'-t"OI'I
.:.J • I ~
tl 1·"0. ·' I X ~ ~ c
Scl«tcd: ill OemoCont«\t
~ ProP!'tr (V41ut I Ui.-f
~ Ibm, O~o,.t'flt
1 ~~~~~~-=_:_~~_·_o_-_r._M~-·--~~~ ~·~--------------~~
I 0. ooCo
2. Once the calculation view is created, then you can select the database
tables, the private view, or another reuse view that will be consumed in
the calculation view. You can select the table, private view, or reuse
view based on attributes that fulfill the business requirement. In our
example, we have selected reuse viewY_CC_WELL_ALLOCATION, as it
contains all the information we need on allocated volume.
3 Since we are creating a query view, we will select the QUERY category
from the dropdown menu. Once you click on the FINISH button, then
the calculation view type will be set to query.
24
Building SAP HANA Live Views 2
f'RAControtel
s..~~O•tc " ... Cok.wnn.5
<!I) Jse m~ toO-rtntcrm lypt" ""'""
OwnHinlt'lf'~tl,fW'
B W\) 0. 'I'_Cl..• WEll,.AUOCA1JON.I"i:_o\'O
g ON. NO: l'_Ct"_WW....aOC.UJO'•.ON_NO
Jon
a
Unloft
_--=t
. ....<tlo• J
'JI Orrn~:rtntcraUfll'olt: IK c
W AIIoc.C.iol!lfr~y
O..,.t>crlntctclt~qy..
Aao<.o liot'.f-f~~oc:r
'~i O rigiNtiftgMe-tmtntf't Oricjn•tingMN,Uit'-
G wc._Nel r_cc.vmL.ALLOCATION.wc.NO
6 Dt( N0_'1: '1'.CC.t.'o'ft._.A.LOCATJON.Do\I.II<C
I '' ~_O:_'h!U...,.AUO
• Tr.-portcr fr~•tcor 8 CT.NO: .,. CC, ','lr...AUOG1.1lON:CT.NO
~--
W VOI.Im~UNt v-..m!'Vnit G SA_DT: Y_CC_NEU_AUOCA;noJSA_OT
WHu ting'hiUM HNtin9V~t
B OWHJNIT_JYP(._(:[); I'.CC.WEU.ALLOCArJC.
••
...... H-u tinqV•'Iuco
... wrcMJM
H~o1r'4"' J
fnHfi'I'Onit
H OWN. IS<t.NO: .cc. .~'t L,.l lOC.AT'O" o. "'
....
];;)
1- w Aoctu.IVolume
EntiekdErl.trf'l
Vt)lltt,cll("f\VM
Mhul'lolu•e
[ntillt-df•ot!tC)f'
Vl)ltM:IU(I\II..WI
I
!
...,.._
<
Gcftutl
W~'ott \"ldK-ompktlon
Wei Wt<ll Ptopcrtf
WrtGIIIOvetricltP<t Wt'ttH,OV«-rriclePCI
EMOtte~Mfl rnti tll:-drncnRcdu«\ Nom•
Aoc~gyR~n Nlt..afW'r~Rt'dl•n o.tt T)'Pc
Ac~n Ati• ..WoiK~ ...H
Entlttt~du<n (nti t\r(IY.;Mirduln l"'9'h
AldjmtdEntltl.tdVol AdjoniHI'nlit~lf\IQI
~cdEntklitd&lgy Adjust.cdlntitkdln.q\
""'
'""' -
c;..,.,.,
G$ob.l f'.tdd Nfm~
YOM ,t~UH
Apptu!i&ft(Ofnpotlenl
---·
~ted by'NARAHGMAN' to be ~d. to '<luery' (St4hn 'new'). The • PPfOYU IS" -
On.HsigMd -·
Job Type: User
25
Building SAP HANA Live Views 2
...,._
PfOJt••
tl
w HutingV....Nt
Hu fnqV•'uc
w Erwr~nit
fl.....tin')V.aiUnit
H t n Nt o·
lnH~t
,'
g OWNJNT..TYPt..ro.- v-. ...... v.m.A.u.cx.:.u~t
I OWN_ISQ._HO: YCC_/,.f, ...... UOC'A10' o. ...
>
....
~
- wAc~
\II£Mitk d£Mrov
.-\\llltecLcnUnk
Ac:tu#lohJ•e
[,,titkJ(,oe;'JJ
Voltl"dtKnUni1
Gcnut l
• Wd!Compktion
W tt
WeiKGIIIplction
\'lf'll i ,,.,.,.,.
w w.tG.OVf'fridePrt
~ Erotitk~duc.n
\'lf't(loHOvNfillt<P(:t
(ntidcd[t"tq'~Rcducn I D•tt T)JIC
Ntmt
N.~rgyRe«Kn Acl•~rr,.Rf'duc"n
w lvttwNoiRcducn Act~H~Vo!RC'du(n f •lttt
Entitk~ducn (ntiiW<!Vollr'dutn
....... ~ftllfdVol A.cljoJ>If'dbotit.,.d\ltll
~cd<lt..... Adjl.Ktf'Ciiontldrdl.nq\·
100!< -
. 1. x '1;11'- c
........ Note: CNngft ..-e Swed Direct¥
( t(tg<lf)' U"'"slgMd ...
Gklb-.1Held ~nus
VDM f>ropeftiH ~ted by•NARANGMAN" to bcJd to '<Notry'('Stttus · ~·). Tht~•c' is·· -
~.:lon(omponent Vn.Ksign.td - ·
Te~rirlclogyO~tnein u~
A value help view provides a list of all the valid values that can be entered
in a specified field. Instead of entering the value in the field, t he user
selects a value from a list of valid values, which generally helps to prevent
typos.
A value help view provides an efficient data selection mechanism and also
increases user convenience. Some of the general guidelines are as follows:
» Value help views should on[y contain the required fields and not con-
tain any unnecessary fi elds.
» Value help views should be assigned analytical privileges so that the
proper authorization can be granted to the end user.
26
Building SAP HANA Live Views I 2
» The value help view should not contain measures, which are quantifi-
able data (such as revenue, sales, etc.), and consist of attributes, which
are descriptive data (such as Customer ID, city, etc.).
» If a value help view contains a logical key consisting of multiple attri-
butes, then an appropriate variable of the value help should be assigned
to each key attribute part to get the correct data. For example: Assume
COSTCENTERVALUEHELP consists of attributes SAPCLIENT, COMPANY
CODE, COST CENTER, and COST CENTER NAME. The logical key will consist
of attributes SAPCLIENT, COMPANY CODE, and COST CENTER. In this case,
variables are defined for the key elements SAPCLIENT and COMPANY
CODE.
The steps to create a value help view are as follows:
1. Right-click on the package under which the view will be created 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 have selected the package
DemoContent.
~ COnfi)orelr11CIOI'ISerrel
(tfi of
.., ~v;..,._ 8 O<tliPJIM$10nlf19
" r 'flf'MffH
u Alulytoc '"''''9'·-
QI PIO<tcluft-
• ~IIIOftf.blt
...... O 'htiOale
Rtf!IO'IItfllt~
0 AC""'IIIt
~roltttOt,cru-
~ O R:ecl~
"
ltcfl>(to<
~I NNJO~
j ., ~
t1 ! . l .. l • ""• o
' ..
Figure 24 Creating Value Help Views in SAP HANA live
2. Once the calculation view is created, then you can select the database
tables, the private view, or another query view based on the fields that
27
Building SAP HANA Live Views 2
will be consumed in the calculation view. Usually, the value help view
will be a projection of the reuse view of the respective business entity.
In our example, we have selected the reuse view Y_CC_WELL_ALLO-
CATION.
lmp.OomoContont ::Y_CC_WELl_Al lOCATIOH VSA
Sct.uric
oQ v ... (OfU!'I'W'I4{36) V.ew ,.,Opofftii!S KtfMChits P•t.-t~tUflJV~ti
.,.,
'"""
,.,_
,,.
..
'Kf Nomt 1.411:1tl
0 Ht.tw~gV.eut Ht-'Mg'l•lue
0 f:nttg)'Uft.t fnttgyUnle
0 t.ct.....Wolll'ft.'lt Actu.r.'c""'-t
0 Entitltdlnttgy (lltitl(d[ntl'gy
3 (ID Join_1 aDO 0
•
Vol~ecfU<rtlkut Vo~uc.nUn.t
0 Artu.N'ollteducft Am,..CV~
0 EncJtlt'dVOIRtducn (tlbtffd'/otR.d"'"
0 AcJ)IIstdntc)td!IOI Alf;usttcJEI\Cltlt<fVol
0 Adjlntdrd:k«l'9f Adj..l~cd[t AdjusttdEI'Uit<Nol I
3 Since we are creating a value help view, then we will select the VALUE
HELP category from the dropdown menu. Once you click on the FINISH
button, the calculation view type will be set to value help.
iCi
Soloct Ce.togory
Scl«t the requested U ttgOty
-
"-· lS
Priv.ttc
R<o.. -·
Qu"Y
V11ut Ht_lp _
j~
Figure 26 Creating the Value Help View in SAP HANA Value Help
28
Extend ing SAP HANA Live Views I 3
Sct:nario GU ~
, .- - -
Oetalh: Output
~ ·:: ... ~
a•
Aggr...
~
Ra.nlc
Vatu~
29
Extend ing SAP HANA Live Views I 3
We'll discuss the steps for each of these custom enhancements next.
Before we get into the details, though, remember the following important
points about extending SAP HANA Live views:
» Do not extend SAP-delivered views directly. Use query or reuse views
for extensions by copying them over to your own namespace.
» Graphical calculation views are recommended for all enhancements.
However, if your business requirement consists of a complex calcula-
tion that goes beyond the capability of graphical views, use script-based
calculation views.
In some scenarios, some unexposed fields present in the views are not
shown in the query view, but your business requires showing those fields
for reporting reasons. Let's say, for example, you want to do a trend
analysis of the allocation volumes discussed in Section 2. The model
already contained the YEAR and DESCRIPTION fields in the reuse view, but
they were not included to the query view, which made trend analysis
impossible. In the following steps, we include the fields by creating a new
custom query view:
1. Open the query view (in our example, Y_CC_VOLUME) from the Demo -
Content package in SAP HANA Studio (Figure 28).
2. Check if any fields required for reporting are not exposed in the query
views. A field may not be selected in either the reuse or the private view
and, therefore, is not visible in the query view. In our scenario, we need
the YEAR and DESCRIPTION fields, which are not present in the query
view (Figure 29). In our scenario, we will assume that all the fields are
included in private and reuse views but not included to the query view,
which is the most common situation.
30
Extending SAP HANA Live Views 3
V PRAContract PRAContract
-.r S.anDat~ Satc-s.Oate
" Ow noer Owne r
~ OwnetlnterestType Owne-rlntere~t lfpe
" Ow nc.r-l ntc:restSc: q~ncc: OwncrlnlerestScqu...
titAio<a;t ionf requoency Alloc:itionfrequen( '/
- OriginatingMeasurementPt Originatir9,1c.uure...
w Transportcr TrarHJ)Oftcr
w VolumeUnit Voto•eVnit
• HutingVaM.Jnit HcatingV•IUnit
Hc4bnqV6tue HulrqV•I ~ ~
w Enerq;Onit ~rwrqrUnit
w ActuaiVobnt:: Actuo~IVolumc
w Ent htedEnergy Fntitlc:dfntrru
VoiR<GxnUnlt \'outeducnUnit
.. w.tiComplet..., We:IJ(omplction
Well w..n
WetG.OnrridcPct Wrt<aas0v<"rridt'Pct
£nt~tedEngyflc dutn [ntitlc:d(nq, Rcdue;n
ActuoiEnorgyR<Gxn Attu•rf:r...r9JRt>ch•tn
ActuoiVoiR<ducn A<tuo~lVoiRt'ducn
EntitlecfVoiReduc.n EntillwiVoiRt-du( rl
Adjustt dEnthtedVo4 Adjustrdfntit~Vol
Adjustc dEntltledEngy Adjustec!lintltted!ncn
3. Since the field is not exposed in the query view, copy the already exist-
ing view to a new view in your own namespace (Figure 29). To copy the
original reuse view, right-click on the view name (in this case, Y_CC_
VOLUME) and select COPY (Figure 30).
4. Navigate to the package where you are going to write the copy, right-
click on the package name, and select PASTE (Figure 31).
31
Extending SAP HANA Live Views 3
f ile fdit View Mavigatt froj tct Bun Win dow !:!t ip
32
Extending SAP HANA Live Views I 3
5 In the dialog box, enter a n ew appropriate name for the custom view. In
our example, we used Y_CC_ VOLUME_M_QUERY_VIEW (Figure 32).
Enter a name:
Y_C(_VOl UME_M_QUERY_VIEW
OK Jl C•n<<l
6. Once your new namespace view is created, include all the fields in the
view required in reporting. The YEAR and DESCRIPTION fields are
included in the custom query view (Figure 33).
Umon
8 ,.OWNJNT_TYPE_CO OWN_INT TYPE ..CD ,.. ADJ_ENTL_CT_VOl:
"'OWNJSQ..NO OWN ISQ..NO - ENTL_CT_VOL_U: _
. .
1
\ill
Proje... ... ,.OWN_NO
"'WC_NO
OWN_NO
WC_NO
e ~'
... WG_OVRO_PC : _(<
- C:UTI rT Hi'\1 , • •
t
_
7 Activate the view by clicking on the ACTIVATE button (Figure 33) and
then test the view by clickin g on the DISPLAY DATA button to visualize
the data (Figure 34).
33
Extending SAP HANA Live Views 3
Hu tingValue EnergytJmt
Sott tnt11e .S.U set
Well
. .ll
« : : :: ::DC7 BCl an.m MBD c:: :: o::
cc :: :: :::: :: coe """""""'' Mel
Mel BCl
57.6
1,046.196 MBD 000000000000007
)II
_,
c: ::::
occom: oo:: :oe """""""''
2000000C01
Mel
Mel
BCl
BCl "·'
1. 8 1.048.913 MBD
MBD
cmomcomoe
occom :oo:: CC1 Mel BCl lUll an..,. MBD 000000000000007
~7
m. """""""'' Sl.Q67 037.696 MBD
...............
000000000000007
"""""""' '' Mel BC3
-
MBD
"""""""' l.S 1,04$..913
OOC«''XX(OU I h
Mel BC3
~ lOU 1.044.913 MBD
"""""""'
"""""""'''
Mel BC3 000000000000008
-7
~()()8 Mel BC3 lOU 1.04$.913 MBD (l(O()I)('(I()OOX()8
lOOO()c))6)1 M<:l SCl 11.2 lll.lll MSD
m.m MBD
«: :::c::: )(IC)C)000006 """""""'
"""""""' '' Mel
Mel
BC3
BC3
12.8
101.2 1,046.196 MBD
000000000000008
000000000000007
« :::cc:: :XKXl000006 101.2 MBD
«:::m: :'XX#.'/JIXI07
••••o•oll)•())0•••7
"""""""'
"""""""' '' Mel
Mel
Btl
Btl S7.6
Sl.Q67
1.04.913
m.m
037.696
MBD
MBD
000000000000008
:::cc:;OC((((()8
000000000000007
.
OOOO<Xc«m 0 (I) o ~ """""""'
"""""""'''
Mel
Mel
Btl
Btl 119.6 1.048.913 MBD 000000000000008
cc:mcc: cmc:oocc:me
"""""""'' Mel BCl
"·' 833.)33 MBD
MBD cmc:oocc:me
c::mc: oo ~(ICI(O<l08
Sometimes, the query view contains many fields that you may not
require. You can hide those fields and use only the fields you need by cre-
ating a new query view in your own namespace. This helps increase per-
formance because unwanted data will not be sent to the reporting tools.
For example, SAP-delivered views often contain fields that are not
required in a final report, such as date or timestamp. To remove unneces-
sary fields, create a new query view with the following steps:
1 Create a new query view in your own namespace or copy the existing
query view into your own namespace (Figure 35).
2. Include the SAP-delivered view in the new query view or paste the copied
view to your own namespace (Figure 36).
34
Ext ending SA P HANA Live Views 3
C'!l · @ . • ~ <> . .
~ S\'st<ms l:l
-
ttt · l !:.!! n
N.w
Open
'
:Ill NElWORK_OO
:m v_cc_wEll..A () Validate Ctri•Stuft +V
'Ill v_cc_vm t _o A<trvatt ( tri+Shrft+A
t> 1.3 Triggers
~
~ ~ :Z.Z_MOM
w llitws
" R•d•ploy
R•v••t To Act•v•
,:! _SYS_Afl
~
;g _svs_BI 4 Oita Prtvi(W
~
f ilt [ dit View ~avig att .erojtct Bun ~in dow !::!•lp
C'!l · (9
~
• ~ <> . . - ~
Ntw
?.o Systems ~ _ '
• Glr Tabl<s Ntw
1IIJ NET' '
1IIJ Y_C ~ Fir\d Ctd+F
35
Extending SAP HANA Live Views I 3
3 Select only the required fields and remove the unnecessary fields from
the copied query view. In our example, the custom query view Y_CC_
SALES_M _QUERY_VIEW does not require the fields SA_DT or WG_
OVRD_PC. Accordingly, we removed the fields in the OuTPUT tab by
right-clicking on the field to be removed and then selecting the REMOVE
option (Figure 37).
Modified_Views::V_CC_SALES_M_QUERV_VIEW
Xtn;~no
L·OUI
Join
<;how: c.AJ:I::..'- - -·'1
8
..
Umon
Projt...
Typt Kty
0
0
N11mt
MATtJR
ACn_VOL.
labtl
t.tATNR
ACn_VOL_U
hbtl (t>lurnn H1ddtfl
0
0
Valut htlp v .. ""
~: ·-
~
lil• e• Del .lib
-ll'frv_~\..ut::lo'.rt ---- . . "' , + ·
,
Output
i!ll 8t
.... "
X
-- w ENTl..CT.VOl ENT\.CT.\/Ot
tiWG_OVRD_PC IVG OVRO I'( • . . Columns '
(Jl)
Join
. 1
Js.mlf'ltk• WTRNSP.J<O
4.110WN..NO
.. OWNJSQ,.NO
TRNSP.NO
OWN NO
OWNJSQ_NO -
'
'
MATNfl' ·-· "" ~'d
ACTL. VOL. U: ' • ..! ..
A( Tl_VOL: ':-· ·-·.. ._
E
.18~- .j
um~m
8 6IOWN..~T..TYPE..<DOWNJNT ..TYP£,J O ' DESCRIPTION: ._: ~E
S FREQ_CO fR£Q_CO
f iS<Al.YIAR: · ._:. iJl
~
Projt... ;.,:
" ORIG_,..,.)¥:)
MATNR
ORIG. MP.NO
MATNR
'' SA. DT..J: · •...: :tl_:--_.
•_:..
.
5 SA.OT SA_DT A( TlJNERGV.U:
a•
Aggr...
'=] <Jl) Join_l
W'<lDJcin_1
(I)
I
• owN. NO).
• we_NO
OWN.)¥:)
WC_NO
[l.~
j ' -
..
HEAT VAl
·~
• :;.reA-, ...
-
~
.
e ACTL. VOt.U ACTL..YOl..U
Prop~• tie-s
b nl.. Jv _oc_v.et.L..AU.O. e ACTL_VOl ACTL_VOl
t •~
5 DESCRPTION OESCRI'TION
e n AR YEAR
.
Ptoptrty V• lut
-:I <II> Join_1 <ll S SA.OT.) SA.OT
e ACTL_ENERGY.U ACTL_ENERGV. U Namt Aggttga\IOn
JR.OCCJ>COSTTES .. tiHEAT_VAl HEAT_VAt hbtl
...., R..OCC~TCOS 5 HEAT. VAl). HEAT. VAl). Typ< Aggregatioo
tiHEAT. VAl.U HEAT. VAL_U lnputsl ll Jo•1..2: INodtl
tiENTL.CT_VOt_U ENTI_CT_VOl_U
S ENTL. CT.ENER ENTL CT ENER
.
tOO'.O <.:\ 1.!\ ;:j !..:! ~ sr-• - @ '!! ;j :..:i 1::: ~
37
Extending SAP HANA Live Views J 3
I~
- CR~
EA~T~
E ~co=L~U~
~N~TA~B~
L E~.. z=
z~_L~C~
!"~
• .~
.. Y
~_~
CC~_~
OO
=f~
lii=
Tr=v=
E·~
· 7.
("~
' ~~
AI~
ID~
T"~NV~A7 AR~(73~
RC~H~ ) ~D=
EF~
A~U L~T-.~~
~.-
. ---------------A--
''Dl_IIO'' NVARCHAR( 20) DEFAULT ' ' r
''Jifl 110'' NVARCHAR( 20) DEFAULT ' ' ,
'''.'ATIIR'' NVARCHAR(18) DEFAULT ' ' ,
''CT_110'' r..'VARCHAR( 10) DEFAULT ' ' ,
''SA_DT'' NVARCHAR(8) DEFAULT '00000000' ,
.. DATE .. NVARCHAR(8) DEFAULT ' 00000000' ,I
..Oflll 110.. NVARCHAR( 10) DE FAULT ' ' ,
..Oflll-IIIT TYPE CD.. NVARCHAR( 2) DEFAULT ' '
..Ofiii=I~JJO.. NvARCHAR ( 2) DEFAULT " ,
..ORIG_''P_110.. r..'VARCHAR (20) DEFAU!.T ' ' ,
.. TRIISP_110.. r..'VARCHAR( 10) DEFAULT .. ,
.. FREQ_CD.. NVARCHAR( 1 ) DE FAULT ' ' ,
.. ACTL_\A?l_U.. NVARCHAR (3) DEFAULT ' ' ,
.. ACTL_\A?l .. DECIMAL( l3, 3) CS_FIXED DEFAULT 0,
.. HEAT_VAL_U.. NVARCHAR ( 3) DEFAULT ' ' ,
.. EJJTL CT IIOL ll' NVARCHAR (3) DEFAU LT '' ,
.. EIITL=C(EIIER.. DECIMAL( 13, 3) CS_FIXED DEFAULT 0,
.. ADJ_EIJTL_CT_EIIER.. DECIJ.IAL( 13, 3) CS_FIXED DE FAULT 0,
.. EIITL_CT_EJJER_ll' NVARCHAR(3) DEfAULT ' ' ,
..OIU_ CRUSER.. r..' VARCHAR (12) DEFAU!.T ' ' ,
..OIU f iVESTA" P.. D ECI~IAL (1S, 0) (S FIXED DEFAULT 0,
PRIMARY KEY ( .. ''AllOT .. ' .. DL_IJO" . -
..HL_IIO.. ,
2 Create a private view for the downtime table and select only the
required fields by right-clicking and then selecting ADD TO OUTPUT. In
our example, we have selected fields such as DL_NO, DATE , CT_NO,
and MATNR for showing reports on object downtime (Figure 41).
--'"
q ·..-... 5 DL_NO ~I ·+ H ·:1 "I.... ·Ie. e•
d ...
<ll> ] Se.-;.o
~ NW_NO
5 MATNR
~.NO
j 8 ~ C olumns
I Dl_NO: _((_~· ...
-~
Jom 5 SA, DT Add To Out put I NW. NO: :~. :::." .....
. l . ~ DATE I MATNR: _(.:_:·,.., T
8
Union
... {W
. ;:-}
... .
$ OWN,NO
tiOWNJNT_TYPE_<D
• DOWNTlME_TYPE
Propagm to Stomarrtrcs
$elect All Tables
~le ctAJI
I
I
I
SA_DT: _c.:_.:t.; ..
CT_NO: _((_:·v
DATE: . C ~- ~C ..
-
-
-
~
Proje... Joms
• OWN)SQ_NO
••
Ag9r...
I "'ORIG_MP,NO
w TRNSP..NO
Cc:sdc:ctAII
Propc-rtt~s
-• I
~optrties
"'FREQ._CD
~ w ACTl. YOL_U
Genttal)
Rank
.. ACTl.YOL Proe!!!l J Value I
"'HEAT.VAL.U Name Projection
"'ENTl.CT_VOl_U hbtl
"'ENTl.CT_ENER
w AOJ_ENTl_CT_ENER
ENTL_CT_ENER_U
- Type ProJtct1on
OIU_CRUSB\ _:::]
1-
l"lo0%1:\~ ;_j .,_,j :g l•o~~ o (l) ~;j ::::J I? 4
39
Extending SAP HANA Live Views 3
DemoContent::V_DOWNTIME_ALLOCATION
Sctn.ano Outp.rt
DI•OCOitttt:'I'.CC..WRt_Alloc;.ATJ:)H '"Zl_tcX.Y.cc_DOwtmME :z • ,.. z --4' + • 1!1+ 8 '
w EHT'L_Cf.£HEl.,.U 91Tl_Cl .ENEILU . tu.HO T
• w am...CT.fHEl 9lTI,.Cl.ENEl e ou«> .-. ;a. Columns
w fHTLCTJ •OLU 9lTLCT.VOLU w tlW..HO ~ AI>J~NTL.<T_ENER: · ' _!J
WAQI..(Hl\..CT,\Q AOI..OtTt..CT.vot e N.ATlfR
r ENIUUNER: • ••• ~
Jorn
8
- wfHTL,.CT. YOt
• .,.,'G..OII.OJ(
wrt.IQ_CO
EHTl.Cl.VOI.
'I!IG.OilD.K
fl(Q_CO
.......
wCTJ«)
e oATE
r ENIUI.VOl.V: • ' . :
r HI'AT.VAL.V: • "<". '
Umon
.1
• OD:i!..MPJI()
w TtHg_HO
OIIIG..M='.~
TIJfSP.NO
• oWN.NO
• o WH_lNT. TYPE.CO
r OlJ'IO: . cc. •
' ri: ""~·
Ormt.JHT.l"f'J(.C D <MWJNT.TYP(.CO ¥ 0 WHJSQJIO
PrOJt... Oo'iHJSQ..NO OMUSQ..NO ~ ORICi.MP.NO .......
a• " OW'N,.'IO
wWC.IOO
OWN.fCI
WC.Ml
VTAHSt. HO
w FOlQ..CD
Aggr... WMATHct UATMR • ACrl.'JCH. U
... s.t.._or SA..ar
~ ~ YfAl
WAC'Tl.'«H
WH£1\T.VAI..U
R.tnk DESCilP'ti)N OESCIIrmoti EHn_cr_vcn_u Property V•lue
ACTt..VOl ACTI,_VOl EHTl.CJ.IiHER Namt Jo•\..1
ACll...\'Ol.U ACTI..\'0\..U AOJ.Etm.CT.EN(R
t§AT. VAl,.U 1€1\.T V.QU
• fHTl,CT. tMCR..U hbtl
t«A.I'. VAU l<oloT.\I,,Ll OIU.CRUSER Typ< Join
~'I.VAl '-tAf.VA.l au.llld:ST.u&P
.t(:TL._ENUGY.U 1..01 Join Typt Inn«
Otn>oConttnt::Y_DOWNTIME_QU ERY_VIEW
Sun.ario
4 ·.) ...
rlf Dl"mo( ontr nt Y I>OWN i lMI AI I ()(A I ION
(:> ... ., OWN.)SQ..NO: .~. .. •
.. Ol..NO 01.)'10
• NW.,NO NW~NO - OWNJNT..TYPE..CD: .. ='
<ll> I ORIGJ.<P )'10 : .:
WMATNR MATNR
"'CTJ«J cr..NO ' FREQ_CD: -~-. - ! - i
8 -..CT_NO_l CT_NO_l - ACIL..VOL..U: .. ~ _ , .,.
Union wSA_OT SA..DT I ACTL. VOL. V).:
.;J t.IOATE OAT£
.,. J
- ACJL,.VOL: ..:
ProJt••• 8 0WN..NO OWN.NO
e oWN)SQ)'IO OWN_ISQ_NO
~~·
Aggt... _!OWNJNT_Tm_ro OWN INT TYPE CO
e ORIG ORIG tv'F NO
&J -.,. TRNSP_NO TRNSP_NO
Rank e FREQ.CO FREQ.CD P1op>trty
e ACTL..VOl.U ACTL YOI. _U
e ACTl.VOl ACTL. VOl N.amt ORIG MP NO
e ENTL.CT..VOl..U ENTL..CT..VOl..U o~t.a Typt trYARCHAR
e ENTl.CT.ENER ENTL_CT_FNFR Fil'ttf
e H:AT..VAL..U HEAT..VAL..U length 20
Suit
5. In the SEMANTICS node, mark all the included columns in the query as
attributes or measures by selecting the column and then clicking on
MARK AS ATTRIBUTE or MARK AS MEASURE (Figure 44).
40
Extending SAP HANA Live Views I 3
...
PrOJt ...
0
0
Dl ..NO
NW..NO
Dl,NO
tr.•.•_NO
o• 0 MAn~R MATrtR
Ag9r... 0 CT.NO CT_NO
(Y 0 CT.NO.l CT..NO.. l
Rank 0 SA.DT SA.OT
0 DATE DAlt
0 O'NN..NO OWN..NO
0 OWNJSQ..,.. OWNJSO_NO
0 OWNJNT.... OWNJNT_TV ...
ORIG_MP_... ORIG_MP_NO
:- _ 0
r:l. ~~·~"'--~'"_Y." ' ~f"'J>t .....
41
Extending SAP HANA Live Views 3
-I:::~.:~: ::~.~- ~
4 ·.L . ...NW_NO
WMATNR.
. , ... <0
• cr_NO
aD _,SAJ>T
Join .. oAn
"'OWN..NO NW.NO: _t _;- •
<T ..NO: - ''· -~ ., "'
e,.,a.nd/CoUa.pst SAJ>T: _, ._: , •
OU.l!Puvif'W 00\VNT...E_TYPE: _( • •
""
Projt.-
o•
, ,-,
Aggr... Otstlt<tAII
~ ~ Auto·l a.yout
Rank !.w'lt<h to PrOJt<bon
( tri •O
'---.,.---, ........,..,...,_,....._- ='
"'OIIJ.CRUS!R
WOW..TIMESTAMP
<[
10 ~+ -
loc~
aD
Join
8
Show: L:I
AI ----l
::...
I ·l " .. - wd.
Umon Type Kty Name hbd Aggregation Vari11ble label (ol\unn Hidckn Vah.a help Vflt'N/
l: 0 DL.f<IO DL_t<O 0
PrOJf'··· 0 MATNR MATNR 0
o• 0 tM'_NO NW_NO 0
Aggr... 0 CT..NO CT..NO 0
,y 0 SA. DT SA_DT 0
lhn~ 0 l>OWNTIM... OOW>ffiME_T•.. 0
0 OWN_INT_... OWN_INT_TY... 0
0 ACll..VOl ... ACTt..VOl..U 0
0 AClt.VOl AClt_VOL Sum 0
0 H~I\T_YAI -. H~AT_VA.I _V 0
0 HEAT.VAl. . . HEAT. VAl.U.l 0
42
Extend ing SAP HANA Live Views I 3
Now, copy the standard SAP query view and then paste the development
objects to a customer-specific package with an appropriate and unique
name that conforms to your custom object naming convention. The steps
to do this are as follows:
1. To copy the original calculation view, right-dick on the view name and
select COPY (Figure 47).
f ilt fdit View Mavigate froje·ct Run ~indow !:!:elp
['l ~ i(.J ·rs ~
~ ~ ¢r ~ ~
• J _svs_REPO
~ _$YS_TASK
~ \AJhert· Used
~
t> b Provisioning Jj History
~ liP Content X Delete and Activate
~ tB Oemo(ontent
~ ... Calc\rlation Vit'W f' Auto Documentation
'J v_ccc_oow Copy (t~ + (
.!] V CCC 'NELL
:F] v~cc_Oowr.
Rdactor •
:'J Y_CC_VOLUME
:!'J Y_CC_WELL_ALLOCATION II J
lOO%
2. Navigate to the package where you are going to write the copy, right-
click on the package name, and select PASTE (Figure 48).
3. In the dialog box, enter an appropriate name for the new custom view.
In our example, we used Y_CC_CUSTOM_DOWNTIME_QUERY (Figure
49).
43
Extend ing SAP HANA Live Views I 3
= El
~:· · [ New
New
:;::j
4 ;,. Catalog
~ lOr Publoo ii':<, Find (tri• F
Rtfrtsh FS
tl
~ "'ll svs ['J Auto Do<umtntauon
~ ,'l UPLO 0 Activate
~ J :zz_t Rtdtploy
~ ,C: ZZ..M
_svs_
~ .~g
" Edit
Dtlttt
~ ~ _svs_l X Otlttt
~ ~ _svs_l Remove Filter
~ ~ svs
~ J ~svs~ ~
1 Fi~tr Objt<t s...
e. Provosoo"J, Paste
~ liP Content· Rtfa<tor
~ ffi Modot
~ f!i. Smority I
Figure 48 Pasting the Copied Query View
CoK~ I Canctl
4. In the AGGREGATION node, add the necessary columns and the customer
field DOWNTIMETYPE by right-clicking on the columns and then
selecting ADD TO OUTPUT (Figure 50).
5. In the SEMANTICS node, mark all the included columns in the query as
attributes or measures with the MARK AS AITRIBUTE and MARK AS MEA-
SURE buttons (Figure 50).
6. Save and activate the view by clicking on the icon shown in the green
rectangle in Figure 50.
44
Integrating SAP HANA Live Views with SAP Business Intell igence Solutions J 4
Modifitd_VItws::Y_CC_CUSTOM_DOWNTJME_QUERY
Sctnario
<1 ·::• Palt ...
(olumns{l.S) VitwProptrtits Hrtrar<hits PuamtttrVVariablu
l oul
<Jl)
Join
I Js.o=o.
't
rl
Sl>ow' ,__I
AI_I _ _ _,
•I - , a• o • • [!].- 'b
8
Union
• 0' - : - 91 ~,:P• ~8<)' N";NjlO
h btl
t-rn_NO 0
"' ()'NN_f..IO OWN_NO 0
o· Tl\IISP_NO TRI'ISP_NO 0
Aggrtgat... u o •m.vot... •cn_vol_u 0
;g) I 0 FREQ..CD FREQ..CD 0
Ranl. i 0 0WNJ5Q_... OWNJ~NO 0
R 0 O'I.'N_M"_. ~ OWN_INT_TY... 0
0 DOWN'TlM.. OOWNllME.T•.• 0
0 OWN.J'IT.... OWNJNT..lY... 0
0 ACTL.VOL... Affi.VOl.U 0
'
. 0
,..,__ ACn _VOL ACTl_VOL
.._.~ ... ,{}0. ' _ _ _ _ _ _ _ -.r:->
,._-'""-
0
45
Integrating SAP HANA Live Views with SAP Business Intell igence Solutions J 4
Warehouse (BW) is more suitable, and SAP HANA Live is not necessary.
In situations where all three types of reporting are required, our sugges-
tion would be to adopt a hybr id model, which is a combination of SAP
HANA Live, SAP BW, and SAP BusinessObjects BI. This approach is
described in Section 4.2.
SAP HANA Live can be integrated directly with all the SAP Business-
Objects BI tools (SAP BusinessObjects Web Intelligence, SAP Business-
Objects Dashboards, SAP Crystal Reports, SAP BusinessObjects Analysis,
and SAP BusinessObjects Design Studio) and SAP Lumira via SQL and
ODBC connections (Figure 51) to fulfill reporting requirements.
virtual data model to SAP BusinessObj ects Design Studio to showcase the
data in a visualization. Please note that, although we use SAP Business-
Objects Design Studio as our example, the steps in this process are the
same as for any of the other SAP BusinessObjects BI tools and SAP
Lumira .
1. In the ODBC DATA SOURCE ADMINISTRATOR, select the SYSTEM DSN tab
and choose ADD (Figure 53).
2 Choose the SAP HANA database driver HDBODBC64 (Figure 54). If this
HDBODBC connection is not available, then you need to install the SAP
HANA Client Software from the SAP Software Download Center.
47
Integrat ing SAP HANA Live Views with SAP Business Intell igence Solut ions I 4
I 01(
II Concel I Apply ,I Hop I
Venion Com
l l!!\r:1'iTir:lil J 1.00.55.48833 SAP
SQ[Te<ver 6.01.7601.17514 Micr
SQLSe~verN ativeeiert10.0 2009.100.1617.00 Micr
<Back ~I Cancel
3. For this example, enter the data source name and description as "VS5".
The server and port is hana.sap.edu:30015 (Figure 55).
4 To test your new connection, choose CoNNECT, enter your SAP HANA
user name, password , and server port (hana.sap.edu:30015), and choose
OK (Figure 56).
Integrating SAP HANA Live Views with SAP Business Intelligence Solutions I 4
~len
S<Mt...t Port
Server:Port
Server
Password •••••I
5. You will see a popup that says CONNECT SUCCESSFUL! (Figure 57).
Connect successful!
OK
6 The new connection is now added to the SYSTEM DATA SOURCES list
(Figure 58).
49
Integrating SAP HANA Live Views with SAP Business Intelligence Solutions I 4
U... OSH S,.Oom OSN flo OSN 0...... T"""" ~ P....... Hx>J.
:i>J«... o.tos.ue..:
"4<J ,.
HOB008C
MOOBC Sy«etn&ta sout:e teotMWOIII'IilbOtl abol.t how to<:Onf'l«t to lhe hCScated di!ta l)ft:Md«.
AStslem data eouoels vistlle to al u.s of this COfi'IPIJ.et, l'lc:ludrlo t'TteMoes.
D:J wo,d20U
. I"'.UOll
50
Integrating SAP HANA Live Views with SAP Business Intelligence Solutions 4
I~ Ttmplltt Catt9~lc~><
::.:•':::'"':!C"'::::-="----------'
·I
[ J!><l
=
3. This creates a blank template to which we will add SAP HANA Live
views as data sources. To do this , click on the ADD DATA SOURCIE button
(Figure 61).
:-) SAP_Pre-s:s_H a.na_U~_R.e-port ·SAP Bu ~iMssObj-ect Ot-~ig n Studio
~pplication Pla,,ning fdit ).a.yout ~arc h ~tw Iools !:!.~lp
:
rH~ i ~ !!! IJ i '0 . ;.
c
-.-: Componenh t:3 008 0
typt fJit u u xt
1-
f!>. Analyti< Compontnts
(!:> BasK Compontnts
~ Containtr CompontnU
~ Custom Compontnts
e Xn (ommunrty GtoVI S
~ Sen Community Prototyp~s
-
~ Outlint ti '\... 338
..,. c
0
'YI•t hlttr ttxt
• li] SAP_Prtn.Hant~_L ivt_lt~po11
~ o ... ~ -
•
~ Pl•nn;~ ~ Add o... Sou«<...
Qt. L t~yout
~ Ttchn·
Add CurtomOiltll Sour<t> .
'll co~ Past<
You can connect SAP BusinessObjects Design Studio with SAP HANA Live
virtual data models using an OLAP connection, which allows us to view
51
Integrat ing SAP HANA Live Views with SAP Business Intell igence Solut ions 4
the virtual data models (Figure 62). The OLAP connection is created by
your SAP Basis team (Figure 62).
I '"' ~C-.-!ltl
.... B.I'IO<(OnopcHI«<U
• . (Ofttilnoro ~I'CJ
~- CUJtom~J
l L <il ...._
r)j'-""'
- "''•
_ c...c...• "'_"--, y l l ~ F<llclm l=.;
'- _ _ _ _ _ _ _ _ _ .4' S.:::•o::
••~----------,
~-- -... c'"'""'··~ Gnwot
~ ~~~C~PtO'~I"' , _._,, W_M....I ler--1 ~ w.:;;;~Ht'COf'
1~ Outllllt u
= • Conn.to<-1!1~t ~ N.Ia upt-e.1
l&r...tL.. I Qt. tymtn-loul · tt<~~k<ol
tvl)c nil:~• t tl(
O.ot• SoulctAiiu • OS_t (dd'I'Jit)
~ [I) SAP.frtti_HI~h·;c__R~on
Qt O.ota'j,oouoct't
a. Pt-.g ObJ«tf ..........
~ l~ovt
~ . . f.C~.oji(OO"f''"~
~ CONTlXT..MfllU
~======~==========~
I .......,. ! ~
Once you have added multiple data sources to SAP BusinessObjects Design
Studio, you can use SAP BusinessObjects Design Studio to design a report
like our example production allocation report shown in Figure 63.
r
,,
10
-- --
"
52
Integrat ing SAP HANA Live Views with SAP Business Intel ligence Soluti ons I 4
SAP HANA Live, together with SAP BW, provides a best-in-class suite of
analytical services. SAP BW offers multiple advantages that are not pres-
ent in SAP HANA Live, such as:
» Hierarchy support
Only simple hierarchy features are supported in SAP HANA. For more
complex hierarchy needs (t ime/version dependencies, sign r eversal,
etc.), SAP BW is required.
» Complex data transformations
Only simple data transformations are supported in SAP HANA. For
more complex transformations, SAP BW is required.
» Authorizations
The authorization concept in the SAP HANA core is simple and covers
many use cases in most situations you may encounter. If specific func -
tionalities are needed (such as authorization variables and hierarchy-
related features), SAP BW is required.
» Report-to-report interface
The report-to-report interface is a functionality that enables j umping
from one report to another or to an SAP Business Suite transaction. SAP
BW offers a wide range of report-to-report capabilities, which work in
tight integration between BEx queries and various backends or target
reports.
» Planning scenarios
Simple planning scenarios via (stored) procedures can be created in SAP
HANA. On the other hand, the standard functionality of planning in
SAP BW (PAK/IP/BPC) is also rich.
In this section , we will take the same production allocation report that we
created earlier with SAP HANA Live and SAP BusinessObjects Design Stu-
dio (Figure 63), but instead, we will use SAP BusinessObjects Design Stu-
dio on top of SAP BW to create the report. When an SAP BW system is
53
Integrat ing SAP HANA Live Views with SAP Business Intell igence Solut ions I 4
I Master Data
Provider
I
Master Data Transactional Data
/
/ \
SAP HANA l ive
Calcu lation View
I SAP BW Schema
(Reuse layer)
54
Integrating SAP HANA Live Views with SAP Business Intelligence Solutions 4
,.-r"
f ilt
SAP HANA Modeler SAP H4NA Stud1o
f dit
~ Sl'•t•m• !:3
Navigate f_rojt<t B.\•n
NewWindow
Editor
H;d• Toolbar
r=
Window Htlp
<::> ~
Navigation
Prtftrtn<ts
E8 I ~ 9-P I-IAtiA Adnlii\IStrMJOn Contolot ~ SAP WANA Modtlt; (I) fffl Moddng
0 = 0
~ iO .•. ..
•;r:;~•••••••••••
6olnto
c.~ h i(
CtrhShdt•O
0
. . ;.,..
CJ f-oldtr
X Dtlttt Otktt ~ ew Qutry-
Ro:mo•~ fr m Contt<t trhAJt• !ft.-D m £J CompouttProYidff-
• Import... '::1 OptnOOSV1ew...
(JOPort...
G DattSt01ot ~ct (•dv.ti'Kcd),_
t} RtfrHh
{ lou Projt<t "
0 UnreltUd PrOJKb L9 0tlur...
V. .d11tt
ProfiltAJ
OtbugAs
Run A$
R«tort from Loc~ 1-MtOI)'··· tion .-.
Complllotwltl\
Conf•gu•t
S...«
55
Integrat ing SAP HANA Live Views with SAP Business Intell igence Solut ions 4
1/ CompouteProv1der
Op<n et Open ODS Vitw
l•lCAI ( ross-Applicat • .
fi)(RM) CustorntrRt e
GttWhtrt--Ustd l•st. ..
IOFS<f.f) Financial Su (I Refresh FS
{ 1lH( t.l} Human Reso . . . ; : : . - - - - - - - - - -1
1. Enter the BW PROJECT, NAM.E, and DESCRIPTION for the Composite Pro-
vider as shown in Figure 68.
- I o 1..2LJ
M a ndatory Information
<D SV•cify obj•ct n•m•
InfoAru:• Srowse...
r Add to Favorites
J PRODAllOCRE~
Description: J PROOALLOCREP
2. Click on the SCENARIO tab and then left-click on U1/UNION to select the
ADD button to add the SAP HANA virtual data model as shown in Figure
69.
Integrat ing SAP HANA Live Views with SAP Business Intelligence Solutions J 4
\ ~ m Jy e Jy <±1 8
.G Print... -I Iii CD IU1J N••l•1))
Delett
., .
I
I
~ Rc:prace.
(f) Join with..•
e un on .mh
r'~ S. rtch Inputs
Sort
3. Now add the SAP HANA virtual data model to the Composite Provider
as shown in Figure 70.
Ill
4. Create the output structure for the Composite Provider (Figure 71) by
moving the SAP HANA Live virtual data model fields from the left-hand
side SouRCE column to the right-hand side TARGET column (Figure 70).
The output structure fields will then be exposed to the BEx query.
57
Integrating SAP HANA Live Views with SAP Business Intelligence Solutions 4
~ Output: PRODALLOCREP
"" ComposrteProvider Fi~kls
*
• (0 (!Keyf i gures) K<y Frgures
(OOPENORDQTY) Open Oelr.ery Qty In Base Unrt
jp (ONET_VALUE) Net Amount
5. Create the BEx query (Figure 72) according to your requirements from
the recently created Composite Provider. The BEx query will then be
exposed to SAP BusinessObJects Design Studio to create the production
allocation report.
.,
lnloProvider l~owsiColumns
:: !J f - ChclreK:4erUtiet
fi .-·i A.:IwiY0201• I Pl'opcr'li>es
~~... ~,($~ -"
a 0 Kerrogur~•
"'"-......., s f~~·Y
flNAiiCIA.LMOIHH
9- iij -
.......,....,_,
'9~ 1 ~ ·
a
,u. .
e o..n..Mw~.
' it Oifl'.oiMoOftt
G'
tt r~~
Aetu.IIY02015
Ttf901Yl02015 ................., ......, ,....... J"""'-1
Our.~ipllian
r~-·
• La ·
r u.~d t...,
recllniu!N..
~ A-• I
~lit:.eoJf".go..M
Pi cvicw
Actl.llf ~ ~ 'RO , ..O't: Y\0 1)1' ....
. "'ff~ l
.......wor """'........
t
• 'W.Jec.de'on 2 (
f8 \o/et~ 3
~ "'el~4
Wlti~S
.... .... (
( T
""' (....
WoT ( ....
~
J
"' f ilt:r fl lO'o'r\/Coh,lf'Ml I
6. Now, start SAP BusinessObjects Design Studio from the START PRo-
GRAMS m enu as shown in Figure 73.
Integrat ing SAP HANA Live Views with SAP Business Intelligence Solutions 4
DJ VJord ltlB
• f X(tl 20l3
Ill Powt1P04tlt 20 U
~ Qu~l)' Du•gntr
(;SAP Logon
~ SlliPI)I09 TOOI
) f.lottpad
•.J Pamt
1111
~ AtiJiytl( COtl'lpontnu
AppliG:Iitio1t
l & s•<(ompot'lci'IU
I~ (ontMMW (ompontnu (Jtatt '" •n•IY'Iolt •pphc•t•on
~ (unon'l (ompont•nu
Now, we have a blank template to which we can add SAP HANA Live
views as data sources for SAP BusinessObjects Design Studio.
59
Integrating SAP HANA Live Views with SAP Business Intelligence Solutions 4
e ~c~
~ 8oiOC(-'f'~
~ conu.." <~nt'
~ Cu$~Compot~mu
~ ~... c~Gc..o..
O S~"<~~o~y~
O•'*-u:• 1• -1
tvp~fllldlt•l
O•~Se..uAII~· OS.l ,.....,
• [il W J'•mJ4.,.•.J-Jt•poot
a. ~~(t~
&. flbniWigObJ«U
ll> t -
. QJ, Ttdw<• C~
~(OtntX'T_MEr~
]j
F o;
.. ~
60
What's Next? I 5
,,
10
I 2 3 4 5 6 1 8 9 10 II 12 1 23 45 &78910 11 12 1 2 3 .. 5 6 1 • 9 10 11 12
5 What's Next?
If you've mastered SAP HANA Live, it's time to take your skills to the next
level. Are you taking advantage of all of SAP HANA's advanced modeling
capabilities, such as predictive, simulation, optimization modeling, and
more? For your next challenge, learn what SAP HANA has to offer in the
realm of advanced data modeling.
In addition to this book, our editors picked a few other SAP PRESS publi-
cations that you might also be interested in. Check out the next page to
learn more!
61
More from SAP PRESS
Akash Kumar
PlanViz: Improving SAP HANA Performance
ISBN 978-1-4932-1300-9 I $14.99 I 75 pages
Eric Du
SAP HANA Smart Data Streaming and the Internet of Things
ISBN 978-1 - 4932-1303-0 I $9.99 I 85 pages
Wojciech Lukowski
Data Aging for SAP Business Suite on SAP HANA
ISBN 978-1 - 4932-1346-7 1 $14.99 1 101 pages