Download as pdf or txt
Download as pdf or txt
You are on page 1of 73

VI

VAQUESTI
ONS

 SAP:
Sys
temsAppl
i
cat
ionsandPr
oduct
s

 ABAP:
AdvancedBus
ines
sAppl
i
cat
ionPr
ogr
ammi
ng

 R/
3 Sys
tem:Dat
abas
e Layer
,Appl
i
cat
ion Layer
,Pr
esent
ati
on
Layer

 Upt
o6s
ess
ionscanbeopenedi
nSAP

/
n–cancel
scur
rentt
rans
act
ion

/
o–opensas
ess
ion

/
h–opensdebuggermode

 ABAPEdi
tor–T-
code:
SE38

 ABAPPack
age/
Repos
itor
y:T-
code:
SE80

 ABAPDi
cti
onar
y–T-
code:
SE1
1

 Whatar
ePr
ogr
am At
tri
but
es?

Thepr
ogr
am at
tri
but
esar
edef
inedwhenapr
ogr
am i
scr
eat
ed
t
her
elevantt
ool
(Cl
assBui
l
der
,Funct
ionBui
l
der
,ABAPEdi
tor
).I
tis
pos
sibl
etochanget
hem l
ater
.

 Commentl
i
ne:
*

 Par
ti
alcommentl
i
ne:

 Pr
edef
ineddat
atypes
:
 Whati
sdebuggi
ng?

I
tisat
oolus
edt
oident
if
yandel
i
minat
eer
ror
sinABAPpr
ogr
ams
.
I
tal
l
owsver
if
icat
ionofpr
ogr
am l
ogi
cinas
tep-
by-
stepmannerby
ex
ami
ningt
her
esul
tsofi
ndi
vi
dual
stat
ement
.

SE38–Pr
ogr
am –Ex
ecut
e–Debuggi
ng

 F5–Whenyoupr
essF5,yourpr
ogr
am cont
rolgoest
onex
t
l
i
ne.

 F6–I
twi
l
lex
ecut
ethemodul
ewi
thoutgoi
ngi
ntoi
t.
F6wor
ks
f
orper
for
ms(
subr
out
ines
),Funct
ionmodul
es,
Clas
smet
hods
et
c.

 F7–I
tcompl
etest
hecur
rentpr
ogr
am/
modul
einas
ingl
e
s
tep.

 F8 – Cont
rolwi
l
lgo t
othe nex
tbr
eak
poi
nt,i
fany or
compl
etest
hepr
ogr
am ex
ecut
ion.

 Whati
swat
chpoi
nt?

Awat
chpoi
nti
sacondi
ti
onalbr
eak
poi
ntt
hati
sonl
ydef
inedi
n
t
heABAPDebugger
.

 Whati
sdat
adi
cti
onar
y?

The Dat
a Di
cti
onar
y des
cri
bes and manages al
lthe dat
a
def
ini
ti
ons(
met
adat
a)us
edi
ntheABAPs
yst
em t
owor
kwi
thdat
a
t
ypes
,dat
abas
etabl
es,
andvi
ews
.

 Typesoft
abl
es:
Trans
par
ent
,Cl
ust
erandPool

 Tr
ans
par
entt
abl
eshaveonet
ooner
elat
ions
hip.t
hes
truct
ure
whi
chdef
inedi
nthedat
adi
cti
onar
yleveli
ssameasi
ndat
abas
e
l
evel
.Cl
ust
erandPoolhavemanyt
ooner
elat
ions
hip.Dat
afr
om
mul
ti
plet
abl
esi
sst
oredt
oget
heri
ncl
ust
erandpool
.

 Del
i
ver
y Cl
ass
:Itcont
rol
sthe t
rans
por
toft
abl
e dat
aforan
i
nst
all
ati
on,upgr
ade,orcl
i
entcopy and t
rans
por
ts bet
ween
cus
tomers
yst
ems
.

 Buf
fer
ing:Not
hingbutamemor
yar
ea.Tabl
eisbuf
fer
edmeans
t
het
abl
einf
ormat
ioni
savai
l
abl
eonappl
i
cat
ions
erver

 LockObj
ect
s:Pr
ovi
dedt
opr
eventi
ncons
ist
encyatt
het
imet
he
dat
aisbei
ngi
nser
tedorchangedi
ntodat
abas
e.Types
:Read
Loc
k,Wr
it
eLock
,EnhancedWr
it
eLock
.
 Whatar
eCl
ass
ical
Repor
ts?

Cl
ass
icalRepor
ts 
aret
hemos
tbas
ic 
ABAPr
epor
ts 
thatcont
ain
bot
hsel
ect
ions
creenandanout
puts
creen.
 
Clas
sicalr
epor
ts 
are
ex
ecut
edbas
edonevent
s,andnotex
ecut
edonal
i
ne-
by-
li
ne
bas
is.
 
They 
arenon-
int
eract
ive 
repor
ts.Bas
ical
l
y,t
heycons
istof
onepr
ogr
am t
hatc
reat
esas
ingl
eli
st.
Does
n’tneedat
rans
act
ion.

 Typesofpr
ogr
ams
:Type1
,TypeM (
Modul
ePool
)andTypeI
(
Inc
ludePr
ogr
am)

 Whati
sSel
ect
ionScr
een?

I
tisani
nputs
creenofar
epor
tgener
atedbySAPwhi
chal
l
owsa
us
ert
opr
ovi
dei
nput
.Ital
l
owsi
nter
act
ives
elect
ions
creenf
iel
d
val
ues
.

ABAP s
tat
ement
sto cr
eat
esel
ect
ion s
creen:PARAMETERS
(
accept
ssi
ngl
eval
ues
),SELECT-
OPTI
ONS(
accept
smul
ti
pleval
ues
andr
angeofval
ues
),SELECTI
ON-
SCREEN(
forf
ormat
ti
ngs
creen
el
ement
s)

 Whatar
eABAPEvent
s?

Event
sar
ethet
ool
swhi
chcont
rolt
hef
low ofABAPpr
ogr
am.
ABAPi
saevent
-dr
ivenl
anguage.Whenaneventi
soccur
s,t
he
pr
oces
singbl
ockas
signedt
otheeventget
sex
ecut
ed.

 TypesofEvent
s:

1
.INI
TIALI
ZATI
ON (
Get
str
igger
ed bef
oret
hef
ir
stdi
spl
ayof
s
elect
ions
creen.Occur
saf
tert
hedat
adecl
arat
ionpor
ti
on
ofpr
ogr
am,
Pri
ort
oSELECTI
ON-
SCREEN)

2.ATSELECTI
ON-
SCREENOUTPUT

3.AT SELECTI
ON-
SCREEN (
Get
str
igger
ed when us
erhi
ts
ENTER on s
elec
tion s
creen orex
ecut
es,us
ed t
o val
i
dat
e
dat
aonSel
ect
ionScr
een)

4.STARTOFSELECTI
ON (
Mai
npr
oces
singofpr
ogr
am begi
ns
wi
tht
hisevent
,tr
igger
edoncet
heus
erpr
ess
esEx
ecut
e)

5.END OFSELECTI
ON (
Tri
gger
edf
oll
owi
ngt
heex
ecut
ionof
t
hel
asts
tat
ementi
nSTARTOFSELECTI
ON,Out
putl
ogi
cis
wr
it
teni
nthi
sevent
)

6.TOP OF PAGE (
Headerofa r
epor
tdef
ined her
e,occur
s
i
mmedi
atel
ywhenanewpages
tar
ts)

7.ENDOFPAGE(
Foot
er)

 Whati
sanI
nter
nal
Tabl
e?

I
nter
nalTabl
esar
est
ruct
ured dat
atypesdef
ined wi
th ABAP
pr
ogr
am.Theyar
eac
ces
sibl
eonl
yint
hecur
rentpr
ogr
am.They
ar
eus
edasat
empor
arys
tor
ageofdat
abas
etabl
econt
ent
s.

 Whatar
eFi
eldSt
ri
ngs
?

AFi
el
dSt
ri
ngi
ssetofr
elat
edf
iel
ds.Commonl
yref
err
edas“
Wor
k
Ar
ea”oras
ingl
e“Recor
d”.
Col
l
ect
ionof“
Recor
dsf
ormsanI
nter
nal
Tabl
e.

 Fi
l
li
ngI
nter
nal
Tabl
e

 Appendus
ingAPPENDcommand
I
nser
tli
nesus
ingI
NSERTcommand

 Compr
essi
nter
nalt
abl
eus
ingCOLLECTs
tat
ement(
Uni
que
k
ey)

 Tr
ans
por
ttabl
esus
ingMOVEcommand

 Us
edat
abas
eSELECTt
ofi
l
lint
ernal
tabl
e

 READ–r
etr
ievest
her
ecor
dpoi
ntedbyi
ndexi
nITi
ntot
he
WA.

 WI
THKEY–t
oreadas
ingl
eli
nef
rom I
Twi
thas
elf
-def
ined
k
ey

 LOOPs
tat
ementi
sus
edt
oreadanI
Tint
oWA,
li
nebyl
i
ne.

 MODI
FYi
sus
edt
ochanget
hecont
ent
sofani
nter
nalt
abl
e.
I
fnotus
edwi
thi
nLOOP,
INDEXaddi
ti
oni
smandat
ory.

 SORTs
tat
ement
ssor
tst
heent
ri
esi
ntheI
T.Def
aul
tsor
ti
ngi
s
al
waysas
cendi
ng.

 DELETEi
sus
edt
odel
eteoneormor
erowsf
rom ani
nter
nal
t
abl
e.

 DELETEADJ
ACENTDUPLI
CATESi
sawayt
odel
etedupl
i
cat
e
l
i
nesf
rom anI
T.Us
eSORTbef
oreus
ingt
hiscommand.

 DESCRI
BEi
sus
edt
ogeti
nfor
mat
ionaboutt
heI
T.

 Cont
rolSt
atement
sar
eus
edwi
thi
nLOOPf
orper
for
ming
cal
cul
ati
ons
/di
spl
ayi
ng s
ummar
yli
sts
,et
c.AT FI
RST/AT
LAST/ATNEW/ATENDOF
 TypesofI
nter
nal
Tabl
es:

 St
andar
d:Acc
ess
edus
ingi
ndex
.Non-
uni
que

 Sor
ted:Ac
ces
sedpr
edomi
nant
lyus
ingk
ey.Sor
tedi
nter
nal
l
y
byi
tsk
ey.
Canbebot
huni
que/
non-
uni
que

 Has
hed:
Acces
sedwi
thk
eyonl
y.Uni
que.

I
nter
nal
Tabl
ewi
thHeader
:ITi
tsel
fhasaheaderl
i
ne

I
nter
nalTabl
e wi
thoutHeader
:Wor
kAr
ea hast
o be def
ined
s
epar
atel
y

 Sel
ectSt
atement

 Bas
icf
orm:
SELECT*FROM….
INTOTABLEgt
_t001

 Res
tri
cti
ngdat
asel
ect
ion:
WHEREcl
aus
e

 Ret
ri
evi
ngas
ingl
erecor
d:SELECTSI
NGLE(
INTOTABLEcan’
t
beus
ed,
onl
yINTO)

 Ret
ri
evi
ngas
ingl
erecor
dupt
o<n>r
ows
:SELECT….
.UPTO
<n>ROWS

 Ret
ri
evi
ngar
ecor
dsi
nsequence:
ORDERBYPRI
MARYKEY

 FORALLENTRI
ES:Us
edt
osel
ectdat
afr
om dat
abas
eforal
l
t
he r
ecor
ds avai
l
abl
e i
n t
he I
T. Dupl
i
cat
e l
i
nes ar
e
aut
omat
ical
l
yremoved.

J
oins
:Us
edt
osel
ectdat
afr
om mor
ethant
wot
abl
esi
nSELECT
s
tat
ement
s.Mor
e ef
fi
ci
entt
han l
ogi
caldat
abas
e and nes
ted
s
elect
s.
I
nnerJ
oin:I
tjoi
nst
hecol
umnsf
rom t
het
abl
eont
hel
efts
ide
wi
tht
hecol
umnss
peci
fi
edf
rom t
her
ightt
abl
eift
hej
oin
condi
ti
oni
ssat
isf
iedj
oint
ly.

 Lef
tOut
erJ
oin:I
tcr
eat
ess
imi
l
arr
esul
tsetasi
nnerj
oin.
However
,at
leas
toner
ecor
discr
eat
edi
nther
esul
tsetf
or
eachl
i
nef
rom t
hel
eftt
abl
esat
isf
yingt
heWHEREcondi
ti
on
even i
fno r
ecor
dint
he r
ightt
abl
esat
isf
iest
he J
OIN
condi
ti
on.

 RANGES:Us
edt
ocr
eat
eint
ernalt
abl
est
hathavet
hes
truct
ureof
s
elect
iont
abl
e.

 Cl
ass
icalI
nter
act
ive Repor
t:I
t al
l
ows t
he us
er t
o per
for
m
oper
ati
onont
heout
putandgener
ates
econdar
yli
sts
.Itf
etches
onl
ycor
rectamountofdat
aforeachl
evel
rat
hert
hanf
etchi
ngal
l
atonce.
Itconver
tsc
las
sical
li
stt
odi
alog-
bas
edr
epor
ti
ng.
Forany
l
i
stt
her
ecanbeupt
o20s
econdar
yli
sts
.1bas
ic+20s
econdar
y.

I
nter
act
iveLi
stEvent
s:

 ATLI
NE-
SELECTI
ON:Tr
igger
swhenus
erdoubl
ecl
i
cksont
he
f
iel
d

 ATPF<nn>:
Tri
gger
swhenus
erpr
ess
esanyf
unct
ionk
ey

 ATUSER-
COMMAND:Tr
igger
saf
terpr
ess
ingaus
erdef
ined
f
unct
ionk
ey.

 Sys
tem Fi
eldsf
orSecondar
yLi
sts
:

 SY-
LSI
ND:
Indexoft
hel
i
stcr
eat
eddur
ingt
hecur
rentevent

 SY-
LISTI
:Indexoft
hel
i
stl
evelf
rom whi
cht
heeventwas
t
ri
gger
ed
 SY-
LILLI
:Abs
olut
eno.ofl
i
nesf
rom whi
cht
heeventwas
t
ri
gger
ed

 SY-
LISEL:Cont
ent
soft
hel
i
nef
rom whi
cht
heeventwas
t
ri
gger
ed

 SY-
UCOMM:
Funct
ioncodet
hatt
ri
gger
edt
heevent

 SY-
PFKEY:
Stat
usofdi
spl
ayedl
i
st

 Pas
singdat
afr
om Pr
imar
ytoSecondar
yLi
st:

 Met
hods
:Us
ings
yst
em f
iel
dSY-
LISEL.
Wehavet
ous
eOf
fset
t
ocapt
uret
her
equi
redt
ext
.

 Us
ing t
he f
oll
owi
ng s
tat
ement
s:HI
DE,READ LI
NE,GET
CURSOR

 HI
DEs
tat
ementi
sus
edt
ost
oret
heval
uef
oraf
iel
dint
he
l
i
ne.

 READLI
NEi
sus
edwhenal
i
nei
nani
nter
act
iver
epor
tneeds
t
ober
ead.

 GETCURSORr
eads
/ret
ri
evest
hei
nfor
mat
iononLi
stsatt
he
cur
rentcur
sor
.

 SUBMI
Tst
atement
:Iti
sus
edt
orecal
lar
epor
tfr
om wi
thi
nthe
ot
herr
epor
t.

 Sel
ect
ions
creenvar
iant
s:Savesval
uesagai
nsts
elect
ions
creen
el
ement
s/f
iel
ds.Toex
ecut
ethepr
ogr
am,t
he‘
saved’var
iantcan
beus
edt
opopul
atet
hes
creenf
iel
dsi
nst
eadofent
eri
ngt
hedat
a
agai
nandagai
n.Mul
ti
plevar
iant
scanbecr
eat
edi
napr
ogr
am.
 Us
ingvar
iant
s:1
.Onl
i
nepr
oces
sing,
2.Back
groundpr
oces
sing

 Modul
ari
zat
ion:When s
amepi
ece ofcode needst
o beus
ed
mul
ti
plet
imes
,we us
ed Modul
ari
zat
ion.I
thel
pst
o mak
ethe
pr
ogr
am mor
ereadabl
eandeas
ytomai
ntai
n.

 Modul
ari
zat
iont
echni
ques
:

 Subr
out
ines

 Macr
os

 Funct
ionModul
es

I
ncl
udePr
ogr
ams

 Subr
out
ines
:Subr
out
inei
sas
etofr
eus
abl
ecodes
.Iti
sus
edt
o
br
eakpr
ogr
amsi
ntol
ogi
calgr
oups
.Subr
out
inesk
eept
hes
our
ce
codecl
ear
.Types
:Int
ernal
subr
out
inesandex
ter
nal
subr
out
ines
.

Def
ini
ngas
ubr
out
ine:FORM<s
ubr
out
ine_
name>TABLES…

Cal
l
ingas
ubr
out
ine:PERFORM<s
ubr
out
ine_
name>TABLES…

 Par
amet
erst
opas
sdat
a:

 USI
NG:
Pas
sbyr
efer
ence/pas
sbyval
ue

 TABLES:
Pas
sbyr
efer
ence

 CHANGI
NG:
Pas
sbyval
ueorr
esul
t

 Ter
minat
ingSubr
out
ines
:

 EXI
T:Ter
minat
esubr
out
inesuncondi
ti
onal
l
y
 CHECK:
Ter
minat
esubr
out
inescondi
ti
onal
l
y

 Macr
oscanbedef
inedwi
thDEFI
NEs
tat
ement

I
ncl
udePr
ogr
ams
:Ifcer
tai
nst
atement
sar
eant
ici
pat
edi
nmul
ti
ple
pr
ogr
ams
,thes
tat
ement
scanbes
avedi
nINCLUDEpr
ogr
am and
s
amecanbecal
l
edi
nmul
ti
plepr
ogr
ams
.

 NoPROGRAM/
REPORTs
tat
ement
s.

 Cannotcal
li
tsel
f.

 Al
lst
atement
sini
tshoul
dbecompl
ete

 Funct
ion Modul
es(
T-CODE SE37)
:Funct
ion modul
es 
ares
ub-
pr
ogr
ams t
hat cont
ainas
et of r
eus
abl
est
atement
s wi
th
i
mpor
ti
ng and ex
por
ti
ng par
amet
ers
. Unl
i
ke I
ncl
ude
pr
ogr
ams

funct
ionmodul
es 
canbeex
ecut
edi
ndependent
ly.

 Funct
ion At
tri
but
es:At
tri
but
esTab gi
vesyou t
he i
nfor
mat
ion
aboutt
heFunc
tionModul
e.I
tisRFCenabl
ed.

 An ex
ist
ing Func
tion Modul
e can be i
nser
ted i
nto ABAP
pr
ogr
am us
ingEdi
t–Pat
ter
n

I
mpor
tPar
amet
ers
:Ift
heopt
ionalcheck
boxi
snotcheck
ed,
val
uesneedt
obepas
sedagai
nstt
hes
epar
amet
erswhen
t
heFunct
ionModul
eiscal
l
ed.
Cannotbemodi
fi
edi
nsi
det
he
Funct
ionModul
e.

 Ex
por
tPar
amet
ers
:Theyar
eus
edf
ort
rans
fer
ri
ngdat
ato
t
hecal
l
ingpr
ogr
am.
Iti
sopt
ional
.

 Changi
ngPar
amet
ers
:Changi
ngpar
amet
ersar
epas
sedby
r
efer
ence,val
ueandr
esul
t.Theyactasi
mpor
tandex
por
t
par
amet
ers
.

 Tabl
es:Tabl
espar
amet
erar
eus
ed t
o pas
sIT.Theyar
e
s
imi
l
art
ochangi
ngpar
amet
ers
.ITcanbepas
sedi
ntoand
f
ormt
hef
unct
ionmodul
es.

 Ex
cept
ions
:Us
ed t
oinf
orm t
he cal
l
ing pr
ogr
am about
unex
pect
eder
ror
s.

 Funct
ion Bui
l
der
: The 
Funct
ion Bui
l
der
 i
s a t
ool i
n
t
he 
ABAP 
Wor
kbenc
h t
hat al
l
ows you t
o cr
eat
e,t
est
,and
admi
nis
ter
 f
unc
tion 
modul
esi
nani
ntegr
atedenvi
ronment
.
Tool
s–ABAPWor
kbench–Devel
opment–Funct
ionBui
l
der

 Remot
eFunct
ion Cal
l(RFC)
:RFC i
sa mechani
sm t
hatal
l
ows
bus
ines
sappl
i
cat
ionst
ocommuni
cat
eandex
changei
nfor
mat
ion
(
inpr
e-def
inedf
ormat
s)wi
thot
hers
yst
ems
.RFC canbecal
l
ed
f
rom out
sideofSAP.
 ALVRepor
t:

 ALVs
tandsf
orABAPLi
stVi
ewer
.

 Thi
sisa s
tandar
drepor
tfor
matgener
ated us
ing SAP
pr
ovi
dedf
unc
tionmodul
es.

I
tenhancesr
eadabi
l
ityoft
her
epor
tandpr
ovi
des
ever
al
f
eat
uresi
ncl
udi
ngs
ort
ingr
ecor
dsbas
edoncol
umns
.

 Al
l
owupt
o90out
putcol
umnsands
ever
aldi
spl
ayopt
ions
.

 Feat
uresofALV:

 Cr
eat
ing,
changi
ng,
andmanagi
ngl
ayout
s

 Sor
ti
ngofr
epor
t

 Cal
cul
ati
onanddi
spl
ayoft
otal

 Pr
int
ingl
i
stsandpr
intpr
evi
ew

 Mul
ti
pledownl
oadopt
ions

 Funct
ionModul
esi
nALV:

 REUSE_
ALV_
LIST_
DISPLAY:
Dis
playcont
ent
sofI
Tasr
epor
tin
ALVf
ormat

 REUSE_
ALV_
GRI
D_DI
SPLAY:Di
spl
aycont
ent
sofI
Tasr
epor
t
i
nALVf
ormatwi
thgr
id

 REUSE_
ALV_
COMMENTARY_
WRI
TE : Out
put
s Header
i
nfor
mat
ioni
nanALVRepor
t
 REUSE_
ALV_
VARI
ANT_
F4 : Di
spl
ay s
elect
ion di
alog f
or
var
ians
tofALV

 Event
sinALV:

 USER_
COMMAND

 TOP_
OF_
PAGE

 END_
OF_
PAGE

 TOP_
OF_
LIST

 END_
OF_
LIST

I
nter
act
iveALVRepor
t:WhenyoucanPer
for
m Oper
ati
onsont
he
ALVout
putl
i
standgener
ates
econdar
yli
sts
,iti
scal
l
edI
nter
act
ive
ALVr
epor
t.

 St
epsf
orI
nter
act
iveALV:

 Sel
ectt
heHeaderandI
tem Tabl
es.

 Cr
eat
eSt
ruc
tur
esofBot
hTabl
es.

 Cr
eat
etheSel
ect
ionScr
een.

 Sel
ectt
heHeaderDat
a.

 Cr
eat
eFi
el
dCat
alogf
orHeaderSt
ruct
ure.

 Cal
ltheFunct
ionModul
eREUSE_
ALV_
GRI
D_DI
SPLAY.

 Nex
tcr
eat
etheUSER_
COMMANDSubr
out
ine.

i
nwhi
chf
etc
hthei
tem det
ail
s.

 cr
eat
eFi
l
edc
atal
ogf
orI
tem Tabl
e.

 pas
sthet
abl
etoREUSE_
ALV_
GRI
D_DI
SPLAY.
 Pas
stheUSER_
COMMAND eventf
orex
por
tpar
amet
erof
Funct
ionmodul
e.

 Backgr
oundPr
oces
sing:

 Ex
ecut
ionofABAPpr
ogr
amswi
thoutdi
alog

 Compl
etei
ntegr
ati
oni
ntheSAPSys
tem

 Eas
eofus
e

 Di
str
ibut
edpr
oces
sing

 Par
all
elback
groundandonl
i
neoper
ati
on

J
obSt
atus
:

 Schedul
ed

 Rel
eas
ed

 Ready

 Act
ive

 Fi
nis
hed

 Cancel
l
ed

 Smartf
orms:SAPSmar t
for
msareusedt
ocr
eat
eandmai
ntai
n
for
msformas spr
int
inginSAPSys
tems.
 Advantages
:

 Eas
ytous
eGUI
–advancedgr
aphi
cal
int
erf
ace

 Eas
y cr
eat
ion and mai
ntenance wi
thl
esspr
ogr
ammi
ng
ef
for
ts

 Gr
aphi
cs can be i
ncl
uded i
n back
ground or as f
orm
el
ement
s
 Eas
ymi
grat
ionf
rom SAPScr
ipt
s

I
tiscl
i
enti
ndependent
.

 St
epst
ocr
eat
eSmar
tfor
ms:

 Ent
erT-
codeSMARTFORMS

 Decl
are‘
I
nter
nal
Tabl
e’i
nFor
mInt
erf
ace

 Decl
are'
Wor
kAr
ea'
inGl
obal
Def
ini
ti
ons

 Cr
eat
eSecondar
ypage(f
orI
nter
nal
tabl
e)

I
nHeadergi
vet
heFi
el
dname(Ex:
mat
nr)

I
nMai
nAr
eagi
vet
heWor
kar
ea(Ex
:wa-
mat
nr)

 whenSmar
tfor
m ex
ecut
edonef
unct
ionmodul
eiscr
eat
ed

 Us
ingSSF_
FUNCTI
ON_
MODULE_
NAMEt
odi
spl
ayt
heout
put

 Us
e ofSSF_
FUNCTI
ON_
MODULE_
NAME:I
n Smar
tfor
ms,af
tera
Funct
ionModul
eiscr
eat
ed,andt
heni
tgoest
oPr
oduct
ion,t
hen
Tes
ting,t
he Funct
ion Modul
e changes
.To r
etr
ieve t
he ex
act
s
mar
tfor
m,SSF_
FUNCTI
ON_
MODULE_
NAMEi
sus
ed.

I
magei
nSmar
tfor
ms:

 Cr
eat
eabi
tmapi
mage:

1
.Ift
hel
ayouti
spr
e-pr
int
eds
tat
ioner
yfor
mat
,scanand
s
tor
eitas.
bmp.

2.I
fthel
ayouti
sinEx
celf
ormat
,conver
titi
nto.
bmpor
dr
awt
her
equi
redout
li
nesi
nPai
nt.

 Upl
oadt
hei
mageus
ingT-
codeSE78.

I
ncl
udet
he.
bmpi
ntheSmar
tfor
ms.
1
.Got
oPage

2.Sel
ectt
het
abBack
groundPi
ctur
es

3.Us
eSear
chHel
ptogetal
i
stofi
mages

4.Doubl
ecl
i
ckt
osel
ectt
hedes
iredi
mage

 Bar
codei
nSmar
tfor
ms:

1
.Tr
ans
act
ioncodeSE73.

2.Thenc
li
ckonCr
eat
e.

3.Gi
vet
henameanddes
cri
pti
onoft
hebar
code.

4.Cl
i
ckonCode1
28.

5.Got
oSmar
tst
yles
.

6.Cr
eat
epar
agr
aphandchar
act
erf
ormat

7.Got
oSmar
tfor
ms

8.I
ntheTex
tgi
veI
T<c>SCANHERE</
>

9.Saveandac
tivat
e

 Mi
grat
eScr
iptt
oSmar
tfor
ms:Smar
tfor
ms–Ut
il
it
ies–Mi
grat
ion–
I
mpor
tSAPScr
iptFor
m

 Pas
sint
ernalt
abl
einSmar
tfor
ms:I
nFor
mInt
erf
ace,
int
heTabl
es
s
ect
ion,
wedec
lar
eint
ernal
tabl
es.

 For
m Logi
c:I
naSAPSmar
tfor
ms,t
hef
orml
ogi
cdef
inest
hedat
a
t
ober
eadf
rom t
hedat
abas
e,t
hent
odef
inet
hecondi
ti
onand
l
ast
lyt
ocont
rolt
hef
low oft
hef
orm out
put
.Iti
sdef
inedi
nthe
For
m Bui
l
der
,wher
ethef
orms
truct
urei
sdef
inedont
hel
efts
ide
oft
heSmar
tfor
msi
nter
face.Whenas
mar
tfor
m cr
eat
ionwi
ndow
i
sopened,
ont
hel
efts
ideyouhavedef
aul
tnodes
.

Nodes
:Cr
eat
enodesasperr
equi
rement

For
m at
tri
but
es:Sel
ectdes
cri
pti
on,
pagef
ormatands
tyl
e.

 Ther
e4t
ypesofwi
ndows
:

 Mai
nWi
ndow:Forpr
int
ingcont
inuousout
put
s,l
i
keI
nter
nal
Tabl
e

 Secondar
yWi
ndow:Forpr
int
ingf
ixedl
engt
hout
put

 Fi
nalWi
ndow:Si
mil
art
o Secondar
y Wi
ndow wi
tht
he
ex
cept
iont
hatcont
ent
swi
l
lbepr
int
edatt
heend

 Copi
esWi
ndow:Tomak
ecopi
esoft
heor
igi
nal
window

 Component
sofSmar
tfor
ms:

 For
m Bui
l
der
:Iti
sus
edt
odes
ignt
hef
orm.I
tisf
ir
sts
creen
wes
eeaf
terex
ecut
ingt
heT-
codeSMARTFORMS.

 For
m Pai
nter
:Us
edf
ordes
igni
ngl
ayout
soff
orm pages
.We
candef
inewi
ndow orgr
aphi
cpos
iti
onsandchoos
esi
zes
.
Us
etool
ssuc
hasgr
id,
rul
er,
tool
bar
,et
c.

 PCEdi
tor
:Iti
ssi
mil
art
othet
extedi
tor
.Wecanent
ert
ext
and f
iel
ds i
nthe out
putf
iel
ds.As
sign par
agr
aph and
char
act
erf
ormatdef
inedi
nst
yles
,et
c.SE75

 Tabl
ePai
nter
:Us
edf
ordes
igni
ngt
abl
es.
Als
ous
edt
odes
ign
t
empl
ates
.Wecandr
aw r
owsandcol
umnsofanywi
dth,
hei
ght
.Tabl
ess
houl
dbepr
int
edi
nMAI
Nwi
ndow.

1
.Tabl
eTab:Conf
igur
ati
onoft
abl
elayout
.Def
inet
he
t
ypest
obeus
edt
otabl
eheader
,mai
nar
ea,
foot
er.

2.Dat
a Tab:Cont
rol
sappl
i
cat
ion dat
a pr
oces
sing f
or
pr
int out
put
.Speci
fys
elect
ion cr
it
eri
a and ar
eas
r
est
ri
ctedf
rom dat
asel
ect
ion.

3.Event
sTab:Al
l
owspr
int
ing oft
abl
e headi
ngsand
t
otal
li
nes
.

 St
yleBui
l
der
:Iti
sus
edt
ocol
l
ect
ivel
ydef
ineSmar
tst
yles
.
Smar
tst
yles cont
rolt
he f
ont
,for
matofchar
act
er,and
par
agr
aphsi
nfor
ms.

 Fi
eldLi
st:Us
edwhi
l
ewr
it
ingf
iel
dswi
thi
nthef
orm.

Devel
opDr
iverPr
ogr
am:
 Modul
ePool
s:Modul
ePoolpr
ogr
amsar
ecr
eat
edi
nSAPABAP
devel
opmentwor
kbenchus
ingT-
codeSE80.

 Pr
erequi
si
tesf
orModul
ePool
:

 Scr
eenPai
nter(
SE51
)

 MenuPai
nter

 Tr
ans
act
ionc
ode

 ABAPEdi
tor

 ABAPDi
cti
onar
y

 Scr
eenAt
tri
but
es:

 Shor
tDes
cri
pti
on(
Requi
red)

 Scr
eenType(
Requi
red)

 Nex
tScr
een(
Opt
ional
)

 Ex
ecut
ingModul
ePool
:Modul
ePoolcanonl
ybeex
ecut
edf
rom a
t
rans
act
ioncode.

 Mes
sageTypes
:InSAP,mes
sagesdef
ined/
acces
sibl
einSE1
9ar
e
s
tor
edi
nTabl
eT1
00.TheMESSAGEs
tat
ementus
est
hemes
sages
s
tor
edi
nT1
00.

 Typesofmes
sages
:

 Succes
s(S)
I
nfor
mat
ion(
I)

 Abend(
A)

 Ex
it(
X)

 War
ning(
W)

 Er
ror(
E)

 Us
er-
def
inedCheck
s:

 Ther
ear
ethr
eemet
hodst
oper
for
mit
.

1
.Is
sueer
rororwar
ningmes
sagei
nPAI
modul
e

2.I
ssueer
rororwar
ningmes
sagebas
edont
heout
come
ofSELECTs
tat
ementi
nfl
owl
ogi
c

3.Us
eVALUESs
tat
ementi
nfl
ow l
ogi
ctodef
ineval
i
d
val
ues

 Sys
tem s
topsatt
hes
creenhavi
ngf
iel
dwi
thcheck
.

 Fi
el
dsbecomenon-
edi
tabl
eifnotas
soci
atedwi
th‘
FI
ELD’
.

 Sel
ectCheck:I
twi
l
lret
ri
eveoner
ecor
d.I
fnor
ecor
dsmat
ch,er
ror
mes
sagewi
l
lbedi
spl
ayed.

 PAI(
Proces
sAf
terI
nput
):I
tdet
ermi
nest
hef
low l
ogi
cex
ecut
e
modul
esaf
tert
hedi
spl
ayoft
hes
creenandaf
terr
ecei
vi
ngi
nput
s
f
rom t
heUs
er.
 

 PBO (
Proces
sBef
ore Out
put
):I

det
ermi
nest
he f
low l
ogi
c or
ex
ecut
emodul
es 
bef
oredi
spl
ayi
ngt
hes
creen.

 POH(
Proces
sonHel
pReques
t):
 POV(
Proces
sonVal
ueReques
t):

 Scr
eenSt
atus
:Toc
reat
eScr
eenSt
atus
,weneedMenuPai
nter
.

 OKCODE:I
tisaf
unc
tioncodewhi
chact
sasat
empor
aryvar
iabl
e
t
hats
tor
est
heval
ueofSY-
UCOMM.I
tisr
ecommendedt
ous
eit
.
Shoul
dnotchanget
heval
ueofSY-
UCOMM.

 Condi
ti
onal
Stat
ement
s:

ATCURSOR-
SELECTI
ON

ATEXI
T-COMMAND

ONREQUEST

ONI
NPUT

 LEAVESCREENs
tat
ement
:Thepr
oces
singoft
hecur
rents
creeni
s
t
ermi
nat
edandc
ont
rolgoest
othePBO oft
he“
NEXTSCREEN”
s
peci
fi
edi
nthecur
rents
creenat
tri
but
es.

 SET SCREEN s
tat
ement
:Thes
yst
em t
empor
ari
l
yover
ri
dest
he
s
creen numbers
peci
fi
ed i
n“NEXT SCREEN”at
tri
but
ewi
tht
he
s
creennumberment
ionedwi
thSETSCREEN.

 LEAVETOSCREENs
tat
ement
:Cur
rents
creen’
sPAIi
ster
minat
ed
andcont
rolnavi
gat
est
othePBOofs
creens
peci
fi
edwi
thLEAVE
TOSCREENs
tat
ement
.

 Tabs
tri
ps:Mul
ti
ples
ubs
creensi
nsever
alt
abscanbepl
acedi
na
nor
mals
creenwi
thTabs
tri
p.Cannotbecr
eat
edi
nal
phanumer
ic
mode.

 Navi
gat
ebet
weent
abs
/scr
eens
:
 Det
ermi
net
ab’
sfunct
ioncode

 Setact
ivet
abf
iel
dtot
hef
code

 Setavar
iabl
etos
ubs
creennumber

 Cal
lsubs
creeni
nPBO

 OOPS:

I
trepr
esent
sreal
-t
imeobj
ect
sint
hef
orm ofcl
assobj
ect
s.
Theyar
etheabs
tract
ionofr
eal
wor
ld.

 Pr
oces
ses c
an be puti
nto ef
fectr
eal
i
sti
cal
l
y,eas
iert
o
under
stand,
mai
ntai
n,andr
eus
e.

 Sof
twar
est
ruc
tur
eisi
mpr
oved

 Qui
teex
pres
sivewhi
chmak
esi
teas
iert
odel
i
vers
oft
war
e
component
sont
imewi
thgoodqual
i
ty

 Abs
tract
ion:Abs
tract
ion i
s a pr
oces
s wher
e you s
how onl
y

rel
evant
”dat
aand“
hide”unneces
sar
ydet
ail
sofanobj
ectf
rom
t
heus
er.

 Encaps
ulat
ion:I
tis bi
ndi
ng t
he dat
a wi
tht
he code t
hat
mani
pul
atesi
t.I

keepst
hedat
aandt
hecodes
afef
rom ex
ter
nal
i
nter
fer
ence.

I
nher
it
ance:I
nher
it
ancei
sthemechani
sm bywhi
chanobj
ect
acqui
rest
hes
ome/
all
proper
ti
esofanot
herobj
ect
.

 Pol
ymor
phi
sm: Pol
ymor
phi
sm means t
o pr
oces
s obj
ect
s
di
ff
erent
lybas
edont
hei
rdat
atype.

 Cl
ass
:

 Setoff
eat
urest
hathavet
hes
ames
truct
ureandper
for
ms
t
hes
amebehavi
our
.

 Pr
ovi
desabl
uepr
intofal
li
nst
ancescr
eat
edus
ingt
hes
ame
cl
ass
.

 Notpos
sibl
eto def
ine cl
assi
nsi
de anot
hercl
ass
.Loc
al
aux
il
iar
ycl
assorgl
obal
clas
scanbedef
ined.

 LocalCl
ass
:Impl
ement
ed i
nsi
de ABAP pr
ogr
am.Can be
us
edonl
yins
idet
hepr
ogr
am t
heyar
edef
ined.

 Gl
obalCl
ass
:Impl
ement
edi
nT-
codeSE24.Al
lpr
ogr
amsi
n
t
hes
yst
em haveacces
stoi
t.

 At
tri
but
esi
nCl
ass
:

 At
tri
but
esdec
idewhatt
ypeofdat
ast
oredi
nsi
det
hecl
ass

 Thecont
ent
soft
heat
tri
but
esdet
ermi
net
hebehavi
ourof
t
heobj
ect

 Def
inedi
ndecl
arat
ionpar
toft
hecl
ass

 Typesofat
tri
but
es:

1
.Ins
tance at
tri
but
es: One per i
nst
ance.Synt
ax
k
eywor
d:DATA

2.St
ati
c at
tri
but
es:One cl
asscan have one s
uch
at
tri
but
eonl
y.Synt
axk
eywor
d:CLASS-
DATA.Al
so
r
efer
redasCl
assAt
tri
but
es.

 TypesofMet
hods
:

I
nst
anceMet
hod:

 St
ati
cMet
hod:

 Obj
ect
:Anobj
ecti
sas
peci
alk
indofvar
iabl
ethathasdi
sti
nct
char
act
eri
sti
csandbehavi
our
s.I
thasas
tat
e,auni
quei
dent
it
y,
andi
tmayormaynotdi
spl
ayt
hebehavi
our
.

 Obj
ectr
efer
ence:Obj
ectr
efer
encesar
eus
edaspoi
nterobj
ect
s.
When an obj
ecti
scr
eat
ed,a r
efer
encet
othenew obj
ecti
s
r
etur
nedt
othecr
eat
or.Obj
ectr
efer
encesar
etheonl
ywayt
o
acces
sthecomponent
sofobj
ecti
nABAPpr
ogr
am.

 Cons
truct
or:When an obj
ecti
scr
eat
ed i
n memor
y,t
he f
ir
st
met
hod t
hat i
s ex
ecut
ed aut
omat
ical
l
y by t
he r
unt
ime
envi
ronmenti
scal
l
edCons
truct
or.I
tcanhaveonl
yIMPORTI
NG
par
amet
ers
.CLASS_
CONSRUCTORi
sas
tat
iccons
truct
orandi
s
ex
ecut
edonc
eperpr
ogr
am.
 EXCEPTI
ONS:I
napr
ogr
am,whenas
ituat
ionar
iseswher
eatone
poi
ntoft
imet
her
eisnomeani
ngi
ncont
inui
ngt
hepr
ogr
am f
low,
t
heni
tiscal
l
edEx
cept
ion.

 CX_
NO_
CHECK:Canbehandl
ed.Notcons
ider
edi
nsynt
ax
check

 CX_
DYNAMI
C_CHECK:Mus
t be handl
ed or pas
s us
ing
RAI
SINGcondi
ti
on.
Notcons
ider
edi
nsynt
axcheck
.

 CX_
STATI
C_CHECK:Mus
tbehandl
edorpas
sus
ingRAI
SING
condi
ti
on.
Cons
ider
edi
nsynt
axcheck
.

 Abs
tractCl
ass
:

 Cont
ainsbot
hdef
ini
ti
onandi
mpl
ement
ati
onbuti
nst
anc
es
can’
tbec
reat
ed

 Us
ethe k
eywor
d ABSTRACT i
nthe CLASS s
tat
ementt
o
mak
eanabs
tractcl
ass

 Abs
tractcl
asss
houl
dat
leas
tcont
ainoneabs
tractmet
hod

 Abs
tractmet
hodsar
emet
hodswi
thoutanyi
mpl
ement
ati
on
–onl
yadecl
arat
ion

 Notpos
sibl
etoi
nst
ant
iat
eAbs
tractCl
ass
.Thei
rsubcl
ass
es
can.

 Subcl
ass
esar
etot
all
ydependentonSuper
clas
ses
.

I
nter
faces
:

I
nter
facesar
eindependentobj
ect
swhi
chcanbei
nher
it
ed
byacl
ass
.

I
tcont
ains onl
y met
hod def
ini
ti
on and a cl
ass can
i
mpl
ementt
hemet
hodwhi
chi
mpl
ement
sthei
nter
face.

 Candef
ineani
nter
facei
nSE24.

 Conver
sions
:

 SAPDat
aMi
grat
ion:

 Bat
chI
nputSes
sions
:Iti
stypi
cal
l
yus
edt
otr
ans
ferdat
afr
om non
-
SAP 
sys
tems t
o SAP 
sys
tems or t
o t
rans
fer dat
a
bet
ween 
SAP 
sys
tems
.

 BDC(
Bat
chDat
aCommuni
cat
ion)
:Iti
sat
echni
queus
ingwi
th
l
egacy dat
a ordat
aloadi
ng i
nto SAP s
yst
em whi
ch i
snot
updat
edi
ntheSAPs
yst
ems

Progr
ammerhast
owr
it
ebat
chi
nput
pr
ogr
am t
ofor
matt
heent
ir
eincomi
ngdat
aint
oaBDCt
abl
e.

 Bat
chI
nputRecor
der
:T-
codeSHDBort
hroughSM35.

 Funct
ionModul
esi
nBat
chI
nputPr
ogr
ams
:

 BDC_
OPEN_
GROUP

 BDC_
CLOSE_
GROUP
 BDC_
INSERT

 Bat
chI
nputPr
oces
sing:

 Ses
sionSt
atus
:
 LSMW (
LegacySys
tem Mi
grat
ionWor
kbench)
:Iti
sat
oolbas
ed
onSAPs
oft
war
ethats
uppor
tss
ingl
eorper
iodi
cdat
atr
ans
fer
f
rom non-
SAPt
oSAPs
yst
ems(
andwi
thr
est
ri
cti
onf
rom SAPt
o
SAPs
yst
em)
.

 Met
hodst
oimpor
tdat
afr
om R/
3Sys
tem:

 Bat
chI
nput

 Di
rectI
nput

 BAPI

I
Docs

 BAPI(
Bus
ines
sAppl
i
cat
ionPr
ogr
ammi
ngI
nter
face)
:Itpr
ovi
des
met
hodst
hatf
aci
l
itat
esex
ter
nalappl
i
cat
ionst
oacces
sbus
ines
s
obj
ect
sint
heR/
3sys
tem.

 BAPI
sar
edef
inedi
nBOR(
Bus
ines
sObj
ectRepos
itor
y)T-
codeSW02.

 BAPI
_TRANSACTI
ON_
COMMI
Tshoul
d be cal
l
ed t
ost
ore
cr
eat
eddat
aindat
abas
e.

 BAPIal
waysr
etur
nss
ucces
s/er
rormes
sagesi
n RETURN
t
abl
e.

 Advant
agesofBAPI
:

1
. Statusofdatasentisknown.
2. Sendingandpr oces
singonthetar
getsys
tem i
s
i
mmedi ate.
3. I
tiseasiert
oc r
eateacus t
om BAPI
 whencomparedt
o
creati
ngacus t
om IDOC.

 Enhancement
: R/
3 enhancement concept per
mit
s us t
o
modi
fy/
add SAP s
tandar
d bus
ines
s appl
i
cat
ions wi
thout
modi
fyi
ngor
igi
nal
appl
i
cat
ions
.

 EnhancementTypesi
nSAP:

 Cus
tomerEx
it

 Us
erEx
it

 BADI

 EnhancementFr
amewor
k

 BADI(
Bus
ines
sAdd I
ns)
:Lat
estSAP enhancementt
echni
que
bas
edonOOPS.Cus
tom codecanbepus
hedi
nbet
weenSAP
s
tandar
dfunct
ional
i
tyi
nor
dert
oat
tai
nus
ers
peci
fi
crequi
rement
s.
BADI
sper
mitdi
ff
erentl
evel
sofs
yst
em l
ands
cape(
SAPs
tandar
d,
par
tners
yst
em,cus
tomers
olut
ions
,al
ongwi
thcount
ryver
sions
,
i
ndus
trys
olut
ions
,et
c.)

 Mul
ti
plei
mpl
ement
ati
onsar
epos
sibl
einBADI
sunl
i
keEXI
TS.

 BADI
_SORTERi
sus
edt
oachi
eveor
ders
equencei
nmul
ti
ple-
use
BADI
s.

 BADI
_SORTER_
LAYER_
GET: Us
ed t
o r
ead i
nput f
iel
d f
or
BADI
_SORTER

 BADI
_SORTER_
LAYER_
SET:Us
edt
osett
heval
uet
othei
nputf
iel
d
l
ayer
 Di
ff
erencebet
weenBADI
andEXI
TS:
 EnhancementFr
amewor
k

 EnhancementPoi
nt:I
tisapoi
nti
nSAPpr
ogr
am wher
ecus
tomer
s
cani
ncl
udef
urt
herf
unc
tionsi
nthef
orm ofs
our
cecodewi
thout
modi
fyi
ngex
ist
ingpr
ogr
am.

 EnhancementSect
ion:I
tist
heopt
ionpr
ovi
dedex
pli
ci
tl
ybySAP
t
orepl
aceabl
ockofSAPcodewi
thcus
tomercode.I
tof
fer
sa
def
aul
tlogi
c whi
ch wi
l
lbe r
epl
aced by cus
tom l
ogi
c when
i
mpl
ement
ed.

 SAP HANA:I
tis an i
n-memor
y,col
umn-
ori
ent
ed,r
elat
ional
dat
abas
emanagements
yst
em t
hats
peedsdat
a-dr
iven,
real
-t
ime
dec
isi
onsandact
ions
.
 Compr
ess
ioni
sappl
i
edoncol
umns
tor
etabl
es.

 HANA hasmul
ti
-cor
e,mul
ti
-node CPUswhi
ch hel
pin par
all
el
pr
oces
singoft
hedat
aandhenceus
etheunder
lyi
nghar
dwar
ein
f
ull
capac
ity.

 HANAAnal
yti
cs
 HANA Model
l
ing:I
tisanact
ivi
tyofr
efi
ningdat
aindat
abas
e
t
abl
esbycr
eat
ingvi
ewst
odepi
ctabus
ines
sscenar
io.Thevi
ews
canbeus
edf
orr
epor
ti
nganddeci
si
on-
mak
ing.

 HANAVi
ews
:

 At
tri
but
eVi
ews
:Us
edt
osel
ectas
ubs
etofcol
umnsand
r
owsf
rom dat
atabl
e.Theyr
epr
esenta di
mens
ion.They
don’
tcont
ainanymeas
uresoraggr
egat
es.Canbecr
eat
ed
us
inggr
aphi
cal
mode.

 Anal
yti
cVi
ews
:Theyl
ever
aget
hecomput
ingpowerofSAP
HANA t
ocal
cul
ateaggr
egat
edat
a.Theyar
eal
socal
l
ed
Cube.
Shoul
dcont
ainat
leas
tonemeas
ure.

 Cal
cul
ati
onVi
ews
:Forcal
cul
ati
ngcompl
exl
ogi
c.Canhave
mul
ti
plef
actt
abl
esconnect
edt
omul
ti
pledi
mens
iont
abl
es.
Canbecr
eat
edus
ingSQLandGr
aphi
cal
modes
.

 OPENSQL:
 Coal
esce:I
twi
l
ltak
ethef
ir
stNON-
NULLval
uef
rom t
het
wo
par
amet
erspas
sedi
nthecoal
escef
unct
ional
i
ty.

 Twonewex
pres
sionsf
orI
nter
nal
Tabl
eBui
l
t-i
nFunct
ion:

 LI
NE_
INDEX

 LI
NE_
EXI
STS

 CDSVi
ews(
Cor
eDat
aSer
vices
):I
tisas
etofdomai
n-s
peci
fi
c
l
anguagesands
ervi
cesf
ordef
ini
ngandcons
umi
ngs
emant
ical
l
y
r
ichdat
amodel
s.

 Canbecr
eat
edi
nanydat
abas
e.

 Gi
vesas
ingl
eres
ults
etasout
put
.

 Di
ff
erencebet
weenCDSVi
ewsandABAPVi
ews
:CDSVi
ewsar
e
s
imi
l
art
oABAPVi
ews
,wher
ethecombi
nat
ionoft
abl
esar
edone
andvi
ewedasas
ingl
eres
ults
etbutCDSVi
ewss
uppor
tmor
e
f
eat
urest
hanABAPDi
cti
onar
yVi
ews
.

 CodePus
hDown:I
tmeanst
hatyouex
ecut
etheex
pens
ivemai
n
par
t of your comput
ati
ons i
n t
he dat
abas
e, not i
n t
he
appl
i
cat
ion 
code.Forex
ampl
e,i
nst
eadofSELECT-
ingf
rom t
wo
dat
abas
e t
abl
es and t
hen mi
xi
ng up r
ows
 i
n t
he
ABAP 
code,
 
pus
hingdown 
meansyour
unaJ
OIN 
i
n t
hedat
abas
e.

 Bui
l
tinSQLFunct
ions
:
 St
ri
ng Funct
ions
: CONCAT, REPLACE, SUBSTRI
NG,
CONCAT_
WITH_
SPACE,I
NSTR,LPAD,LEFT,RI
GHT,LENGTH,
LTRI
M,RTRI
M,RPAD.

 Numer
icFunct
ions
:ABE,CEI
L,DI
V,DI
VISI
ON,FLOOR,MOD,
ROUND

 Dat
e Funct
ion: DATS_
IS_
VALI
D, DATS_
DATE_
BETWEEN,
DATS_
ADD_
DAYS,
DATS_
ADD_
MONTHS

 Ti
me Funct
ion: TSTMP_
IS_
VALI
D,
TSTMP_
CURRENT_
UTCTI
MESTAMP,
TSTMP_
SECONDS_
BETWEEN,
TSTMP_
ADD_
SECONDS

 CDSLi
mit
ati
ons
:

 Youcannothavemul
ti
pler
esul
tset
s.

 Youcanus
eonl
yones
ingl
esel
ects
tat
ementi
nCDSVi
ews

 Coal
esc
efunc
tional
i
tywor
ksonl
ywhent
heval
ueoft
he
f
iel
disdat
abas
eNULL.

 Sel
ect
in al
lfi
el
dsi
nthe t
abl
esi
n notpos
sibl
e us
ing *
s
tat
ement
.
 AMDP(
ABAPManagedDat
abas
ePr
ocedur
es)
:ABAPManaged
Dat
abas
ePr
ocedur
esar
ea new f
eat
urei
nASABAPal
l
owi
ng
devel
oper
stowr
it
edat
abas
epr
ocedur
esdi
rect
lyi
nABAP.

I
tisus
edt
owor
kwi
ths
tor
edpr
ocedur
es,whi
chf
urt
hergo
t
o HANA 
dat
abas
elayerandex
ecut
ethat
.

I
tisus
edt
omovedat
abas
eint
ens
ivel
ogi
cint
odat
abas
e.

 Mi
nimi
ze dat
a t
rans
fer bet
ween t
he dat
abas
e and
appl
i
cat
ion.

 AMDPLi
mit
ati
ons
:

 Youcancr
eat
edat
abas
epr
ocedur
einHANAdat
abas
eand
i
fyouwantt
ocons
umei
tinABAPt
heever
yti
meyouhave
t
ocr
eat
eapr
oxyi
nABAPl
ayer
.

 Tr
ans
por
ti
ngf
rom ones
yst
em t
oot
heri
sachal
l
enges
ince
youhavet
otr
ans
ferbot
htheobj
ect
s–dat
abas
epr
ocedur
e
andpr
oxyt
oget
herwhi
char
ecr
eat
edi
ndi
ff
erentpack
ages
.

 AMDPCl
ass
:
 ALV-
IDA:

I
NTERVI
EW PREPARATI
ON
1
.Howwi
l
lyoumak
ethes
mar
tfor
m
-Got ot codeSMARTFORMS- >Rightcl i
ckonpage1andc reates ec ondar ywi ndowsf orl
ogo,
footerandheader( mai nwi ndowi sal readypr esentther e)->al i
gni tbygoi ngt oform
paint er->r ightc l
ickonf oot erwindowandcr eat etextforus ername, dat e,ti
me( e.g.
Us ername: &SFSY- USERNAME&)- >inheaderwi ndowcr eat et ex ttopas swor kareaf iel
ds
(e.
g. &WA_ VBAK- VBELN&)- >s pecifyt hiswor kar eainfor mi nt erface- >c reateadr iver
progr am andpas sthedat at osmar tfor m usingFMofs mar tf
or m( i
tisf oundi nenvi ronment)
->r i
ghtc l
i
ckonmai nwi ndowandc reat etabl e- >drawc olumns- >Ri ghtcl ickonheader
andcr eateheaderl ines->c reat
et ex t
sf oreachheaderl ineandgi venamesofcol umns
there( e.g.I
tem number )->c reatetabl el i
nesbyr i
ghtclick i
ngonmai nar ea- >pas swor k
areaf i
el
dst here- >gi veinternaltablenamewi t
hTYPEt abl e_typei nf or mi nterf
ace- >
creat ewor kar eaoft hi
stabl einglobal definitionswi t
hs amet ype- >got odat ataboft abl
e
andLOOPi tintowor kar ea- >got odr iverpr ogram andc allnewl ygener atedf unction
modul eandpas sinternaltabl eandwor kar eaofl i
neitemsandheaderdat a.

2.
Useoff
ormi
nter
fac
e

-
Topassthedat
afetchedi
ndri
verprogr
am tosmart
forminspeci
fi
edareasi
nsmar
for
m
l
i
keheader,mai
nareaandfoot
eretc.wespeci
fyworkareaandint
ernalt
abl
est
her
e.

3.
ques
tiononr
epor
t-s
yst
em f
iel
dsy-
tabi
x,s
elec
tquer
y.

-
Sy-
tabi
xisus
edt
ofet
cht
hei
ndexoft
her
ecor
doft
hei
nter
nal
tabl
e.

-
sel
ectquer
yisus
edt
osel
ectr
ecor
dsofadat
abas
etabl
eint
oint
ernal
tabl
eorwor
kar
ea.

4.
Thenmodul
epool
-cr
eat
escr
een,
usageofFI
ELD,
CHAI
N-ENDCHAI
N

-
screeni
screatedbyr
ightcl
ickont
hepr
ogr
am -
>cr
eat
e-s
creen-
>sc
reennumberand
s
creendescri
pti
on->cl
ickok
.

-f
iel
dkeywordi
sus
edt
ospec
ifyaf
iel
dwhi
chwewantt
oval
i
dat
eus
ingval
i
dat
ionl
ogi
cin
PAImodule.

-CHAINENDCHAINisusedsothatwecanent
ert
hevalueoff
iel
dinascr
eenaft
erwehave
enteredinval
i
dval
uetothefi
eldsot
hatwedon’
thavetogobackors
creenwouldnotget
frozen.

5.
Thens
heas
kedaboutus
erex
its
,ar
etheys
peci
fi
cforanymodul
e.

->Userex
itsar
eenhancementsi
nsapabapandtheyarei
mpl
ementedass
ubr
out
ines
usi
ngFORMandENDFORM. Theyar
especi
fi
cal
l
yusedforSDmodul
e.

-howt of
induserexi
ts:met hod1:gotoSPROtcodeandgotoSAPrefer
enceI
MGt
ab->
sal
esanddist
ri
bution->sys
t em modif
icat
ion-
>userexi
ts-
>userex
itsi
nsal
es-
>us
erex
its
i
ns al
esanddocumentpr ocessi
ng

Met
hod2:
got
opar
ti
cul
art
rans
act
ione.
g.va01-
>mor
e->s
yst
em-
>st
atus
->pr
ogr
am
(doublecl
ick
)->s ear
chhereforst
ri
ng‘userexi
t’->doubl
ecli
ckonuserexi
tanditwil
ltak
e
toperfor
ms tatement->doublecl
ickandgot oformstatement-
>cl
ickonenhance
button->ri
ghtc l
i
c konfor
ms tat
ement->s el
ectenhancementoper
ati
on->create
i
mpl ementati
on->c ode->cr
eateimplementati
onandgi venamestar
ti
ngwithZ.

6.
Howwecr
eat
ecdsvi
ews
.

-Ri
ghtcl
ickonpac kagewehavecr
eatedi
necl
i
pseIDE->gotoabapreposi
tor
y->goto
cor
edatas er
vices-
>gotodatadef
ini
ti
onandsel
ectf
rom opt
ionsl
i
kedefi
neview,
view
wit
hjoi
n.

7.
Exec
utef
m wi
thoutpr
ogr
am

-got
ose37,ent
erFMnameandcl
i
ckont
estbut
ton.
Provi
dei
nputpar
amet
ersandi
twi
l
l
gi
veout
put.

8.
Howi
scal
ltr
ans
act
ionbet
tert
hens
ess
ion

-
err
orscanbevi
ewedi
mmedi
atel
yinCal
ltr
ans
act
ionandnoneedt
owai
tforl
ogf
il
eli
ke
s
essi
onmethod.

-c
all
transact
ioni
sfas
tert
hans
ess
ionbec
aus
ewecans
electupdat
emodeas
as
ynchronous.

9.
Howt
omak
epar
amet
ersdef
aul
tinmodul
epool
.

-a)s
tat
ical
l
ybypas
singval
uest
opar
amet
ersi
nPBOmodul
e

b)dynami
cal
l
ybyus
ingSETGETpar
amet
erorSPAGPAi
nfi
el
dat
tri
but
es

1
0.Wher
eisl
ogi
nbdc

-
Err
orl
ogi
sinSM35

1
1.Howt
ous
emes
sagesi
ncal
ltr
ans
act
ion.

-CALLTRANSACTI
ONt
code

USI
NGbdct
abl
e

MODEA/
E/N

UPDATEA/
S

MESSAGESI
NTOi
t_
mes
sages
.(i
tist
abl
eoft
ypeBDCMSGCOLL)

Loopati
t_
mes
sagesi
ntowa_
mes
sages
.
MESSAGEI
Dwa_
mes
sages
-ms
gidTYPEwa_
mes
sages
-ms
gtypNumberwa_
mes
sages
-
msgnr

WITHwa_mess
ages
-ms
gv1wa_
mes
sages
-ms
gv2wa_
mes
sages
-ms
gv2i
ntol
v_t
ext
.(i
tis
s
tri
ngtype)

Condes
elv_
tex
t.

Wr
it
e:l
v_t
ext
.

1
2.howt
odos
um,
subt
otal
,cat
alogmer
ge,
headerf
oral
v.

1
3.Whydout
hinks
mar
tfor
msar
eus
ed.
.
.aswec
andot
hes
amet
hingi
nal
vrepor
tal
so

-wecannotaddbar
codeandl
ogot
otheALVr
epor
ts

-
mas
spr
int
ingi
spos
sibl
ewi
ths
mar
tfor
ms

-
Eas
ytous
eGUI
andl
esspr
ogr
ammi
ngef
for
ts

-
Back
groundgr
aphi
cscanbegi
veni
nsmar
tfor
ms

-
Eas
ymi
grat
ionf
rom s
aps
cri
ptt
osmar
tfor
ms

1
4.Howmanywi
ndowsar
eus
edi
nthats
mar
tfor
m

-mai
n(l
i
nei
tems
),s
econdar
y(headerdat
a),
copi
es,
final
window(
sumsands
ubt
otal
s)
.

15.
Ifwetak
einputus
ings
elec
topt
ions
..
..
.
canweex
ecut
ewi
thoutent
eri
ngval
ues
..
.watwi
l
l
happen

-
yes
.Al
lwi
l
lgets
elect
ed.

1
6.Howt oalwaysmakeainputparametermandator
yinmodul
epool
(It
oldmodi
fy
s
creen.
.
.sheaskedmeothermethodsapartf
rom t
hat)

-wr
it
e:l
oopats
creen,

-Wechecks
creens
truc
tur
eandt
henmak
ethef
iel
dfori
nput
/out
putas1(
mandat
ory)

-
wri
te:
modi
fys
creen.

1
7.Howt
oreadas
ingl
eli
nef
rom i
nter
nal
tabl
e

-s
elec
tsi
ngl
efr
om i
t_
namei
ntowor
k_ar
ea.

1
8.Whati
stheus
eofs
y-s
ubr
c..
.
whydoweneedi
t
-i
tiss
ystem var
iabl
etohandleexcepti
ons.Sy-
subr
cval
ueot
hert
han0menasex
cept
ion
hasoccurr
ed.Omeanss uccess
ful
ex ecut
ion.

1
9.Canweex
ecut
esmar
tfor
m wi
thoutdr
iverpgm

-
YESWECAN!
(buts
aps
cri
ptr
equi
resdr
iverpr
ogr
am)

20.
Whydoweneeds
sff
unct
ionmodul
eindr
iverpgm

-Thenameofs
martf
ormsfunct
ionmodulei
sdynamic.
Iti
sdiff
erentf
orquali
ty,
produc
tion
anddevel
opments
ystems
. SOssf
_f
unct
ion_
modulegi
vesthatnamet ous.

21
.Whats
houl
dwedowhenwegetar
unt
imeer
ror
?

-
checki
mpor
ti
ngandex
por
ti
ngpar
amet
ersoff
unct
ionmodul
eandcor
rec
tthem.

-
avoi
dnes
teds
truct
ures
,nes
tedi
fs
.

22.
Howcanweaddex
cept
ionsi
nfunct
ionmodul
e

-
uncommentex
cept
ionsandcheckf
ors
y-s
ubr
cval
ues
.

23.
BDCandcal
ltr
ans
act
ionwhi
choft
hem i
sbes
tforwhi
chs
cenar
io

-
Cal
ltr
asnact
ion

24.
Wher
edowes
eet
hemes
sagesr
ecor
ded

-
err
orl
ogi
nsm35

25.
Oops-abs
tractc
las
s

26.
Wit
houtf
iel
dcat
alog

-us
ejus
treus
e_al
v_gr
id_
dis
play.
Pas
sst
ruct
urei
nex
por
ti
ngandi
nter
nal
tabl
einTABLES.
27.
atex
itc
ommandus
e

-
>modul
eex
itatex
it-
command.

Modul
eex
iti
nput
/out
put
.

Mes
sage‘
exi
ti
ngt
hes
creen’
.

Leavet
oscr
een0.

Endmodul
e.

USE:
usedf
orex
itbut
toni
nscr
een,
orcus
tom ex
itopt
ioni
nmenu.

28.
howt
oini
ti
ali
zeI
/pf
iel
dinmodul
epool
prog

-s
ameasdef
aul
ti
ngt
hef
iel
d.

29.
Whats
houl
dbet
akeni
ntocons
ider
ati
onwhi
l
eus
ings
electf
oral
lent
ri
es

-
synt
ax:
I
fi_
tabl
e2i
sNOTI
NITI
AL.

s
electabcf
rom t
abl
e_namei
ntoi
_t
abl
eforal
lent
ri
esi
nit
_tabl
e2.

Endi
f.

-t
heinter
nalt
ables
pec i
fi
edafter‘
foral
lentri
es’
stat
ementshouldnotbeempt
y.
Ot
herwi
seitwilf
etchal
ltherecor
dsfrom databasetabl
eini
_t
able1
.

30.
Whati
shana

31
.
31
.Thecodepus
hdownt
echni
quesus
edandwhi
chonei
spr
efer
red

-
CDSvi
ews
,AMDP,
openSQL(al
socal
l
edcodet
odat
a)

CDSvi
ewswhen:Wecanwrit
eonl
yones
ingl
esel
ects
tat
ementi
ncdsvi
ews
oCANNOT
HANDLECOMPLEXSCENARI
O.

onl
yonei/
pandoneo/
pset
.AMDPwhen:
mul
ti
plei
nputandout
puts
etsands
cenar
ioi
s
compl
ex
OpenSQLwhen:

32.
Howt
ocr
eat
eaf
iel
dasr
equi
redi
nmodul
epool
33.
whatdoesi
tmeanwhenugets
ysubr
c=4
(4thex
- cept
ionhasbeenr
ais
ed.
)4meanser
rorand8meanswar
ning.

34.
Whati
sdi
ff
erenc
ebet
weenamdpandc
d

-cdshasonlyonesel
ectstat
ementwhi l
eAMDPcanhavemul
ti
ples
elects
tat
ements.So
CDSc annothandl
emor ethan1inputandout
puts
etswhi
l
eAMDPcanhandl ei
t.SoAMDP
canhandlec ompl
exscenari
osandCDScannot.

35.
Howdoyouchanget
hecol
umnpos
iti
oni
nAl
v.

-doi
twhi
l
ecr
eat
ingf
iel
dcat
alog36.

36.
Dif
fer
entt
ypesofenhanc
ement
s

1
.Us
erex
its
:subr
out
ine

2.
Cus
tomerex
its
:func
tionmodul
e

3.
BADI
:Obj
ectOr
ient
edenhancementt
echni
que.
Impl
ement
edasi
nter
fac
e.

4.
Enhancementf
ramewor
k:

37.
Howdoyouc
onver
tnumber
sint
owor
ds.
.
.

cal
lFMs
pel
l
_amount

38.
Howt
ogetcummul
ati
ves
um ofl
i
nei
temsi
nsmar
tfor
msdi
rec
tly?

39.
li
kewhi
chenhancementi
sbes
t
 BADI
.

howt
40. oex
ecut
emodul
epool
prgm

-
>Us
ingt
code.

41
.howt
oaddheadert
oal
v

Reus
e_al
v_c
omment
ary_
wri
tef
unct
ionmodul
e.

42.
Codei
nspec
tor

tool
sforcheck
ingper
for
mance,
secur
it
y,s
ynt
axandnami
ngconvent
ionsofABAP
r
eposi
tor
yobjects
.

Tc
ode:
SCI
/SCI
D.

43.
Runt
imeanal
ysi
s:

Itex
aminesper
for
manceanddur
ati
ont
akenbyt
rans
act
ion,
ABAPpr
ogr
am and
f
uncti
onmodule.

Tc
odeSE30orSAT.

44.
Ext
endedpr
ogr
am check

usedtoper
for
mstat
icc
heckwhi
char
eti
mecons
umi
ngf
ormanual
check
.Itr
etur
ns
er
ror
sandwarni
ngs
.
TCODE:
SLI
N.

45.
SQLt
race

 no.
oft
imesdat
abas
eisacces
sed.

Tc
ode:
ST05.

46.
Conves
iont
echni
ques
:

BDC,
LSMW,
BAPI
(r
emot
eenabl
edf
unct
ionmodul
e).

47.
Wher
eist
hecdsvi
ewcr
eat
ed

ABAPl
ayer
.

48.
Whatdoesi
nit
ial
i
sat
ioneventdo,
andwheni
sitt
ri
gger
ed

I
nit
ial
i
zesapar
amet
er.
Get
str
igger
edbef
oref
ir
stdi
spl
ayofs
elec
tions
creen.

49.
EVENTSOFCLASSI
CALREPORT:

1
.I
nit
ial
i
sat
ion

2.
ATs
elect
ions
creen

3.
Ats
elect
ions
creenout
put

4.
Star
tofs
elect
ion

5.
Endofs
elect
ion

6.
Topofpage

7.
Endofpage.

50.
typesofi
nter
nal
tabl
e:

St
andar
d:non-
uni
quek
ey.O(
n).

Sor
ted:
Uni
que/
non-
uni
que.Ol
og(
n).

Has
hed:
Onl
yuni
quek
eyi
spos
sibl
e.Cons
tant
.

51
.Wi
thoutt
hes
y-s
ubr
c,canwek
nowi
fthef
unct
ionmodul
eiswor
kingpr
oper
ly,

 wecancheckbycheck
ingt
hecont
ent
sofi
t/
wor
kar
ea.

52.
Cant
hes
mar
tfor
mshowt
heendf
ormatwi
thoutt
hecode,

 Yes
.
53.
What
'sf
unc
tiongr
oup

 Funct
iongr
oupcont
ainsdi
ff
erentf
unc
tionmodul
es.

54.
Whymodul
epool
progr
am

 I
tgi
ves 
you 
theadvantageofcr
eat
inghi
ghl
ycus
tomi
zeds
creensvi
athel
ayoutt
ool
of
t
he 
SAP 
Graphi
calpai
nter
.
55.Cons
idert
hef
oll
owi
ngcode:
READi
tabi
nto<wa>.
.
.Whatdoesi
tmeanwhenyougets
y
-s
ubrc=0and=4

56.
Whatdoyous
eewhenyouopenCDS

57.
Dif
fer
encebet
weenCDSandAMDP

 cdshasonlyonesel
ec tst
atementwhil
eAMDPcanhavemul
ti
ples
elects
tatements
.So
CDScannothandlemor ethan1inputandout
puts
etswhi
l
eAMDPcanhandl eit
.SoAMDP
canhandl
ec omplexscenari
osandCDScannot.

58.
Dif
fer
enc
ebet
weenSes
sionMet
hodandcal
ltr
ans
act
ion

1
.Sl
owvsf
ast

2.
i
mpl
i
citvsex
pli
ci
ter
rorhandl
i
ng

3.
synchr
onouspr
oces
singvsas
ynchr
onous
/synchr
onouspr
oces
sing

59.
Shoul
dwei
mpl
emental
lthemet
hodsgi
veni
nthei
nter
fac
einas
ubcl
ass

 Yes,i
tismandator
yto 
impl
emental
lthemethods 
i
na cl
ass 
thatimplement
s
an 
int
erface 
unt
ilandunl
esst
hat
 cl
ass
 i
sdecl
aredasan 
abstr
actclass
.
60.
Wher
edoyoucr
eat
eAMDP

ABAPl
ayer

61
.Ift
her
eisaf
iel
daddedi
nthef
ormi
nter
fac
e,wi
l
litaut
omat
ical
l
ygetaddedi
nthedr
iver
pr
ogram?

NO,
needt
oaddmanual
l
y

62.
Whatwi
l
lbes
y-s
ubr
cwhent
hes
elects
tmti
nter
nal
tabl
ehasz
eror
ecor
ds

s
y-s
ubr
c=8f
orwar
ning

63.
Shoul
dal
lthemet
hodsofani
nter
facebei
mpl
ement
edi
nthei
nher
it
ingc
las
s?

 Yes,i
tismandator
yto 
impl
emental
lthemethods 
i
na cl
ass 
thatimplement
s
an 
int
erface 
unt
ilandunl
esst
hat
 cl
ass
 i
sdecl
aredasan 
abstr
actclass
.
64.
Repor
ts:
Howt
ocr
eat
ef4hel
pinar
epor
tpr
ogr
am

s
electopt
ions
65.
howt
oimpl
ementc
dsvi
ews

Wat
chCDSvi
ewdemovi
deo1

66.
Ok_
code

s
avesf
unct
ioncodeofus
eract
ion

67.
Dif
fb/
wnat
iveandopenSQL

 nat
ives
qli
sdat
abas
edependentandopeni
sindependent
.

Nat
ives
qli
sfas
ter
,openi
ssl
ower
.

68.
whatt
owedoi
nbadi

 A BADI 
isanenhancementtechniquet
hatfaci
l
itat
esa SAP pr
ogrammer ,auser,ora
speci
fi
cindustr
ytoaddsomeaddi t
ionalc
odetotheex i
sti
ngprogram i
n SAP s
ystem. We
can 
use st
andardorcust
omizedlogictoi
mprovethe 
SAP  s
yst
em. A 
BADI  
mustfi
rstbe
defi
nedandt heni
mplementedtoenhanc e 
SAPappli
cation.
69.
howt
ocal
lcons
truc
tori
noops

 cl
ass
-met
hods
:cons
truct
ori
mpor
ti
ng….
(noex
por
ti
ngpar
amet
ers
)

Met
hodcons
truct
or.

Count
er=count
er+1
.

Endmet
hod.

70.cans
mar
tfor
mrunwi
thoutdr
iverpr
og?i
fyeshow?

 Yes
.ABAPcodec
anbewr
it
teni
nsmar
tfor
m.

i
nsmar
tfor
m:

r
ightc
li
ckonanywi
ndow,

cr
eat
e--
>fl
owl
ogi
c--
>Pr
ogr
am Li
nes
.

71
.Ifs
electopti
onsi
sgi
veninsi
dewher
eclaus
e.Anduserdoesn'
tenteranyi
nputval
ue,
whatwill
bet heout
put
.Ei
theritwi
l
ldi
spl
ayall
thedat
aordisplaynothi
ng.

ALLDATA.

72.
Dif
fbet
weennor
mal
se1
1vi
ewsandc
dsvi
ews

onenamevst
woname

Cr
eat
edi
nsapgui
vsecl
i
pseorhanas
tudi
o

Cal
cul
ati
onsdonei
nappl
i
cat
ionl
ayervsdat
abas
elayer

Notc
odepus
hdownt
echni
quevscodepus
hdownt
echni
que
73.
Debuggi
ngk
eys
:

f
5:l
i
nebyl
i
neex
ecut
ioni
ndebugger

F7:
ifyouar
einf
unct
ionyouwi
l
lcomeoutcompl
eti
ngi
tsex
ecut
ion

F6:
itwi
l
lex
ecut
efunc
tionors
ubr
out
inewi
thoutgoi
ngi
nsi
de

F8:
tot
alex
ecut
iont
il
lnex
tbr
eak
poi
nt

74.
Howt
ocheckt
hes
tat
usofaback
groundj
ob

 SM37f
ormoni
tor
ingback
groundj
ob

75.
Ifwepas
sapar
amet
eropt
ional
inf
ormi
nter
fac
ewi
l
litpr
inti
nfor
m

YES.

76Andhowwi
l
lupr
intmat
eri
alt
ypeanddes
cri
pti
ont
oget
her

77.
Ask
eddi
ff
erencebt
wpr
ocedur
alandobj
ector
ient
edpr
ogr
ammi
ngdi
ff
erences

78.
Smar
tfor
msar
ecl
i
ent
-i
ndependent?I
fyes
,Howcanyous
ayt
hat
?
 Bydes
igns
aps
cri
pti
sawor
dpr
oces
singt
ool
whi
chdi
spl
aysdat
aont
hef
orm wi
tht
hehel
pof
tex
telement swheret hel ogicofthoseiswritt
enintheprintprogram andFormswer edes
ignedto
bedrivenfr
om pr i
ntpr ogram, hencear eoftentermedasclientdependent.Smar
tformsarec l
i
ent
i
ndependent .Bcozitdoes n’tuseanyt extel
ement s.i
twil
lbeex ecut
edthroughafuncti
onmodul e.
Whenapr i
ntprogram cal lsaSmar tForm, t
hef or
mi t
sel
ftakesovertoproduceoutput,wi
thoutany
fur
therdir
ectionfr
om pr intprogram.

di
79. f
fer
encebt
wpr
ocedur
alandobj
ector
ient
edpr
ogr
ammi
ngdi
ff
erences
80.
whydouneedr
efer
enc
ecur
rencyandquant
it
yfi
el
dsandwher
ecanyougi
vei
t

theyarecountr
yspec
ifi
c.Soneedtobes
peci
fi
ed.
Theycanbegi
veni
ncount
ry/
quant
it
y
t
abini
nternal
tabl
ewhil
ec r
eati
ngit.

81
.Canwepl
acet
abl
eit
emsi
nheaders
ect
iont
hani
nmai
nsect
ion

no

82.
Whydowehavet
odoal
lthi
sinmai
nwi
ndowcan'
tweus
esec
ondar
ywi
ndow

aut
omat
icpagebr
eakf
eat
ure

83.
Dif
fer
encebet
weencl
ass
ical
repor
tandALV

needtodocodi
ngtodis
playout
putVSweuseFMt odi
spl
ayout
put
.Fi
l
ter
ing,
sor
ti
ng,
t
otal
s,s
ubt
otal
s,r
ear
rangi
ngofcol
umnsispos
sibl
e.

84.
Canwepl
aceback
groundi
mageandl
ogous
ingALV

no

85.
whatwasdef
aul
tst
ylei
nsmar
tfor
ms

SYSTEM

86.
Howt
ogi
vecol
orst
ocol
umns
?

s
electt
hec
ell
thatwewantt
ogi
vecol
orandcl
i
ckons
hadi
ngands
electt
hecol
or.

87.
Ifyouhaveupl
oadedal
ogoc
hoos
ingt
ypebl
ackandwhi
te,
canyoudi
spl
ayi
tascol
or
i
nsmar t
for
m

88.
Ifi
nter
nal
tabl
eisdef
inedi
ngl
obal
def
ini
ti
on,
wil
lyoubeabl
etodi
spl
ayt
hedat
a

 For
mint
erf
ace

89.Ex
plai
nhows
elect
-opt
ionswor
k.Al
soex
plai
nifonl
ypr
ovi
dingl
owf
iel
disenoughf
ori
t
towork

90.
Whatar
ethedi
ff
erentt
ypesofpr
ogr
ams
?

91
.Tcodef
ormes
sagecl
ass

SE91

92.
Whatar
efunc
tional
modul
es?

s
apmm,
scm,
pp,
sd,HRM,
FICO(
fi
nanc
ial
account
ingandcont
rol
l
ing)

93.
Arei
ncl
udepr
ogr
amspr
ogr
am dependentonmai
npr
ogr
am ornot
?

No.

94.
Howt
ochanget
hef
ormatoft
ext

i
ntex
tGENERALATTRI
BUTESs
imi
l
art
omi
cros
oftwor
d

95.
whatar
epar
amet
ersofr
eus
e_al
v_c
omment
ary_
wri
te

96.
feat
uresofc
dsvi
ews

 CODEPUSHDOWNTECHNI
QUE.
ABAPCDSViews
 res
idei
ntheappl
i
cat
ions
erver(
dat
adi
cti
onar
y)butpr
oces
sthel
ogi
cin
thedat
abas
e.

97.I
fIgi
veonl
yamountf
iel
dasi
nputi
nfor
mint
erf
acei
twi
l
lgi
veer
ror
,whyi
sthat
happened?

needt
opas
sref
erencet
abl
eforamount

98.
ift
hef
unct
ionmodul
eint
heenvi
ronmentt
abcanbeus
edi
nqual
i
tys
yst
em ornot

no

99.
dif
fer
encebet
weenal
vandal
vida

1
00.
Whati
sthet
hedef
aul
teventi
ncl
ass
ical
repor
t

STARTOFSELECTI
ON.

1
01.
Whys
truc
tur
eisus
edasaas
soci
atet
ypewhi
l
edecl
ari
ngi
nter
nal
tabl
e

wecandec
idef
iel
dsands
equenceoff
iel
dsi
nint
ernal
tabl
e.

1
02.
Cont
rol
breaks
tat
ement
s

1
03.
Howdi
dyouc
hanget
hef
onti
nthef
orm

whenwecreatet
ext
,sel
ectGENERALATTRI
BUTESTABri
ghtcl
i
ckont
het
extyouhave
ent
eredi
nanditpr
omptsyoutosel
ectf
ontfr
om t
here.

1
04.
Expl
ainr
icef
w

RI
CEFW 
meansRepor
ts,
Int
erf
ace,
Conver
sion,
Enhancement
s,For
msandWor
kfl
ow.
1
05.
Stepsi
nls
mw

1
06.
Whati
sint
erf
ace?

 Si mil
arto classesin ABAP,interf
acesactasdat at ypesforobject
s.The
component sofi nt
erf
acesar esameast hecomponent sofclasses
.Unli
ket he
decl
ar at
ionofclass
es,t
hedeclarati
onofani nterf
acedoesnotincl
udethevi
sibil
i
ty
sect
ions.Thi
sisbecausethecomponent sdefinedinthedeclar
ati
onofanint
erface
arealwaysintegrat
edinthepublicvis
ibi
li
tysecti
onoftheclass
es.
I
nt er
facesareus edwhent wosimilarcl
asseshaveamet hodwiththes amename,
butt hef uncti
onal i
ti
esar edif
ferentfrom eachot her.Int
erf
acesmi ghtappear
simil
artoclas s
es ,butthefuncti
onsdef i
nedinani nter
faceareimpl ement edina
classtoex tend t hescopeoft hatcl ass.I
nter
facesalong witht hei nheri
tance
featureprovideabas eforpol
ymor phism.Thi
sisbecaus eamet hoddef inedinan
i
nt er
facecanbehavedi ff
erent
lyindiff
erentcl
asses.
VI
VAQUESTI
ONS

Audi
ocal
l 1
5-20mi
n Ver
ybas
icQues
tionsAs
ked(
almos
tal
lmodul
esvl
becover
ed)

 Howt
ocr
eat
eSc
reen.

 Scr
eencanbecreat
edf
rom SE51bys
peci
fyi
ngt
hepr
ogr
am nameand
scr
eennumber

 Sc
reencanal
sobecr
eat
edf
rom SE80.

Ri
ghtc
li
ckont
hepr
ogr
am -
>Cr
eat
e->Scr
een

Thi
sinvok
est
hes
creenpai
nter

Speci
fyt
hes
creennumberands
elec
ttheappr
opr
iat
eat
tri
but
es.

 Howt
oNavi
gat
ebet
weens
creen

 Nex ts
creenat
tri
but
e
 Screenstat
ements
 Aboutok
_code

 Ok_
c odeact
sjustasatemporaryvari
abl
et hats
torestheval
ueofs y-
ucomm.
Whenus eri
nteract
swit
hs cr
eenelement
s,thefuncti
oncodet hatwehave
ass
ignedisf
il
ledinthesy-
ucomm fiel
dwhichint
urnget sr
efl
ectedi
n
OK_CODE.

 Tobeabl
etouseOK_CODEi nModul
epool
program i
tmustbedef
inedi
n
bot
hthescr
een(
Fiel
dli
st)andt
heprogr
am workar
ea(Topi
ncl
ude)
.

 Subs
creen.

 Asubsc
reeni
sascr
eenthati
sdis
playedi
nas pec
ifi
edareaofanother
s
creen(t
he“mai
n”s
creen)
.Asubscr
eencannotbedispl
ayedbyit
self
.

 I
tisembeddedi
nfl
owl
ogi
cofmai
nscr
een,
simi
l
art
oincl
udei
nrepor
t
pr
ograms.
 r
elat oours
edt cenar
ioi
nASAmcqt
est
.

 Af
tert
hatas
kingust
ochoos
eonet
opi
c

 Cl
ass
ical
repor
t

 Classi
calr
eport
sar ethemos tbas i
cABAPreportsthatcont
ainbot
hs elect
ion
screenandanout puts cr
een.Theseareexecutedbasedonevents,
andnot
executedbyli
ne-by-li
nebas i
s.Thesear
enon- i
nter
acti
vereport
sandt hey
consis
tofoneprogr am thatcreat
esas i
ngl
elist
.

 I
nter
nal
tabl
e

 I
nter
naltabl
eisact
uall
yat empor aryt
able,whi
chcont
ainst
herecor
dofan
ABAPprogram t
hatisbei
ngex ecuted.I
texit
sonl
yduri
ngtherunt
imeofa
pr
ogram andareusedtoprocesslargevolumesofdat
a.

 Typesofi
nter
nal
tabl
e

 Ther
eare3t
ypesofi
nter
naltabl
e:(i
)St
andar
dInt
ernal
Tabl
es(
ii
)Sor
ted
I
nter
nal
Tabl
es(i
i
i)
HashedInt
ernalTabl
es

 Sor
tedt
ypes
ynt
ax

 TYPESORTEDTABLEOF

Ex
:TYPESBEGI
NOFt
y-mar
c,

mat
nrTYPEmat
nr,

wer
ksTYPEwer
ks_
d,

ENDoft
y-mar
c.

DATA:
gt_
mar
cTYPESORTEDTABLEOFt
y_mar
cWI
THUNI
QUEKEYmat
nr.

 I
nter
act
ivel
i
stevent
s

 I
NITI
ALI
ZATI
ON

 ATSELECTI
ON-
SCREEN

 START-
OF-
SELECTI
ON

 TOP-
OF-
PAGE

 END-
OF-
PAGE

 ATLI
NE-
SELECTI
ON

 ATUSER-
COMMAND

 TOP-
OF-
PAGEDURI
NGLI
NESELECTI
ON

 At-
li
nes
elect
ions
ynt
ax

 ATLI
NE-
SELECTI
ON.
 Eventt
ri
gger
edf
orHeadi
ngdur
ings
econdar
yli
st

 TOP-OF-
PAGEDURINGLI
NE-
SELECTI
ON.
Thes
yst
em t
ri
gger
sthi
seventf
or
eachsec
ondar
yli
st.

 Col
l
ectk
eywor
dus
age

 COLLECTs tatementall
owst hedevel
opertocreateauniqueorsummar i
zed
dataset.t
hes yst
em fi
rstt
riestofi
ndatableentrycor
respondi
ngtothetabl
e
key.I
fthesystem fi
ndsanent r
y,thenumericf
iel
dsthatarenotpartoft
he
tabl
ek eyareaddedt otheex i
sti
ngentr
ies
.Ifi
tdoesn’
tfi
ndanent r
y,the
syst
em createsanewent ry.

 Al
lnumericf
iel
ds(
typesN,
C,St
ri
ng)i
nani
nter
nal
tabl
ear
econs
ider
edask
ey
f
orcol
lectst
atement.

 Typesofi
nter
naltabl
e,s
ortedt
ypesyntax,
syntaxtoi
nsertali
neint
oat able,event
tr
igger
edtodispl
aytheheader
,cl
ass
icall
i
steventsandinter
acti
vel
istevents

 I
nter
nal
tabl
etypes
,synt
ax,
ask
edt
owr
it
epr
ocedur
eforf
orm des
igni
ng

 Ask
ingaboutthescenari
oinit
ial
lyandfrom t
hec
hos
ent
opi
cs.
.
..
.f
rom t
her
eshe'
s
goi
ngtoeveryothertopi
cfrom RICEFW

 Howt
oaddanewl
i
nei
nsor
tedi
nter
nal
tabl
e

 Us
ingt
heI
NSERTs
tat
ement

 I
NSERT<wor
kar
ea>I
NTOTABLE<i
nter
nal
tabl
e>.

 Howt
omak
eal
vint
eract
ive

 Cal
lfunct
ionmodul
eREUSE_
ALV_
EVENTS_
GET

 Pr
ovi
det
hes
ubr
out
inenamef
orUSER_
COMMAND

 Cr
eat
eaFor
m……EndFor
m wi
th2For
mal
Par
amet
ers

 It
heSubrouti
ne,
Cal
lthef
unct
ionmodul
eREUSE_
ALV_
GRI
D_DI
SPLAYt
o
di
spl
aySecondar
yALV

 Ex
por
ttheevent
sint
oint
ernal
tabl
etot
heREUSE_
ALV_
GRI
D_DI
SPLAY

 Advant
agesofal
v

 Cr
eat
ingandchangi
ngl
ayout
s

 Sor
ti
ngandf
il
ter
ingbas
edonval
ues

 Cal
cul
ati
onoft
otal
sands
ubt
otal
s

 Hi
erar
chi
cal
andTr
ees
truct
ures

 Pr
int
ingandmul
ti
pledownl
oadopt
ions

 Mul
ti
plei
nter
nal
tabl
esi
nsi
ngl
eALV

 Whati
sthedef
aul
tsel
ect
ions
creenevent
?
 Ands
heas
kedaboutI
nter
act
iveal
v

 I
twasver
yeas
ysheas
kedabtt
hes
cenar
io

 Thens
heas
kedwher
ewi
l
lweval
i
dat
ethes
elect
ions
creenel
ement

 Abouti
nser
tst
atementAndwhyc
urr
encyquant
it
yfi
el
dsneedsr
efer
enc
e

 Whatf
misus
edt
odi
spl
ayal
v

 REUSE_
ALV_
LIST_
DISPLAY

 REUSE_
ALV_
GRI
D_DI
SPLAY

 REUSE_
ALV_
VARI
ANT_
F4

 Smar
tfor
msvsAdobef
orms

 Forbot
hofthem,SAOdynamical
l
ycr
eatesafuncti
onmodul
ethatmus
tbe
cal
ledf
rom anABAPpr
ogram t
ogener
atetheform.

 I
nSmartFor
ms,itisposs
ibl
etoaddABAPcodedur
inggener
ati
onoft
hef
orm,
t
hati
snotposs
iblewiththeAdobeFor
ms.

 I
tispossi
blet
oaddjavas
criptofFOr
mCalccodei
nAdobeFor
ms,
whi
chi
s
execut
edduringt
hegenerati
onofthef
orm.

 Howt
opas
sdat
aint
ofor
m

 Aftercr
eati
ngaform gettheFuncti
onmodul
enameandac t
ivat
et he
form->createar
eportprogram -
>from t
hepatt
erncal
lthesmartform
functi
onmodulename. -
>pas st
hedata->acti
vateandexecutethe
program.

 Howt
oaddbarcodet
ofor
m

 Cr
eat
eas
mar
tst
ylewi
thac
har
act
erf
ormatwi
thbarcode.
Uset
his
smar
tstyl
eintheform.
Speci
fythechar
act
erf
ormati
nthet
ext
el
ementwhil
eprinti
ngthei
nvoi
cenumber
 Whati
ssubf
orm(
AdobeFor
ms)

 Asubfor
misas ect
ioninthefor
m des
ignt
hatpr
ovi
desl
ayoutandgeometr
y
managementofobject
s.Theobj
ectsi
nasubf
ormcanbearr
angedinrows
andcol
umns.

 Morethanonesubf
ormcanbeus
edi
naf
orm des
ign.
Subf
ormscanbe
pl
acedinsi
deot
hersubf
orms
.

 Aboutl
ogoupl
oadi
ng

 Cr
eat
eanl
ogo/
imageands
avei
tin.
bit
map/
.bmpf
ormat

 SE78->Bi
t mapImages-
>Import-
>sel
ectthefi
l
enameoflogo->sel
ect
whethercolour
/bl
ack
&whit
eimage->cont
inue->canal
sopri
ntpr
evi
ewt o
check
 SMARTFORMS- >c r
eateaf
orm->ri
ghtcl
ickonwithi
npage->cr
eat
e
window- >nameitasl
ogowindow->for
m paint
erofthewi
ndow->adj
ust
theplacementoft
helogo-
>closet
hefor
m paint
er

 Rightcl
ic
konthelogowindow- >cr
eat
egr
aphi
csi
nthel
ogowindow->gi
ve
descri
pti
onf
orthegraphicstab-
>sear
chf
ort
hefi
l
e->sel
ectt
helogo-
>
save->youcanprintpr
eview.

 Scenar
io

 di
ff
erenc
ebet
weenal
vandi
nter
act
iveal
v,

 I
nter
acti
ver
ecor
dsfir
stpr
ovidebas
icl
i
standthenadet
ail
li
stdependi
ng
upontheus
eri
nter
acti
onforoneormoref
iel
ds.

 I
nter
act
iver
epor
tscanbeALVorcl
ass
ical
repor
ts

 ALVr
epor
tscanbes
impl
eALVorI
nter
act
iver
epor
t.

 whyweneeds
mar
tfor
ms

 s
mar t
for
msi
sus
edt
ocr
eat
eandmai
ntai
nfor
msi
nmas
spr
int
ingi
nSAP
s
ysyems.

 Thes
ear
eeas
iert
odevel
op,
mai
ntai
nandt
rans
por
tthanSAPSc
ript

 Smar
tfor
msal
sos
uppor
tout
putdevi
cesl
i
kepr
int
er,
fax
,emai
l
.

 howwi
l
lyouchangecol
umni
nAl
Vrepor
t

 howt
ochangecol
umni
nal
v?

 Whyi
nter
act
iveALV

 Todi
spl
aydet
ail
sbas
edonus
eract
ions

 Tomak
ethef
ir
stl
evel
repor
ttobel
ean

 Tohandl
ethenumberoffi
eldst
obedi
spl
ayedwhi
chc
annotbehandl
edby
cl
ass
ical
int
eract
iver
epor
ts.

 howwecanper
for
m VI
EW andi
t’
stcode

 Modul
epool

 Howcanwef
il
ldat
ainacol
umnoft
abl
e

 Tcodeoft
abl
e

 Howtochangec olumnposi
ti
onsi
nalv,whydoweneedvi
ewsandindexes
, howto
di
spl
ayoutputofinter
nal
tabl
ewithoutus
ingf
xnmodul
esandaboutthescenar
io.

 Di
ff
erencebet
weenSel
ectSi
ngl
eands
elec
tupt
o?

 Selects
ingl
eisac ons
tructdes
ignedtoreaddat
abaser
ecor
dswit
hprimary
key.I
ntheabs enceofthepri
maryk ey,
itmi
ghtendupdoi
ngasequenti
al
s
ear
ch.

 Sel
ectuptomayas sumethatt
her
eisnopr
imar
ykeys
uppl
i
edandwi
l
ltr
yto
fi
ndmos tsui
tabl
eindex
.

 Whent
ous
eends
elects
tat
ement
?

 Sel
ect…..
Endsel
ectworksasaloopfet
chi
ngsingl
erecordforever
yloop
pause.I
twork
slikeacl
ientcur
sorwhichwi
ll
generatetoomuc htr
affi
conthe
networ
kandc ommunicati
onsbetweenappl
icati
onserveranddatabase
ser
ver.

 I
tisus
edt
oreaddat
aone-
by-
one(
wit
houti
nter
nal
tabl
e)

 whatar
ethet
wodi
ff
erentmet
hodsofc
reat
ingas
mar
tfor
m?

 Smar
tfor
ms

 Smar
tst
yles

 Howt
ocr
eat
eat
abl
eins
mar
tfor
m?

 Ri
ghtc
li
ckont
hemai
nwi
ndowoft
hef
orm-
>cr
eat
e->t
abl
e.

 howt
ohavef
ourcol
umnsi
nthet
abl
eins
mar
tfor
m?

 Dr
awt
hecol
umnsands
peci
fyt
hel
i
net
ype

 Cr
eatet
hecolumnsdynami
cal
lybydefi
ningit
_axi
s_
x,i
t_
axi
s_
y,i
t_
cel
l
_v
manual
l
yinthetempl
atewhi
lecr
eati
ngat able.

 Tablepai
nter->pat
ter
nbutton-
>di
spl
ayf
ramedpat
ter
nbut
ton-
>doubl
e
cl
ickontherequi
redpatt
ern

 Howt
opas
svar
iabl
esf
rom dr
iverpr
ogr
am?

 Pr
ovi
det
hedat
atabl
etypei
nthei
nter
facet
aboft
hes
mar
tfor
ms

 Pr
ovi
des
truct
urenamei
nthegl
obal
def
ini
ti
ont
aboft
hes
mar
tfor
ms

 Al
sopr
ovi
det
het
abl
enameandwor
kar
eanameundert
hel
oopofmai
n
wi
ndow.

 Howt
ocal
las
mar
tfor
minadr
iverpr
ogr
am?

 Bycal
l
ingt
hef
unct
ionSSF_
FUNCTI
ON_
MODULE_
NAME.

 Howt
oac
tivat
eback&ex
itbut
toni
nmodul
epool
progr
am?

 Af
teract
ivat
ingt
hemodul
est
atusunderPBO,
anddef
ini
ngt
heSTATUS.

 Doubl
ecl
i
ckon‘
STATUS’
toc
reat
epfs
tat
us

 Pr
ovi
des
hor
tdes
cri
pti
on

 Cl
i
ckont
he‘
+’but
tonoft
hef
unct
ionk
ey&f
il
l‘
BACK’
,‘
EXI
T’
.
 Ondoubl
ecl
i
cki
ngonEXI
T,adi
alogboxappear
ssel
ectt
hef
unct
iont
ype‘
E’
.

 I
haveonemandat
oryf
iel
dinmodul
epool
scr
een,
howt
obypas
sthi
sandex
itt
he
s
creen?

 Us
eEXI
Tcommandsi
.
e.,
ATSELECTI
ON-
SCREENONEXI
T-COMMAND

 Whatar
ethet
ypesofmodel
l
ingvi
ew?

 At
tri
but
eVi
ews

 Anal
yti
cVi
ews

 Cal
cul
ati
onVi
ews

 Model
l
ingvi
ewi
scr
eat
edi
nwhi
chl
ayer
?

 HanaDat
abas
elayer

 Whati
sCDSVi
ew?

 Cor
eDat aServi
cesisasetofdomain-speci
fi
clanguagesandservi
cesfor
def
ini
ngandc onsumingsemantical
l
yr i
chdatamodel s
.Itcanbecreat
edin
anyDatabase.I
tgivesasi
ngleresul
tsetasanout put
.

 Typesofconver
sionsmet
hods
?

 Fi
l
ereadi
ngus
ingGUI
_UPLOAD&GUI
_DOWNLOAD

 BDCs
ess
ioni
mpl
ement
ati
on

 BDCCal
lTr
ans
act
ion

 LSMW

 BAPI

 Di
ff
erencebet
weenCDSVi
ewsandSE1
1Vi
ews
?

 ACDSviewismor epowerf
ulthanaSE1 1vi
ewasi tdes
cribesanopensour
ce
DDLforbui
l
dingamet a-
model repos
itor
yinvol
vingdatabasetabl
es,
dat
abasevi
ews ,
databasefuncti
onsanddat atypes

CDSViews SE11Vi
ews
 Resi
deint heHANAdatabase  Resi
deintheappl
icat
ion
ser
ver
 UseNat i
veSQL  UseOpenSQL
 Aim atnativeSAPHANA  Aim atABAPappl
icat
ions
appl
i
cat i
ons
 Mainfocust ocreat
emodel
s  Mainfocust
ocreateviews

 Di
ff
erencebet
weenAs
ynchr
onous&Synchr
onous
Asynchronous Synchr
onous
 Processesmul t
ipl
e  Pr
ocessesonetr
ansact
ionat
tr
ansactionsatat i
me atime
 I
tdoes n’twaitforcur
rent  Unti
lpr
ocessi
ngofcurr
ent
tr
ansactiontocompl ete.I
tst
artst
o tr
ansacti
onisnotcomplet
ed,t
he
update updatedoesn’
tstar
t

 Howdowedef
inecal
ltr
ans
act
ionmet
hod?

 CALLTRANSACTI ON<transacti
oncode>
USING<bdctable>
MODE<displaymode>
UPDATE<updatemode>
 <di
splaymode> A–Di spl
ayall
E–Di s
playonlyerr
ors
N–Nodi s
play
 <updatemode> S–Sync hronousupdate
A–As ynchronousupdate
 Howdowedef i
neer
rormes s
ages?
 Di
ff
erencebet
weenOPENSQL&NATI
VESQL?
 OpenSQLaccessesdatabas et
ablesdeclar
edintheABAPDi cti
onary,regardl
essof
t
hedatabas
epl atf
orm.NativeSQLallowstousedat abase-
speci
ficSQLs t
atements
i
nanABAPpr ogram.Thismeanst hatonec anusedatabasetablesthatarenot
managedbytheABAPDi ct
ionar
y,andt her
efor
eintegrat
edatat hatisnotpartof
t
heSAPWebASABAPSys tem.
 Asar ul
e,anABAPprogram contai
ningdatabase-
speci
fi
cSQLstatements
will
 
not 
rununderdi
ff
erentdatabasesyst
ems .I
fyourpr
ogram wil
lbeusedonmor
e
thanonedatabasepl
atfor
m, onl
yus eOpenSQLs tat
ements
OpenSQL NativeSQL
Therei
snoc ommainsel
ectquer
y Weus ecommasi ns el
ectquer yto
betweeneveryel
ement. separ ateeveryel ementf r
om each
other.
Thereisimpli
citcl
ienthandli
ng, Theisnoi mplic
itc l
ienthandling
henceweneednothandl ethecli
ent henc eweneedt ohandl ethecl i
ent
expl
ici
tl
y. expli
c i
tly.
Corr
espondingf i
eldsforal
lentr
iesis Corres pondingfieldsforallentri
esi
s
supported. nots uppor t
ed.
Separatorbetweent ableand Separ atorbetweent ableand
fi
el
dnamei stide(~) fi
elnamei speri
od( .
)

 CDSVi
ewsc
anbecr
eat
edonwhi
chdat
abas
e?

 CDSVi
ewscanbecr
eat
edi
nanydat
abas
e.
 AMDPc
anbecr
eat
edonwhi
chdat
abas
e?

 AMDPc
anbecr
eat
edonl
yinHANAdat
abas
e.
 WhyHANAi
sfas
tert
hanot
herdat
abas
e?
 Thefunct
ional
i
tyofdat
abeingst
oredinaRAMchi
pins
teadofahar
ddi
sk,
makesSAPHANAahi ghspeedproces
sing.

 Whereasinotherdat
abaset
hedatai
sbeingreadfr
om t
hehar
ddi
skand
s
ubsequentl
ymovedintoRAMfordat
aproces
s i
ng.
 Whatiswri
tt
eni
nGUI
UPLOAD,
BDC_
OPEN_
GROUP,
BDC_
CLOSE_
GROUP,
BDC_
INSERT?

 GUI
_UPLOAD:
Funct
ionmodul
etor
eaddat
afr
om af
il
e
 Syntax: CALLFUNCTI ON‘ GUI _
UPLOAD’
EXPORTI NG
fi
lename=‘ ‘
tables
data_ t
ab=
 BDC_ OPEN_GROUP: Opens ession
 Syntax: CALLFUNCTI ON‘ BDC_ OPEN_ GROUP’
EXPORTI NG
CLIENT=<c li
ent>* *->mandat
ory
GROUP=<s essionname>*
HOLDDATE=<l oc kdat e>
KEEP=<del eti
oni ndicator
>
USER=<bat chus ername>*
EXCEPTI ONS
………………
 BDC_ CLOSE_GROUP: Clos esession
 Syntax: CALLFUNCTI ON‘ BDC_ CLOSE_ GROUP’
EXCEPTI ONS
…………….
 BDC_ I
NSERT: Entertrans act
iondat a
 Syntax: CALLFUNCTI ON‘ BDC_ INSERT’
EXPORTI NG
TCODE=<t ransact
ionc
ode>
TABLES
DYNPROTAB=<bdct able>

EXCEPTI
ONS
………………
 Whati
scodepus
hdown?

 CodePushdownispushi
ngall
databaserelat
edcalcul
ati
onsand
aggr
egati
onsinunder
lyi
ngdat
abas e.
Process
ingi
nt hedatabas
elayer
l
eadstobett
erspeedt
hanproces
singinappli
cati
onlayer
.
 Whati
smul
ticor
ecpu&mul
tibl
ades
?

 Multi
-coreCPU’sandmul
tibladeshelpi
nparal
lel
proces
singoft
he
data.Eachcolumnofdat
ai sproces
sedbyeachbladeoftheCPU
i
ndependent l
yands i
mul
taneousl
yus i
ngtheunderl
yi
nghardwaret
o
thefull
est.

 Mul
ti
plecor
ear
chi
tect
ure(8x8c
oreCPUperbl
ade)
.
 Whati
sdi
ff
erencebet
weenBDC&BAPI
?Whi
chi
sfas
ter
?
BDC BAPI
BDCistheoldmet hodofmoving BAPIisthenewenhancedAppl i
cati
on
l
egacydat atoSAP I
nterface
BDCistransacti
onor i
ented. BAPIisani nterfaci
ngmethod
BDCispreferr
edi fthedatafr
om t
he BAPI’
sar epref err
ed,i
fdataexchange
l
egacysystem ismovedt oSAP i
sonline/continuousbetweenSAP
si
ngl
etime. andnon- SAPappl i
cat
ions
.BAPI’sar
e
alsopreferr
edi nviewofperfor
manc e
too.

BAPI
ismuchf
ast
ert
hanBDC.
 Li
mit
ati
onsofBDC

 Thedataisdi
vers
et hati
tisdi
ff
icul
ttopr
edi
ctt
hes
creens
equence
underanycir
cumstances

 Theer
rorhandl
i
ngbecomesat
edi
ouspr
oces
s

 Thes
ess
ioni
mpl
ement
ati
oni
sti
mecons
umi
ng
 Di
ff
erentt
ypeofcus
tomerex
it?

 Menuex
it

 Fi
el
dex
it

 Sc
reenex
it

 Funct
ionmodul
eex
it

You might also like