Professional Documents
Culture Documents
OpenSAP A4h1 Week 02 Transcripts
OpenSAP A4h1 Week 02 Transcripts
SAP
ABAP
P Deve
elopment for SAP HANA
A
WEEK 2, UNIT 1
00:00:13
00:00:20
00:00:23
Hi there. Before
B
we sta
art with unit 1, let me outtline the seco
ond week of this openSA
AP course:
ABAP Cod
ding: Where to Optimize?
?
00:00:33
We will sta
art with introducing you tto tools to find and spot potential
p
funcctional issues
s in your
existing ABAP
A
coding,,
00:00:43
static code
e checksw
we'll continue
e with that in the second unit
u when it i s going to be
e about
optimizatio
on potential
00:00:50
00:01:00
Finally, we
e will show you
y some reu
use compone
ents that we have improvved for perfec
ctly running
when runn
ning on SAP HANA.
00:01:10
00:01:20
But let's ju
ump to the slides and havve a look at what
w
migratio
on to SAP HA
ANA means
00:01:28
00:01:35
We will sta
art with the Detect
D
phase
e mentioned already: func
ctional corre ctness and, of course,
also perfo
ormance optimization pote
entials.
00:01:44
00:01:51
t explore the
e features off SAP HANA
A and really re
ethink and innnovate yourr
and how to
application
ns.
00:01:58
You will se
ee the slides
s a couple off more times in the upcom
ming units.
00:02:04
Okay, so now
n
let's go to the first sttep: migration to SAP HA
ANA.
00:02:10
00:02:18
00:02:28
to show yo
ou tools to detect those p
potential func
ctional issues.
00:02:35
00:02:46
u
for exa
ample, Native
e SQL coding
g with, for exxample, an EXEC
E
SQL
and this iss when you used,
and where
e you really relied
r
on nat ive database
e features an
nd also used them in your coding.
00:03:04
Also there
e are some is
ssues with im
mplicit DB-sp
pecific behavior, which meeans that da
atabases
have, of course,
c
algorithms in the ccoding
00:03:15
where the
ey do their op
ptimization w
when selecting and preparing the dataa as you wan
nted to have
it
00:03:21
y, for examp
ple, an ORDE
ER BY clause
e in your SQ
QL statement,
and if you don't specify
00:03:27
00:03:37
Yes, we have
h
prepared some code
e snippets sh
howing you exactly
e
what we talked ab
bout,
exceptions,
00:03:44
e it again, ev
verything will work fine wh
hen migrating
g to HANA eexcept for tho
ose
so to state
exceptions that I will show you on the next slide.
00:03:55
And those
e exceptions are then, of course, whe
ere you have to adopt maandatory ado
options in
your ABAP
P coding when migrating
g,
00:04:05
for examp
ple, from SQL
L Server to th
he SAP HAN
NA database.
00:04:10
00:04:19
If it is valid
d for any database, then of course, it will work als
so on SAP HA
ANA.
00:04:25
00:04:37
The proble
em with Native SQL here
e in that case
e with ABAP Database C
Connectivity, the ADBC,
that reallyy then gives you
y a runtime
e exception
00:04:47
and those
e are, of courrse, are not th
ally in producctive coding.
hat nice to have, especia
00:04:53
00:05:04
00:05:12
00:05:18
SAP HAN
NA uses another ordering algorithm when
w
retrievin
ng the data thhan, for exam
mple, an
Oracle Da
atabase.
00:05:25
That is no
ot really a pro
oblem. Let's ssay it like this: It's just un
ndocumentedd behavior
00:05:30
00:05:40
uble and it is especially problematic since you donn't even get a runtime
you mightt get into trou
exception that will give
e you a hint tthat there is a problem.
00:05:50
m
get som
me random orrdering and you
y have relied on a speecific ordering
g and that
But you might
gives you nonsense fo
or your appliccation
00:05:58
m
not eve
en get notice d in the first place but on
nly in your prooductive sys
stem.
and that might
00:06:04
Nonsense
e data is neve
er a good ide
ea in the bus
siness proces
ss. Not reallyy.
00:06:10
So here fo
or example, ifi I have a SE
ELECT state
ement without a specific O
ORDER BY statement,
s
00:06:16
and later on
o use that data
d
in a read
d table with binary
b
search, that mightt get you into
o trouble.
00:06:25
00:06:35
00:06:43
and not fo
or the SAP HANA, that al so is a mand
datory adoption that you have to do before
b
you
can migra
ate to SAP HA
ANA.
00:06:51
Maybe on
ne more last word
w
so thatt you don't ge
et into panic mode or som
mething like that,
t
it's just
on Native SQL statem
ments.
00:06:59
S
stateme
ents will run o
on any datab
base, since Open
O
SQL is standard an
nd database-So open SQL
independe
ent.
00:07:07
00:07:11
00:07:16
f that we have introducced new statiic code checks to really sshow you tho
ose code
Yes, and for
snippets that need ma
andatory ado
options
00:07:27
00:07:35
00:07:41
00:07:47
and this iss our all new ABAP Test Cockpit and this ABAP Test
T
Cockpit is natively in
ntegrated in
our ABAP
P Development Tools
00:07:56
but, of cou
urse, also av
vailable in the
e SE80.
00:08:00
Yes, and to
t mention th
his here on th
his slide, the
e availability of
o that tool iss even before
e 7.4,
00:08:09
00:08:15
00:08:20
So the AB
BAP Test Coc
ckpit in its co
ore has Code
e Inspector th
hings,
00:08:26
so let's sta
art with the Code
C
Inspecttor, so the Co
ode Inspecto
or inspection methods.
00:08:31
Let's have
e a look with the shortcut . I'm going to
o the well-known Code Innspector.
00:08:38
In order to
o find functional issues in
n your coding
g, we have provided a gloobal check va
ariant.
00:08:48
Here I use
e the global and
a we have
e introduced FUNCTIONA
AL_DB, it is ccalled.
00:08:56
00:09:07
00:09:17
00:09:27
00:09:35
So you se
ee we have th
hese checkss. So in principle, you wou
uld now go aand execute that or
check thatt Z-coding in
n your system
m
00:09:46
00:09:52
ke to not sho
ow that with the Code Inspector, but w
with the ABAP Test
However, we would lik
nd in its full integrated in the ABAP Development
D
Tools and E
Eclipse.
Cockpit an
00:10:02
For that, le
et me close that,
t
I just co
opied the FUNCTIONAL_
_DB name heere over. Clo
ose that, and
d
go for the ABAP Proje
ect, right-clickk,
00:10:13
00:10:22
You can of
o course, configure your system or th
he ABAP Tes
st Cockpit in your system
m to run with
a FUNCTIONAL_DB variant
v
00:10:33
an also switc
ch to that in yyour specific Eclipse insta
allation or thee ADT installation.
but you ca
00:10:41
So here th
hat is the deffault of the syystem and I will
w change that
t
with FUN
NCTIONAL_
_DB and
Apply it.
00:10:48
And in ord
der to showcase what the
ese check tools are capable of, we haave provided
d some bad
guy doing all of the stu
upid things th
hat you shou
uld not do.
00:11:00
STATIC_FUN
NCTIONAL and I'm just... I don't tell yo
ou what the
So I have a report ready called ZS
es.
report doe
00:11:14
I'm just do
oing right-clic
ck on the rep
port here in th
he Project Ex
xplorer and sselect Run As
A ABAP
Test Cockkpit.
00:11:23
And I have
e incorporate
ed the FUNC
CTIONAL_DB
B checks. Ex
xecute it and you will see
e that it
contains ATC
A
errors,
00:11:33
00:11:40
00:11:48
00:11:58
t SELECT is directly ab
bove. Let's have
h
a look fo
or example aat the READ....BINARY
because the
SEARCH,, the same holds here.
00:12:05
I have a SELECT
S
again without an
n ORDER BY
Y and I'm using then this internal table in a READ
D
TABLE bin
nary search statement.
00:12:15
00:12:21
p at the intern
nal table and it says it's pproblematic and
a it says
Okay and last but not least, a loop
c so...becausse I'm doing...
that this iss problematic
00:12:34
Yeah, you
ur doing again the loop on
n the SELEC
CT you have above, if youu scroll just a little bit
up...
00:12:40
h
here ag ain the SELE
ECT* with the DELETE A
ADJACENT
Yes, thankk you. You have
DUPLICA
ATES and afte
erward you d
do a LOOP
00:12:47
this is also
o a code part that you sh
hould check for.
f And here
e we have thee AT NEW because
b
the
AT NEW carrid
c
and yo
ou...
00:12:57
beforehan
nd the carrid was sorted a
and now it may
m be not so
orted by the ccarrid so you
u could have
other step
p-ins of that lo
oop at this p osition.
00:13:07
00:13:12
Exactly. So
S it's very im
mportant to ha
ave a look at such code snippets
00:13:18
because they
t
can reallly get you in
nto trouble sin
nce you relie
ed on the impplicit ordering
g.
00:13:23
Okay, so much
m
about the ABAP Te
est Cockpit and
a the integ
gration in ourr ABAP Deve
elopment
Tools in Eclipse.
E
00:13:31
Exactly bu
ut there come
es only one m
more questio
on in the gam
me...sorry, thhis was the wrong
w
direction.
00:13:37
uestion is if you
y have som
me, if you could add some runtime daata to that sta
atic code
So, the qu
check beccause that static code che
ecks
00:13:46
00:13:56
00:14:04
without an
n ORDER BY
Y clause, so you might ha
ave 100,000 of them, thiss report here
e will really
help you.
00:14:12
00:14:24
00:14:35
00:14:43
00:14:48
WEEK 2, UNIT 2
00:00:13
00:00:16
ve talked abo
out the tools to detect potential functioonal issues when
w
Hi. In the last unit we'v
NA.
migrating to SAP HAN
00:00:26
m coding?
In this unitt, we will tackle the questtion, What about the perfformance of your custom
Jasmin.
00:00:33
u Jens. So le
et me show yyou where we
e are in the storyboard.
s
W
We are still in
n the Detect
Thank you
phase.
00:00:39
00:00:44
00:00:52
selves the qu
uestion abou
ut performanc
ce and we w
will show you today the
Today we will ask ours
nce optimizattion potentia l checks thatt we have provided for yoou.
performan
00:01:02
Okay, so it's
i all about performance
e and you typ
pically ask th
he question, I have migra
ated to SAP
HANA with my custom
m coding,
00:01:11
f
And tthe answer is
s yes.
is everything running faster?
00:01:16
a
is, tha
at depends. It really depe
ends on how much databbase-oriented
d coding you
u
Well the answer
have,
00:01:24
u really execu
uted of your programs on
n the databasse.
so how much time you
00:01:29
c
only rrunning on th
he ABAP serv
ver without innteracting with the
If there is only ABAP coding
database,
00:01:35
00:01:40
00:01:47
00:01:52
ns, please ca
an you introd uce the SQL
L performanc
ce rules guideelines for us?
Okay, Jen
00:01:58
Yes, of co
ourse. So the
ese guideline
es have been
n around alre
eady before S
SAP HANA.
00:02:04
So most of
o you, or som
me of you, ha
ave probably
y seen this, but
b let me exxplain in deta
ail what they
mean
00:02:10
00:02:14
00:02:26
00:02:32
Let's first of
o all take a look at the m
more important ones and they are moore important because
00:02:39
it's based on the architecture and tthe layout off SAP HANA, as we havee told you in week
w
1.
00:02:45
Okay, so let's
l
take a lo
ook and give
e you some examples
e
what we mean with those ru
ules.
00:02:54
00:03:04
which mea
ans apply me
eaningful WH
HERE condittion to the SQ
QL statemennt. So, for example, if
you only want
w
one line
e, you don't sselect the wh
hole table.
00:03:14
00:03:18
00:03:21
o
bring tha
at data to the
e application server that yyou really wa
ant to use in
This basiccally means only
the application server
00:03:28
n a UI, progra
am batch job
b, whatever. So how do you
y do this?
or later on
00:03:35
There's no
ormally only the columnss you need, so
s don't write
e a SELECT** statement. Just only if
you really need all of the
t columns.
00:03:44
a
the MA
ARA table, thhere are som
me columns
Instead off a SELECT * statement, if you think about
inside. Yo
ou probably don't
d
need th em all on the
e UI at the sa
ame time.
00:03:54
And of cou
urse, minimiz
ze the numb
ber of data tra
ansfers. This
s basically meeans prefer array
operationss instead of single
s
operattions.
00:04:03
So, this ca
an be once you
y do a SEL
LECT of a sa
ales order he
eader table, tthen write a loop and
then selecct, for examp
ple, the saless order item table.
t
00:04:13
00:04:19
b handled la
ater in week 3
3, when we show
s
you the
e new Open SQL enhanc
cements.
This will be
00:04:26
00:04:35
00:04:46
This is mu
uch better if you
y do the IN
NSERT after the loop. Th
hat's basicallyy what we mean
m
with an
array operration.
00:04:52
Those are
e the ones that are very im
mportant when we talk about SAP HA
ANA and the
e Code-toData para
adigm.
00:05:01
What's no
ot so important anymore iis minimize search
s
overhead, for exa mple, or kee
ep
unnecessary load awa
ay from the d
database.
00:05:08
00:05:13
So you ca
an, of course, put load on
n the databas
se if it makes
s sense. It's jjust a topic of
o
unnecessary load.
00:05:20
houldn't calcu
ulate someth
hing that you don't need or
o somethingg like that.
So you sh
00:05:25
Okay, so now
n
enough of these guiidelines. Let's take a look
k at the checcks we have introduced
to find pottential code snippets.
s
Jassmin.
00:05:38
Thank you
u Jens. I will show you th
hat using the tools that we
e have introdduced alread
dy in the last
unit.
00:05:44
t
about the Code In spector as well
w as the AB
BAP Test Coockpit
We have talked
00:05:49
and we ha
ave shown yo
ou that with a Code Inspector variantt called FUNC
DB.
CTIONAL_D
00:05:55
00:06:08
00:06:15
00:06:24
What's in there? In principle, the c hecks that are checking exactly the thhings that Je
ens has just
he guideliness.
showed uss to follow th
00:06:33
00:06:36
ple, minimize
ed result set so we have analyses of WHERE connditions, for SELECT
S
For examp
statementts, for examp
ple.
00:06:45
Then we have
h
talked about
a
the collumn storage
e in SAP HANA.
00:06:52
So the SE
ELECT * state
ement, as Je
ens just mentioned, is pro
oblematic annd it is especially
problemattic
00:07:02
00:07:09
00:07:17
It is not ne
ew concernin
ng the checkk itself. Jens has
h mentioned that you hhave a SELE
ECT...END
SELECT
00:07:26
00:07:31
ht be problem
matic or that ccan be problematic.
That migh
00:07:35
We were not
n able to find such thin gs if the SEL
LECT...END SELECT waas in anotherr
modularization unit as the SELECT
T SINGLE.
00:07:44
00:07:50
w
the SEL
LECT...END
D SELECT, yo
ou are not abble to find that with old
If that metthod call is within
code inspection varian
nts.
00:07:57
w are able to
o also have th
he SELECT....END SELE
ECT and a m
method call orr function
So now we
call and within
w
that aga
ain,
00:08:05
00:08:16
But let me
e just take thiis PERFORM
MANCE_DB check varian
nt and execuute it on a ba
ad guy we
have written for you.
00:08:23
y
custom
m coding and you would like to check ccustom codin
ng. For us,
So typically you have your
ow that you in a demo re
eport that we have specia
ally provided for that purp
pose.
we will sho
00:08:34
Okay, so let
l me just op
pen the repo
ort and it is ca
alled ZSTAT
TIC_PERFOR
RMANCE
00:08:44
like the on
ne we've see
en yesterday for functiona
al correctnes
ss. Let me jusst open that.
00:08:51
I will not te
ell you what the report is doing but I will
w just execute the ABA
AP Test Cock
kpit.
00:08:58
00:09:03
nding me.
Yeah, thanks for remin
00:09:05
As we've stated
s
in the last unit, you
u can specify
y the code in
nspection varriant or the ABAP
A
Test
Cockpit va
ariant in the properties
p
fo
or the ABAP project.
00:09:17
00:09:27
I apply tha
at, thanks forr reminding m
me, and I will select from the context menu Run As
A ABAP
Test Cockkpit.
00:09:38
And as sta
ated last time
e we have do
one this, you
u see, in the Problems vieew,
00:09:44
some erro
ors indicating
g what could be improved
d performanc
ce-wise.
00:09:51
So here, for
f example, the NonLoca
al Nested Re
eading DB Operations, leet me go therre.
00:09:57
You see th
hat within a form,
f
I have a SELECT SINGLE.
S
The
e question is now, where do I
execute th
his statement?
00:10:06
SELECT SINGLE
S
here
e is not that g
good becaus
se I'm not do
oing anythingg with this anymore
00:10:12
00:10:25
and within
n this loop, I have
h
this PE
ERFORM sta
atement wherrein, in anothher modulariz
zation unit
here, I'm doing
d
a SELE
ECT SINGLE
E statement.
00:10:37
A similar thing
t
is the SELECT
S
state
ement that could
c
be transformed, a pproblematic SELECT
S
*
statementt,
00:10:45
so here yo
ou see I have
e SELECT * and it tells me
m that I have a certain ppercentage of fields
unused.
00:10:51
o to the ABA
AP Problem H
Help on that
Maybe it'ss not informative enough,, so let me go
00:10:59
00:11:06
00:11:13
00:11:18
So we havve these stattic code checcks, the static code checks and the pperformance checks
ready.
00:11:26
00:11:34
00:11:44
00:11:57
00:12:06
00:12:16
00:12:27
00:12:36
of your co
ode, the full SQL
S
profile.
00:12:41
That's exa
actly where the next sesssion comes in
n
00:12:44
00:12:55
Stay tuned
d and see yo
ou. Bye, Bye .
0
10
WEEK 2, UNIT 3
00:00:13
00:00:17
T
we will be talking a
about the SQ
QL profile of your producttive system.
Hi there. Today
00:00:23
Let me go
o one step ba
ack and tell yyou what we talked about in the last tw
two units. We
e have
shown you static code
e checks.
00:00:31
o functional correctness
c
n you migrate to SAP HA
ANA with you
ur coding.
First, to do
checks when
And the second thing is what we to
old you abou
ut
00:00:40
00:00:49
00:00:55
00:01:01
00:01:09
00:01:16
c
snippet would just ru
un in an application serveer lifetime maybe once.
So the adoption of a code
00:01:24
ally worth op
ptimizing the performance
e of that code
e snippet.
It's not rea
00:01:29
00:01:36
00:01:46
00:01:51
For that, we
w will show you a tool to
oday that you
u can really get
g the compplete SQL pro
ofile of your
productive
e system.
00:01:59
00:02:09
h
written down some numbers to give you a fe
eel of what iss really happening on a
Here we have
normal ER
RP system.
00:02:17
So here in
n this examp
ple with 6,000
0 concurrent users, you really
r
see theere's much is
s going
here.
00:02:26
00:02:30
00:02:40
00:02:48
00:02:58
on together ju
ust in our bra
ains, so we really
r
need hhelp here to know
k
where
gather succh informatio
to optimizze.
11
00:03:04
00:03:07
and Jasm
min, can you tell
t us a little bit about the
e new transa
action?
00:03:11
00:03:20
00:03:28
00:03:33
00:03:43
00:03:53
00:03:56
00:04:05
by a deve
elopment colleague of ou rs: The SQL Monitor Unleashed.
00:04:11
Before we
e come to the
e demo, let m
me show you
u a bit of arch
hitecture.
00:04:15
I promised
d to tell you why
w it is okayy to run that in a productive system. Y
You might sa
ay, Oh that
is killing my
m business processes I w
o do my busin
ness.
would like to
00:04:25
00:04:32
ou are execu
uting your bu
usiness proce
esses, the daatabase interrface is
and that iss because yo
working fo
or you interac
cting with the
e database,
00:04:40
00:04:49
00:04:57
00:05:07
s
or dev
velopment syystem becau
use you also don't want too do the ana
alysis in the
to the Q system
productive
e system.
00:05:13
00:05:16
s
in, so fo
or that I switcch to the ABA
AP Developm
ment Tools.
Let's just step
00:05:21
00:05:28
I open the
e transaction and then yo
ou see an ove
erview of this
s,
00:05:35
00:05:47
12
2
00:06:00
What do we
w have here
e? We have some admin
nistrative info
ormation up hhere on how much data
is gathere
ed,
00:06:07
when it wa
as last execu
uted, by who
om, and if it's
s at the moment active orr not and on how many
servers.
00:06:13
m to those buttons
b
wherre you can ac
ctivate it for all
a applicatioon servers or maybe only
It brings me
for specia
al application servers.
00:06:21
Yeah, ma
aybe it is good to mention
n here, if you would click now on the A
Activation bu
utton, it also
gives you a stopping time.
t
00:06:29
pically advise
e to run the S
SQL Monitor in a period of
o about two w
weeks, like the
t number
So we typ
have seen
n for the ERP
P system in tthe example,
00:06:38
because after
a
two wee
eks you don''t have any
or not too manychang
m
ges in the coding, so you
really can analyze the processes
00:06:46
w
is also
o a measuring
g frame whe
ere you really
y gather inforrmation.
and two weeks
00:06:53
Exactly. However,
H
and
d I will state tthat later on and again we
w also touchhed it already
y, you have
to iterative
ely repeat this
00:07:02
because maybe
m
in this
s two weeks of time fram
me, you don't have certainn important application
a
run.
00:07:10
arter-end run
n or year-end
d run. SSome
ething like that. So think aabout collectting all
Yeah, qua
business processes
00:07:18
ook at the da
ata. That we can do in the
e next tab heere.
and now let's take a lo
00:07:23
00:07:29
but you ca
an also get itt out of this ssystem and im
mport it into another one . So, what we
w now do is
we want to take a look
k at it.
00:07:37
00:07:45
00:07:55
There are
e some really
y bad guys in
n here and what you can do here now
w is very impo
ortant. So
you want to aggregate
e the results probably.
00:08:04
00:08:12
00:08:19
So, you se
ee the business processe
pect
es which hurrt you a lot frrom the perfoormance asp
00:08:25
00:08:33
00:08:40
Many num
mbers, so it ta
akes...you ne
eed to get us
sed to it and that's the im
mportant thing
g, get you a
system an
nd try it out on
o yourself to
o know what the numbers
s mean.
13
3
00:08:51
00:09:00
00:09:09
it will be probably
p
VA0
01 or someth
hing like this will appear here.
h
00:09:14
00:09:20
es you a goo
od feeling tha
at here much
h DB time is consumed
c
a nd an optimiization of
which give
the SQL iss here really possible.
00:09:32
So if you only
o
have 1%
% of DB time
e optimization
n of the SQL, wouldn't heelp so much at all.
00:09:39
00:09:48
00:09:56
and the go
ood thing is we
w have the information on how muc
ch every stateement inside
e this
process consumes
c
the
e DB time off these proce
esses.
00:10:06
That is the
e percentage
e right?
00:10:08
Yes, this is
i in percenta
ages. The tim
me is always
s milliseconds
s, by the wayy.
00:10:14
00:10:22
00:10:30
and it's he
ere inside this report. By clicking it, yo
ou can directtly jump to thhe source code.
00:10:37
00:10:48
and mayb
be you can ev
ven think abo
out if the SELECT* statement is the ccorrect one.
00:10:52
Okay, and
d just by rem
moving it and writing it for example, ma
aybe with thee SELECT...FOR
ENTRIES
S, could be a good idea h ere.
00:11:03
00:11:07
00:11:18
00:11:27
00:11:38
00:11:41
n in that one?
? Yeah, let's take a look. So this is an
nother one, aand again dominating
Drill down
one with the
t percentag
ge
00:11:49
ment. If we take
and this time it's an IN
NSERT statem
t
a look at the numberrs and figure
es here, it's
a
again a SELECT loo
op.
probably also
00:12:00
14
4
00:12:07
No just kid
dding. Again. prefer arrayy operations so collect th
his data insidde an internal table and
do the INS
SERT after the DO.
00:12:19
But of cou
urse those arre our bad gu
uys. I think ju
ust give you a feeling, tryy it out.
00:12:27
00:12:34
00:12:40
00:12:50
h aggregatio
on he took. In
n the blog you will find in the referencces.
also which
00:12:57
00:13:05
00:13:16
if we remo
oved, of courrse, the unussed code firs
st. We had th
he statical coode checks,
00:13:22
not measu
uring the dyn
namic code, of course, an
nd we can su
upplement thhe informatio
on now with
the SQL Monitor
M
Data in order to g
get the full co
overage.
00:13:30
But as me
entioned befo
ore, this onlyy holds true iff you really run it when yoou are execu
uting also all
of the stattements or all of the proccesses.
00:13:42
So for yea
ar-end reportting, monthlyy reporting, you
y may be need
n
to repeaat the measu
urement of
the SQL Monitor.
M
00:13:50
Okay, so with
w that I wo
ould like to ssay thank you
u and hand over
o
for Jenss to give you an outlook.
00:13:56
00:14:06
00:14:13
00:14:22
15
5
WEEK 2, UNIT 4
00:00:13
Welcome!! Great to have you backk for the fourtth unit of the second weeek.
00:00:17
00:00:19
s
you h
how to gather the SQL profile of your productive system
s
and
In the lastt unit, we've shown
analyze it using the SQ
QL Monitor t ransaction.
00:00:29
uldn't it be a good
g
idea to take this datta and comb
bine it with thee static code
e checks
Now, wou
00:00:37
00:00:47
oss a modula
arization unit,, yet just to enrich
e
the SQ
QL Monitor da
ata also
that this iss a loop acro
with the sttatic code ch
hecks
00:00:56
00:01:02
Of course
e, we have this transactio
on prepared for
f you and I guess Jasm
min can show
w you how
this workss.
00:01:09
Thank you
u Jens. So, the guy we a
are talking ab
bout is the SQ
QL Performaance Tuning Worklist
W
and
the transa
action ID is SWLT.
S
00:01:19
00:01:29
00:01:36
00:01:46
I also sele
ected I would
d like to Show
w Intersection of Results. I will not goo into the deta
ails, but that
will help me
m to enrich the
t informatiion here.
00:01:56
00:02:06
00:02:14
I say inclu
ude it please,, so I will use
e it and you can
c choose between
b
the Code Inspec
ctor
00:02:20
or the ABA
AP Test Coc
ckpit. Becausse we would like to promo
ote of coursee, the new to
ool, let me
just take the new tool and I have a
already prepa
ared an ATC run for you.
00:02:31
e
tha
at on the systtem using the code inspe
ection variantt PERFORM
MANCE_DB.
I already executed
00:02:37
00:02:47
00:02:58
00:03:06
Okay. In addition
a
to the static checcks, I would like
l
to include the SQL M
Monitor data
00:03:14
and typica
ally you would now go to your produc
ctive system, export the ddata there, an
nd import
16
6
into the qu
uality or deve
elopment sysstem the SQ
QL Monitor da
ata.
00:03:24
We only have
h
this one
e system ava
ailable so we are doing bo
oth things at the same tim
me and so I
say again, I would like
e to use it.
00:03:34
o course, aga
p
a sn
napshot for yyou.
That activvates it and of
ain, I have prepared
00:03:39
Which is the
t same tha
at I've shown
n you in the la
ast unit. Exac
ctly.
00:03:45
So even you
y could cre
eate a snapsshot here but we have see
en how to doo that in the previous
p
unit, so we
e will just select the snap
pshot we hav
ve already taken.
00:03:55
00:04:05
or to do th
he ordering, and
a again I w
would like to have a total DB executioon time as on
nly top
records he
ere.
00:04:13
00:04:22
00:04:30
w complete
ely lost with all
a of those co
olumns and aall those info
ormation.
It really hit me and I was
00:04:34
ey doing here
e? What do they want from me?
What the heck are the
00:04:38
00:04:46
And reallyy try it out and also have a look...again promoting the SCN bloog from our development
d
t
colleague telling you what
w
you can
n do with thatt tool.
00:04:56
d only briefly
y mention a ccouple of exa
amples, also the examplees that we ha
ave already
So I would
seen.
00:05:02
g, which is no
ow the differe
ence, or one of the differe
ences, betweeen the SWL
LT and the
First thing
SQL Monitor.
00:05:11
e, when I dou
uble-click on one of these
e lines, a drillldown. That is on SQL le
evel, on
I can have
statementt level, and you
y might askk, Where did
d I enter?
00:05:21
00:05:28
00:05:38
00:05:47
t
there is a NonLocal N
Nested Read
ding DB.
I am told that
00:05:51
Of course
e, we could have gathered
d this information already
y from the staatic code che
ecks alone,
00:05:56
but here we
w also see that
t
is the top
ation execute
ed from of coourse within my Zp-most opera
packages.
00:06:05
00:06:15
7
17
00:06:20
Okay. Now
w I can have
e a drilldown.. That is the additional
a
infformation noow, not only the
t SQL
Monitor bu
ut again the SQL,
00:06:30
00:06:32
00:06:40
00:06:48
00:06:55
nformation
so where the
e actual call of that metho
od is which i s enclosing the
t loop and
and this in
the SELEC
CTcan als
so be navigatted from here
e.
00:07:08
00:07:15
g! Yes, aweso
ome coding. So I can nav
vigate in herre. That is ou
utermost
With awessome coding
point.
00:07:23
00:07:31
00:07:41
I could do
o a drilldown here with the
e beloved INSERT statem
ment, withouut the array operation.
o
00:07:51
00:07:58
Okay, so what
w
you can
n also read ffrom that list here, for exa
ample, is thiss guy here. I see the
mean reco
ord is quite high.
h
00:08:09
I do a dou
uble-click and
d you see the
e Code Inspe
ector hints to
o me that theere might be unsecure
use of FO
OR ALL ENTR
RIES.
00:08:17
00:08:28
while to have
e a look at tha
at, because maybe the F
FOR ALL ENTRIES table
and it might be worthw
mpty.
here is em
00:08:39
We have mentioned th
hat in the firsst unit about Runtime Che
eck Monitor aalready but here
h
just to
ain...
see all of that, will aga
00:08:51
00:08:54
So maybe
e a word of precaution
p
be
efore we end the demo.
00:08:58
You see we
w have the top-most
t
thin
ngs that migh
ht have potential to optim
mize
00:09:05
00:09:11
00:09:17
ave the top 10 here, you investigate them, you adopt them, yoou do someth
hing for
So you ha
performan
nce, and then
n
00:09:24
00:09:29
18
8
00:09:34
So think what
w
you wou
uld like to ac hieve before
e you start the
e project.
00:09:39
Otherwise
e you will go into an infini ty loop with that.
t
00:09:45
Okay, with
h that I would
d like to hand
d back to Jen
ns.
00:09:48
00:09:51
00:09:57
00:10:03
When you
u want to mig
grate to SAP HANA, first of all again, important annd mandatory step is to
find the fu
unctional issu
ues that could
d occur.
00:10:14
You've lea
arned that in unit 1. Afterw
rward, it's a very
v
good ide
ea to scan yoour productiv
ve system
with the new tool, the SQL Monitorr,
00:10:23
o
abo
out your SQL
L processes mentioned.
to get an overview
00:10:27
00:10:32
00:10:39
00:10:49
All informa
ation again is
s in the mate
erial. After yo
ou've done th
he analysis, ttake the mos
st critical
performan
nce point
00:10:57
and of cou
urse, correct the function
nal issues because you want
w
to have a running sy
ystem after
the migrattion and this is exactly th en where yo
ou can migratte
00:11:06
00:11:15
Don't optim
mize a reporrt which take s just 0.5 milliseconds on
n the databasse.
00:11:23
It makes no
n sense at all
a and just b
burns your re
esources. And
d then just coontinue until you have
the perforrmance you like.
00:11:31
00:11:37
00:11:47
for our SA
AP Business Suite and al so for our SA
AP internal custom
c
codinng.
00:11:55
And we ha
ave also had
d a look at alll our compon
nents that we
e previously had.
00:12:02
We will sh
how you in th
he next unit q
quick wins. For
F example, the optimizeed ABAP Listt Viewer, the
e
artist also known as ALV
A with Integ
grated Data Access.
00:12:12
And we will
w also show
w you some o
other improve
ements. Stay
y tuned.
00:12:16
Thank you
u and bye-by
ye.
19
9
WEEK 2, UNIT 5
00:00:13
Hi and we
elcome back to the last un
nit of this we
eek.
00:00:17
00:00:19
00:00:27
so a renew
wed ABAP List
L Viewer, a
and some oth
her improvem
ments. Jens, please startt.
00:00:32
Here we will
w start with the transparrent optimiza
ations and as
s you can se e on the slides...What?
The slide is empty.
00:00:43
00:00:48
Of course, we have sh
hown you tha
at diagram be
efore so we would
w
like too remind you of the
nt optimizatio
ons.
transparen
00:00:55
Remembe
er, we have told
t
you in th
he first week,, the ABAP 7.4
7 comes wiith transparent
optimizatio
on like table buffer enhan
ncement
00:01:04
in the data
abase interfa
ace and also the protocolls that the AB
BAP uses to talk to SAP HANA, so
with the underlying database.
00:01:14
a transpare
ent optimizattion. You don't have to do
o anything cooncerning co
oding, but
So these are
you will ho
opefully see that in perforrmance.
00:01:22
00:01:31
00:01:44
For that, I go again to my ABAP D evelopment Tools in Eclipse and I haave prepared
d a tiny little
report
00:01:52
_ALV_IDA, standing
s
for IIntegrated Data Access, and as you ccan see therre is nothing
called ZR_
in there ye
et
00:02:01
As you do
on't want to see
s me typing
g and doing all of the typos, I have crreated a sma
all template
for you.
00:02:08
00:02:17
alling a create
e statement and that guy
y here could either be a D
Data Dictiona
ary table or
I'm just ca
a Dictiona
ary view
00:02:27
or those new
n
guys tha
at we will hea
ar about in th
he next week
k, something like Core Da
ata Services
views.
00:02:34
00:02:37
Okay, wha
at the ABAP List Viewer now comes with
w is full-sc
creen mode
00:02:47
so you do
on't have to use or create yourself dyn
npros and I would
w
like to display the data
d
at the
end.
00:02:55
20
0
00:03:03
Let me en
nlarge that a bit and whatt you can see
e here is an ALV
A table
00:03:11
00:03:22
you are se
electing everrything in the
e internal table. So alread
dy this launchhing takes qu
uite a while
with the old ALV.
00:03:28
ds if I now ju
ust scroll dow
wn here. You see that is pretty
p
responnsive and tha
at is
Same hold
because whatever
w
I do
o here,
00:03:38
00:03:47
00:03:54
issued the
e SAP HANA
A database. A
And it's that responsive
r
because
b
HAN
NA supports me with all
of the thin
ngs that I'm doing
d
here.
00:04:04
So for exa
ample, let me
e also do an aggregation on that one,
00:04:10
00:04:22
00:04:24
00:04:33
00:04:39
00:04:50
Okay, eno
ough of the demo.
d
Let me
e show you a little bit abo
out the technniques runnin
ng behind
the scene.
00:04:58
u can see, we
e have optim
mizations bec
cause the res
sult set is minnimized.
So as you
00:05:04
So you ha
ave seen this
s in performa
ance, but I ca
an also show
w you that in tthis little diag
gram. So
what typiccally happens
s with the cla
assical ALV,
00:05:12
00:05:22
and whate
ever you wou
uld like to dissplay later on
n is not filtere
ed before it ccomes from the
t
database to the applic
cation server , but on the application
a
server itself,
00:05:31
e or in the AB
BAP layer.
so on the level of the internal table
00:05:36
00:05:44
00:05:49
So we see
e improved performance.
p
educed mem
mory footprintt and there is
s no
. We see a re
truncation
n on selected
d data.
00:05:57
If you wou
uld like to kno
ow more abo
out that, just go the SCN link and yeaah, so that wa
as our ALV
with Integrated Data Access.
A
Is the
ere more, Je
ens?
00:06:06
e is more and
d I really like this demo. I love to work
k with the neew ALV. This is really fun
Yes, there
and it's co
ool, that's all.
21
00:06:16
Cool is the
e right word here. Okay, let's go to the next one.
00:06:20
00:06:29
p directly into
o a demo. I will
w close dow
wn the ALV aand...
and also let's just jump
00:06:37
00:06:44
p
a litttle report alrready but with a little morre of coding aand this is ca
alled ZR...
I've also prepared
00:06:54
Okay, aga
ain I forgot ho
ow I named my own repo
ort but luckily
y we have it iin our package
00:07:04
and of cou
urse it's SEA
ARCH_HELP
P_DEMO. So
orry for that. And
A this repoort, let me jus
st execute
it.
00:07:11
aybe I chang
ged somethin
ng already. O
Okay, now yo
ou know
You have to activate itt first. Oh, ma
also it's Ctrl+F3,
00:07:19
AP GUI ,and
d now F8 works. And whaat I now have
e here is a
you know this probably from the SA
arch field wh
here I can typ
pe things.
simple sea
00:07:30
00:07:38
v
very...w
what you now
w have is exa
actly you already have soome information and
one and very,
type-ahea
ad information of an identtifier
00:07:49
and here we
w see the business
b
parttners and the
eir identifiers
s and also thee e-mail add
dress.
00:07:54
00:08:03
I remembe
er that conta
act I had, wha
at was her na
ame? Sarah. So let's try it.
00:08:11
00:08:17
00:08:22
00:08:26
00:08:35
00:08:40
t
that you
u see here iss the Enhanc
ced Options. Here you caan select that you want
The new thing
the propossals for the input fields
00:08:48
and the fu
ull-text search
h and you ca
an specify an
n accuracy le
evel which is,, kind of, how
w fuzzy it
can get.
00:08:58
asically all. Yo
ou have the fields and th
hey are good to go and acctivated.
That is ba
00:09:06
00:09:16
ome to an ex
xample, we a
also have in your
y
demo sy
ystem, is thaat you have also
a
the
If I now co
search he
elps available
e here, also w
with the new ALV grid.
00:09:25
22
2
00:09:29
So remem
mber our Sara
ah? Here we
e go, here is Sarah. Is it? Yeah.
00:09:38
So that's for
f type-ahea
ad and searcch help. I hop
pe you like it.
00:09:44
Back to th
he slides. Here is also a l ink in the ma
aterial to the demo on youur remote de
esktop
00:09:52
00:09:59
and the go
ood thing is we
w also delivver our new SAP
S
GUI fields and so onn with that ty
ype-ahead
feature, so
o for example when you go to the SE
E38
00:10:07
I still hope
e you will like
e the develop
pment tools more,
m
of course, but theree may be some of you
which sticck to their classical SE38.. Please com
me to the goo
od side.
00:10:18
There is also
a
search help
h
available
e now. Okay, and more in
nformation, oof course, in our SCN
space.
00:10:25
e material. G
Good.
Links are in the course
00:10:29
00:10:34
not with th
he full screen
n mode and tthe display mode
m
I've sho
own you thhey have to do
d a little bit
more of th
he typing not just one line
e of coding
00:10:45
but you ca
an have exam
mples around
d in the ALV
V demo reporrts in the systtem.
00:10:52
Okay, and
d with that we
e would like to close the week. So yo
ou have learnned a lot abo
out
performan
nce analysis tools,
00:11:02
00:11:09
00:11:18
SWLT is the
t SQL Perfformance Tu
uning Worklis
st, which included the infoormation of the
t static
code checck and the SQ
QL Monitor rruntime data
00:11:26
on the SQ
QL profile of your
y
product ive system.
00:11:29
00:11:35
The transp
parent optim
mizations, the
e ALV, and also this very cool new feaature of type-ahead and
the fault-to
olerant searc
ch
00:11:44
in case yo
ou are doing a lot of typoss when you are
a using the
e product.
00:11:47
00:11:56
y next wee
ek when it's a
all about opttimization and what we haave impleme
ented in our
Yes, see you
ABAP serrver.
00:12:02
Bye-bye.
23
3
www.sap.c
w
com
2014 SAP SE or an SA
AP affiliate company. All rights reserved.
No
N part of this publicationn may be reproduced or transmitted in any form
or
o for any purpose withouut the express permission of SAP SE or an SAP
affiliate
a
company.
SAP
S
and other SAP prodducts and services mentio
oned herein as well as th
heir
respective
r
logos are traddemarks or registered trademarks of SAP SE (or an
a
SAP
S
affiliate company) inn Germany and other cou
untries. Please see
http://www.sap.com/corp
h
porate-en/legal/copyright//index.epx#trademarkfo
or
additional
a
trademark infoormation and notices. Som
me software products
marketed
m
by SAP SE andd its distributors contain proprietary software
components
c
of other softtware vendors.
National
N
product specifica
cations may vary.
These
T
materials are provvided by SAP SE or an SAP
S
affiliate company for
informational purposes oonly, without representatio
on or warranty of any kin
nd,
and
a SAP SE or its affiliate
ted companies shall not be
b liable for errors or
omissions
o
with respect too the materials. The only warranties for SAP SE or
o
SAP
S
affiliate company prroducts and services are those that are set forth in
n
the
t express warranty stat
atements accompanying such
s
products and servicces,
if any. Nothing herein shoould be construed as con
nstituting an additional
warranty.
w
In particular, SAP SE or iits affiliated companies have
h
no obligation to purssue
any
a course of business ooutlined in this document or any related presentattion,
or
o to develop or release aany functionality mention
ned therein. This docume
ent,
or
o any related presentatioon, and SAP SEs or its affiliated
a
companies
strategy
s
and possible futu
ture developments, produ
ucts, and/or platform
directions
d
and functionaliity are all subject to chan
nge and may be changed
d by
SAP
S
SE or its affiliated ccompanies at any time fo
or any reason without nottice.
The
T information in this doocument is not a commitment, promise, or legal
material, code, or functio
obligation
o
to deliver any m
onality. All forward-looking
g
statements
s
are subject too various risks and uncerrtainties that could cause
e
actual
a
results to differ maaterially from expectation
ns. Readers are cautioned
not
n to place undue reliannce on these forward-look
king statements, which
speak
s
only as of their dattes, and they should not be relied upon in making
g
purchasing
p
decisions.