Anda di halaman 1dari 166

0

SAP AG 2003
TAW12 ABAP Workbench Concepts (1/3)
SAP AG
TAW12 1/3
TAW12 1/3
ABAP Workbench
Concepts
ABAP Workbench
Concepts
R/3 System
Release 4.6D or above
2003/Q2
Material number 5006 1051
SA A! "A#12 0$1
0.2
SAP AG 2003
Copyright 2003 SAP AG. A rights reser!e".
#o p$rt o% this p&bic$tion '$y be repro"&ce" or tr$ns'itte" in
$ny %or' or %or $ny p&rpose (itho&t
the e)press per'ission o% SAP AG. The in%or'$tion cont$ine"
herein '$y be ch$nge" (itho&t prior notice.
A rights reser!e".
Copyright
%omments on tra&emar's(
Some so)t*are +ro&u,ts mar'ete& by SA A! an& its &istributors ,ontain +ro+rietary so)t*are
,om+onents o) ot-er so)t*are ven&ors.
Mi,roso)t./ #01D2#S./ 1"./ 34%35./ #or&./ o*eroint. an& SQ5 Server. are re6istere&
tra&emar's o) Mi,roso)t %or+oration.
07M./ D72./ D72 8niversal Database/ 2S/2./ arallel Sys+le9./ M:S/3SA/ A04./ S/3;0./
AS/400./ 2S/3;0./ 2S/400./ iSeries/ +Series/ 9Series/ <Series/ </2S/ A=/ 0ntelli6ent Miner/
#ebS+-ere./ 1et)inity./ "ivoli./ 0n)ormi9 an& 0n)ormi9. Dynami, Server"M are tra&emar's o)
07M %or+oration in 8SA an&/or ot-er ,ountries.
2RA%53. is a re6istere& tra&emar' o) 2RA%53 %or+oration.
8104./ 4/2+en./ 2S=/1. an& Moti). are re6istere& tra&emar's o) t-e 2+en !rou+.
%itri9./ t-e %itri9 lo6o/ 0%A./ ro6ram 1ei6-bor-oo&./ Meta=rame./ #in=rame./
:i&eo=rame./ Multi#in. an& ot-er %itri9 +ro&u,t names re)eren,e& -erein are tra&emar's o)
%itri9 Systems/ 0n,.
>"M5/ D>"M5/ 4M5/ 4>"M5 are tra&emar's or re6istere& tra&emar's o) #3%./ #orl& #i&e
#eb %onsortium/ Massa,-usetts 0nstitute o) "e,-nolo6y.
?A:A. is a re6istere& tra&emar' o) Sun Mi,rosystems/ 0n,.
?A:AS%R0". is a re6istere& tra&emar' o) Sun Mi,rosystems/ 0n,./ use& un&er li,ense )or
te,-nolo6y invente& an& im+lemente& by 1ets,a+e.
MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce ne!
SA/ R// mySA/ mySA.,om/ 9A++s/ 9A++/ an& ot-er SA +ro&u,ts an& servi,es mentione& -erein
as *ell as t-eir res+e,tive lo6os are tra&emar's or re6istere& tra&emar's o) SA A! in !ermany an&
in several ot-er ,ountries all over t-e *orl&. All ot-er +ro&u,t an& servi,e names mentione& are t-e
tra&emar's o) t-eir res+e,tive ,om+anies.
SA A! "A#12 0$2
0.3
SAP AG 2003
*e!eop'ent Cons&t$nt 'ySAP Technoogy +
ABAP Workbench
mySAP Technology
- ABAP Workbench
Concepts
TAW12 15 days
Development
consltant
cert!"!cat!on #
mySAP Technology
# ABAP Workbench
TAW1$ 1$ days
mySAP Technology -
ABAP Workbench
%ndamentals
SA A! "A#12 0$3
0.4
SAP AG 2003
Co&rse Prere,&isites
Required
TAW10- 'ySAP Technoogy . ABAP Workbench
/&n"$'ent$s
or co'p$r$be kno(e"ge
SA A! "A#12 0$4
0.5
SAP AG 2003
T$rget Gro&p
&
&
Target group
*e!eop'ent cons&t$nts $n" "e!eopers (ho $re
responsibe %or $"0&sting $n" "e!eoping b&siness
$ppic$tions in ABAP/ABAP ob0ects
Duration
11 "$ys
SA A! "A#12 0$5
0.6
SAP AG 2003
At the en" o% this tr$ining co&rse yo& (i be $be to-
*escribe the concepts o% the ABAP progr$''ing
$ng&$ge
2se the ABAP progr$''ing $ng&$ge $n" the
ABAP Workbench toos to "e!eop yo&r o(n
b&siness $ppic$tions or to '$ke in"i!i"&$
$"0&st'ents to SAP st$n"$r" so%t($re
*irecty &se yo&r kno(e"ge $s $ 0&nior
cons&t$nt in $n initi$ pr$ctic$ ph$se
Go$s
SA A! "A#12 0$6
0.7
SAP AG 2003
Comple" 'ySAP.co' technoogies
Comple" ABAP Workbench
/&n"$'ent$s
Comple" ABAP 3b0ects
C$se st&"y
Co&rse Content- 'ySAP Technoogy +
ABAP Workbench /&n"$'ent$s
Pre%$ce
"-is SA %onsultant 3&u,ation trainin6 ,ourse ,ontains &i))erent in&ivi&ual ,ourses @se,tionsA/ ea,-
o) *-i,- -an&les a se+arate to+i,.
3a,- in&ivi&ual ,ourse @se,tionA is &ivi&e& into &i))erent units.
SA A! "A#12 0$B
0.8
SAP AG 2003
Comple" Progr$''ing *$t$b$se
2p"$tes
Comple" So&tion 4$n$ger
Comple" 5nh$nce'ents $n"
4o"i%ic$tions
C$se st&"y
Comple" ABAP *iction$ry
Comple" Techni,&es o% 6ist
Processing
Comple" Progr$''ing 2ser
*i$ogs
Co&rse Content- 'ySAP Technoogy +
ABAP Workbench Concepts
Pre%$ce
"-is SA %onsultant 3&u,ation trainin6 ,ourse ,ontains &i))erent in&ivi&ual ,ourses @se,tionsA/ ea,-
o) *-i,- -an&les a se+arate to+i,.
3a,- in&ivi&ual ,ourse @se,tionA is &ivi&e& into &i))erent units.
SA A! "A#12 0$C
SAP AG 2003
Co'pe)- ABAP *iction$ry
SA A! "A#12 1$1
SAP AG 2003
Co&rse Content- ABAP *iction$ry
#nit 7ntro"&ction
#nit T$bes in the ABAP
*iction$ry
#nit Per%or'$nce in T$be
Accesses
#nit Consistency thro&gh
7np&t Checks
#nit *epen"encies o% ABAP
*iction$ry 3b0ects
#nit T$be 2p"$tes
#nit 8ie(s
#nit Se$rch 9ep
Appen"i)
SA A! "A#12 1$2
SAP AG $%%%
/&nction o% the ABAP *iction$ry in the :/3 Syste'
*e%inition o% "$t$b$se ob0ects
2ser."e%ine" types
Ser!ices in the ABAP *iction$ry
6inking to the "e!eop'ent $n" r&nti'e
en!iron'ents
7ntro"&ction
SA A! "A#12 2$1
SAP AG 2002
Co&rse 3b0ecti!es
At the en" o% this &nit; yo& (i be $be to-
*e%ine the %&nction o% the ABAP *iction$ry in the :/3
Syste'
*escribe the ($ys to "e%ine "$t$ ob0ects $n" types
*escribe the ser!ices pro!i"e" by the ABAP
*iction$ry
5)p$in ho( the ABAP *iction$ry is inke" to the
"e!eop'ent $n" r&nti'e en!iron'ents
SA A! "A#12 2$2
SAP AG 2002
/&nction o% the ABAP *iction$ry
*B t$be
Ser!ices
Screen
Poss. !$&es
Type "e%initions
Str&ct&re
T$be type
*$t$ ee'ents
/<
*B ob0ects
T$be
"-e A7A Di,tionary +ermits ,entral mana6ement o) all t-e &ata &e)initions use& in t-e R/3 System.
0n t-e A7A Di,tionary/ you ,an ,reate user$&e)ine& ty+es @&ata elements/ stru,tures/ an& table
ty+esA )or use in A7A +ro6rams or in inter)a,es o) )un,tion mo&ules. Database obDe,ts su,- as
tables an& &atabase vie*s ,an also be &e)ine& in t-e A7A Di,tionary an& ,reate& *it- t-is
&e)inition in t-e &atabase.
"-e A7A Di,tionary also +rovi&es a number o) servi,es t-at su++ort +ro6ram &evelo+ment. =or
e9am+le/ settin6 an& releasin6 lo,'s/ &e)inin6 an in+ut -el+ @=4 -el+A/ an& atta,-in6 a )iel& -el+ @=1
-el+A to a s,reen )iel& are su++orte&.
SA A! "A#12 2$3
SAP AG $%%%
*$t$b$se
*$t$b$se 3b0ects in the ABAP *iction$ry
T$be 1
ABAP *iction$ry
T$be 2
8ie(
3b0ects $re $&to'$tic$y
cre$te" in the *B $n"
$"0&ste" to ch$nges
"ables an& &atabase vie*s ,an be &e)ine& in t-e A7A Di,tionary.
"-ese obDe,ts are ,reate& in t-e un&erlyin6 &atabase *it- t-is &e)inition. %-an6es in t-e &e)inition o)
a table or &atabase vie* are also automati,ally ma&e in t-e &atabase.
0n&e9es ,an be &e)ine& in t-e A7A Di,tionary to s+ee& u+ a,,ess to &ata in a table. "-ese in&e9es
are also ,reate& in t-e &atabase.
SA A! "A#12 2$4
SAP AG 2002
Type *e%initions in the ABAP *iction$ry
=7P To(n n$'e Street 9o&se no.
#&'bers
5'poyee
#$'e A""ress Teephone
/irst n$'e 6$st n$'e To(n A""ress
"-ree &i))erent ty+e ,ate6ories e9ist in t-e A7A Di,tionary(
Data elements: Des,ribe an elementary ty+e by &e)inin6 t-e &ata ty+e/ len6t-/ an& +ossibly
&e,imal +la,es.
Structures: %onsist o) ,om+onents t-at ,an -ave any ty+e.
Table types: Des,ribe t-e stru,ture o) an internal table.
Any ,om+le9 user$&e)ine& ty+e ,an be built )rom t-ese basi, ty+es.
Example: "-e &ata o) an em+loyee is store& in a stru,ture 3M52E33 *it- t-e ,om+onentFs
1AM3/ ADDR3SS an& "353>213. %om+onent 1AM3 is also a stru,ture *it- ,om+onentFs
=0RS" 1AM3 an& 5AS" 1AM3. 7ot- o) t-ese ,om+onents are elementary/ )or e9am+le/ t-eir ty+e
is &e)ine& by a &ata element. "-e ty+e o) ,om+onent ADDR3SS is also &e)ine& by a stru,ture *-ose
,om+onents are also stru,tures. A table ty+e is use& to &e)ine ,om+onent "353>213 @be,ause an
em+loyee ,an -ave more t-an one tele+-one numberA.
"y+es are use& )or e9am+le in A7A +ro6rams or to &e)ine t-e ty+es o) inter)a,e +arameters o)
)un,tion mo&ules.
SA A! "A#12 2$5
SAP AG 2002
Ser!ices o% the ABAP *iction$ry
Carrier
&li'(t num)er
. . .
Maintenance of fli'(ts
*+
#o
.
*ep$rt. city Arri!$ city
Carrier
0<00 /r$nk%&rt #e( >ork
0<02 /r$nk%&rt #e( >ork
69
2<02 /r$nk%&rt Berin
... !!! !!!
Co"e o% the %ight connection
Code definin' a fli'(t connection
)etween two cities, e!'! 0-00
&rankfurt . /ew 0ork!
/1
/<
"-e A7A Di,tionary su++orts +ro6ram &evelo+ment *it- a number o) servi,es(
0n+ut -el+s @=4 -el+sA )or s,reen )iel&s ,an be &e)ine& *it- sear,- -el+s.
=iel& -el+ @=1 -el+A ,an be easily assi6ne& to s,reen )iel&s by ,reatin6 &o,umentation )or t-e &ata
element.
An in+ut ,-e,' t-at ensures t-at t-e values entere& are ,onsistent ,an easily be &e)ine& )or s,reen
)iel&s usin6 )orei6n 'eys.
"-e A7A Di,tionary +rovi&es su++ort *-en you set an& release lo,'s. "o &o so/ you must ,reate
lo,' obDe,ts in t-e A7A Di,tionary. =un,tion mo&ules )or settin6 an& releasin6 lo,'s are
automati,ally 6enerate& )rom t-ese lo,' obDe,tsG t-ese ,an t-en be lin'e& into t-e a++li,ation
+ro6ram.
"-e +er)orman,e *-en a,,essin6 t-is &ata ,an be im+rove& )or &atabase obDe,ts @tables/ vie*sA
*it- bu))erin6 settin6s.
7y lo66in6/ you ,an s*it,- on t-e automati, re,or&in6 o) ,-an6es to t-e table entries.
SA A! "A#12 2$6
SAP AG $%%%
6inking to the *e!eop'ent $n" :&nti'e
5n!iron'ent
ABAP
*iction$ry :e$" type
"e%initions
:e$"s str&ct&re o%
"$t$b$se ob0ects
:&nti'e en!iron'ent
*e!eop'ent
en!iron'ent
ABAP
7nterpreter
Screen
7nterpreter
ABAP
toos
Screen
P$inter
*$t$b$se
inter%$ce
"-e A7A Di,tionary is a,tively inte6rate& in t-e &evelo+ment an& runtime environments. 3a,-
,-an6e ta'es imme&iate e))e,t in t-e relevant A7A +ro6rams an& s,reens.
Examples:
#-en a +ro6ram or s,reen is 6enerate&/ t-e A7A inter+reter an& t-e s,reen inter+reter a,,ess t-e
ty+e &e)initions store& in t-e A7A Di,tionary.
"-e A7A tools an& t-e S,reen ainter use t-e in)ormation store& in t-e A7A Di,tionary to
su++ort you &urin6 +ro6ram &evelo+ment. An e9am+le o) t-is is t-e Get from Dictionary )un,tion
in t-e S,reen ainter/ *it- *-i,- you ,an +la,e )iel&s o) a table or stru,ture &e)ine& in t-e A7A
Di,tionary in a s,reen.
"-e &atabase inter)a,e uses t-e in)ormation about tables or &atabase vie*s store& in t-e A7A
Di,tionary to a,,ess t-e &ata o) t-ese obDe,ts.
SA A! "A#12 2$B
SAP AG 2002
2nit S&''$ry
The ABAP *iction$ry '$n$ges "$t$ "e%initions.
2ser."e%ine" types c$n be cre$te" in the ABAP *iction$ry.
They c$n be &se"; %or e)$'pe; in ABAP progr$'s.
T$bes $n" "$t$b$se !ie(s $re "e%ine" in the ABAP
*iction$ry $n" $&to'$tic$y cre$te" (ith this "e%inition in
the &n"erying "$t$b$se.
The ABAP *iction$ry pro!i"es $ n&'ber o% ser!ices th$t
s&pport progr$' "e!eop'ent.
The ABAP *iction$ry is $cti!ey integr$te" in the
"e!eop'ent $n" r&nti'e en!iron'ents.
SA A! "A#12 2$C
SAP AG $%%%
T(o.e!e "o'$in concept
4$ppe" in the re$tion$ "$t$b$se syste'
7nc&"e str&ct&res
Technic$ settings
1ata class
Si2e cate'ory
Bufferin'
*o''in'
T$bes in the ABAP *iction$ry
SA A! "A#12 3$1
SAP AG 2002
At the en" o% this &nit; yo& (i be $be to-
Cre$te T$bes
2se the t(o.e!e "o'$in concept
*e%ine the technic$ settings o% $ t$be
Cre$te $n" &se inc&"e str&ct&res
Co&rse 3b0ecti!es
SA A! "A#12 3$2
SAP AG 2002
T$bes $n" /ie"s
?ey /&nction %ie"s
:o(
T$be
?ey 1
.
.
.
?ey 2
.
.
.
?ey n
.
.
.
/ 1
.
.
.
/ 2
.
.
.
/ n
.
.
.
"-e stru,ture o) t-e obDe,ts o) a++li,ation &evelo+ment are ma++e& in tables on t-e un&erlyin6
relational &atabase.
"-e attributes o) t-ese obDe,ts ,orres+on& to )iel&s o) t-e table.
A table ,onsists o) ,olumns @)iel&sA an& ro*s @entriesA. 0t -as a name an& &i))erent attributes/ su,- as
&elivery ,lass an& maintenan,e aut-ori<ation.
A )iel& -as a uniHue name an& attributesG )or e9am+le/ it ,an be a 'ey )iel&.
A table -as one or more 'ey )iel&s/ ,alle& t-e +rimary 'ey.
"-e values o) t-ese 'ey )iel&s uniHuely i&enti)y a table entry.
Eou must s+e,i)y a reference table )or )iel&s ,ontainin6 a ,urren,y @&ata ty+e %8RRA or Huantity
@&ata ty+e Q8A1A. 0t must ,ontain a )iel& @reference fieldA *it- t-e )ormat )or ,urren,y 'eys @&ata
ty+e %8IEA or t-e )ormat )or units @&ata ty+e 810"A. "-e )iel& is only assi6ne& to t-e re)eren,e
)iel& at +ro6ram runtime.
SA A! "A#12 3$3
SAP AG 2002
B$sic 3b0ects o% the ABAP *iction$ry
&ses
&ses
T$be
T$be
%ie"
*$t$ ee'ent *$t$ ee'ent
*o'$in *o'$in
"-e basi, obDe,ts )or &e)inin6 &ata in t-e A7A Di,tionary are tables/ &ata elements an& &omains.
"-e &omain is use& )or t-e te,-ni,al &e)inition o) a table )iel& @)or e9am+le/ )iel& ty+e an& len6t-A
an& t-e &ata element is use& )or t-e semanti, &e)inition @)or e9am+le s-ort &es,ri+tionA.
A doman &es,ribes t-e value ran6e o) a )iel& by its &ata ty+e an& len6t-. "-e value ran6e ,an be
limite& by s+e,i)yin6 )i9e& values.
A data element &es,ribes t-e meanin6 o) a &omain in a ,ertain business ,onte9t. "-e &ata element
,ontains +rimarily t-e )iel& -el+ @=1 &o,umentationA an& t-e )iel& labels in t-e s,reen.
A )iel& is not an in&e+en&ent obDe,t/ but it is table$&e+en&ent. "-e )iel& ,an only be maintaine&
*it-in a table.
Eou ,an enter t-e &ata ty+e an& number o) +la,es &ire,tly )or a )iel&. 1o &ata element is reHuire& in
t-is ,ase. 0nstea&/ t-e &ata ty+e an& number o) +la,es is &e)ine& by s+e,i)yin6 a drect type.
"-e &ata ty+e attributes o) a &ata element ,an also be &e)ine& by s+e,i)yin6 a bult!n type/ *-ere
t-e &ata ty+e an& number o) +la,es is entere& &ire,tly.
SA A! "A#12 3$4
SAP AG 2002
T(o.6e!e *o'$in Concept- 5)$'pe
T$be SP/67
4A#*T
*$t$ ee'ent S@/:34A7:P *$t$ ee'ent S@/:34A7:P *$t$ ee'ent S@T3A7:P *$t$ ee'ent S@T3A7:P
*o'$in S@A7:P7* *o'$in S@A7:P7*
CA::7*
...
A7:P/:34 C3##7*
...
A7:PT3
"-e )li6-t s,-e&ule is store& in table S=50. "able )iel&s A0R=R2M @&e+arture air+ortA an&
A0R"2 @arrival air+ortA -ave t-e same &omain SJA0R0D. 7ot- )iel&s use t-e same &omain
be,ause bot- )iel&s ,ontain air+ort 0Ds an& t-ere)ore -ave t-e same te,-ni,al attributes. "-ey -ave a
&i))erent semanti, meanin6/ -o*ever/ an& use &i))erent &ata elements to &o,ument t-is. =iel&
A0R=R2M uses &ata element SJ=R2MA0R an& )iel& A0R"2 uses &ata element SJ"2A0R.
SA A! "A#12 3$5
SAP AG 2002
Tr$nsp$rent T$bes $n" Str&ct&res
T$be
/ie" 1 /ie" 2/ie" 3 /ie" <
Str&ct&re
/ie" 1/ie" 2 /ie" 3 /ie" <
ABAP *iction$ry
Physic$ "e%inition o% the t$be
T$be
/ie" 1 /ie" 2 /ie" 3 /ie" <
*$t$b$se
A trans+arent table is automati,ally ,reate& on t-e &atabase *-en it is a,tivate& in t-e A7A
Di,tionary. At t-is time/ t-e &atabase$in&e+en&ent &es,ri+tion o) t-e table in t-e A7A Di,tionary is
translate& into t-e lan6ua6e o) t-e &atabase system use&.
"-e &atabase table -as t-e same name as t-e table in t-e A7A Di,tionary. "-e )iel&s also -ave t-e
same name in bot- t-e &atabase an& t-e A7A Di,tionary. "-e &ata ty+es in t-e A7A Di,tionary
are ,onverte& to t-e ,orres+on&in6 &ata ty+es o) t-e &atabase system.
"-e or&er o) t-e )iel&s in t-e A7A Di,tionary ,an &i))er )rom t-e or&er o) t-e )iel&s on t-e
&atabase. "-is +ermits you to insert ne* )iel&s *it-out -avin6 to ,onvert t-e table. #-en you a&& a
ne* )iel&/ a&Dust t-e or&er o) t-e )iel&s by ,-an6in6 t-e &atabase ,atalo6 @A5"3R "A753A. "-e ne*
)iel& is a&&e& to t-e &atabase table.
A7A +ro6rams ,an a,,ess a trans+arent table in t*o *ays. 2ne *ay is to a,,ess t-e &ata ,ontaine&
in t-e table *it- 231 SQ5 @or 343% SQ5A. #it- t-e ot-er met-o&/ t-e table &e)ines a stru,ture&
ty+e t-at is a,,esse& *-en variables @or more ,om+le9 ty+esA are &e)ine&.
Eou ,an also ,reate a stru,ture& ty+e in t-e A7A Di,tionary )or *-i,- t-ere is no ,orres+on&in6
obDe,t in t-e &atabase. Su,- ty+es are ,alle& structures. Stru,tures ,an also be use& to &e)ine t-e
ty+es o) variables.
SA A! "A#12 3$6
SAP AG $%%%
7nc&"e Str&ct&res
T$be 2 T$be 1
/ie" 1 /ie" 2 /ie" A /ie" B /ie" < /ie" 3 /ie" A /ie" B
/ie" A /ie" B
*$t$b$se
/ie" 1 /ie" 2 /ie" A /ie" B /ie" A /ie" B /ie" 3 /ie" <
7nc&"e str&ct&re
Stru,tures ,an be in,lu&e& in tables or ot-er stru,tures to avoi& re&un&ant stru,ture &e)initions.
A table may only be in,lu&e& as an entire table.
A ,-ain o) in,lu&es may only ,ontain one &atabase table. "-e table in *-i,- you are in,lu&in6
belon6s to t-e in,lu&e ,-ain. "-is means t-at you may not in,lu&e a trans+arent table in a trans+arent
table.
0n,lu&es may ,ontain )urt-er in,lu&es.
=orei6n 'ey &e)initions are 6enerally im+arte& )rom t-e in,lu&e to t-e in,lu&in6 table. "-e attributes
o) t-e )orei6n 'ey &e)inition are +asse& )rom t-e in,lu&e to t-e in,lu&in6 table so t-at t-e )orei6n 'ey
&e+en&s on t-e &e)inition in t-e in,lu&e.
SA A! "A#12 3$B
SAP AG $%%%
Technic$ Settings
B&%%ering
T$be b&%%er
:/3
3n w(ic( p(ysical
area of t(e data)ase
s(ould t(e ta)le
)e stored4
6ogging
S(ould t(e records
of t(e ta)le )e
)uffered4
S(ould c(an'es to
t(e data records )e
lo''ed4
+ow many records
will t(e ta)le
pro)a)ly contain4
SiAe c$tegory
*$t$ c$ss
Eou must maintain t-e te,-ni,al settin6s *-en you &e)ine a trans+arent table in t-e A7A
Di,tionary.
"-e te,-ni,al settin6s are use& to in&ivi&ually o+timi<e t-e stora6e reHuirements an& a,,essin6
be-avior o) &atabase tables.
"-e te,-ni,al settin6s ,an be use& to &e)ine -o* t-e table s-oul& be -an&le& *-en it is ,reate& on t-e
&atabase/ *-et-er t-e table s-oul& be bu))ere& an& *-et-er ,-an6es to entries s-oul& be lo66e&.
"-e table is automati,ally ,reate& on t-e &atabase *-en it is a,tivate& in t-e A7A Di,tionary. "-e
stora6e area to be sele,te& @tables+a,eA an& s+a,e allo,ation settin6s are &etermine& )rom t-e settin6s
)or t-e &ata ,lass an& si<e ,ate6ory.
"-e settin6s )or bu))erin6 &e)ine *-et-er an& -o* t-e table s-oul& be bu))ere&.
Eou ,an &e)ine *-et-er ,-an6es to t-e table entries s-oul& be lo66e&.
SA A! "A#12 3$C
SAP AG 2002
*$t$ C$ss
T$bes in the ABAP *iction$ry
T$besp$ce
3rg. "$t$
T$besp$ce
4$ster "$t$
T$besp$ce
Tr$ns. "$t$
T$besp$ce
Syste' "$t$
*$t$b$se
3rg$niA$tion$ "$t$ Tr$ns$ction "$t$ Syste' "$t$ 4$ster "$t$
T$be 1
T$be 3
T$be <
T$be 2
T$be B
T$be 1
T$be C
T$be D
T$be E
T$be 1
T$be 3
T$be <
T$be 2
T$be B
T$be 1
T$be C
T$be D
T$be E
"-e &ata ,lass lo6i,ally &e)ines t-e +-ysi,al area o) t-e &atabase @)or 2RA%53 t-e tables+a,eA in
*-i,- your table s-oul& be store&. 0) you ,-oose t-e &ata ,lass ,orre,tly/ t-e table *ill automati,ally
be ,reate& in t-e a++ro+riate area on t-e &atabase *-en it is a,tivate& in t-e A7A Di,tionary.
"-e most im+ortant &ata ,lasses are master data/ transacton data/ or"an#atonal data an&
system data.
Master &ata is &ata t-at is rarely mo&i)ie&. An e9am+le o) master &ata is t-e &ata o) an a&&ress )ile/
)or e9am+le/ t-e name/ a&&ress an& tele+-one number.
"ransa,tion &ata is &ata t-at is )reHuently mo&i)ie&. An e9am+le is t-e material sto,' o) a *are-ouse/
*-i,- ,an ,-an6e a)ter ea,- +ur,-ase or&er.
2r6ani<ational &ata is &ata t-at is &e)ine& &urin6 ,ustomi<in6 *-en t-e system is installe& an& t-at is
rarely mo&i)ie& t-erea)ter. "-e ,ountry 'eys are an e9am+le.
System &ata is &ata t-at t-e R/3 System itsel) nee&s. "-e +ro6ram sour,es are an e9am+le.
=urt-er &ata ,lasses/ ,alle& ,ustomer &ata ,lasses @8S3R/ 8S3R1A/ are +rovi&e& )or ,ustomers.
"-ese s-oul& be use& )or ,ustomer &evelo+ments. S+e,ial stora6e areas must be allo,ate& in t-e
&atabase.
SA A! "A#12 3$;
SAP AG 2002
SiAe C$tegory
7niti$
5)tent
/irst
5)tent
Secon"
5)tent
Technic$ Settings
Si2e cate'ory
5ABA
5ABB
5ABC
1
3
<
TABA TABA
TABB TABB
TABC TABC
*$t$b$se
"-e si<e ,ate6ory &es,ribes t-e e9+e,te& stora6e reHuirements )or t-e table on t-e &atabase.
An initial e9tent is reserve& *-en a table is ,reate& on t-e &atabase. "-e si<e o) t-e initial e9tent is
i&enti,al )or all si<e ,ate6ories. 0) t-e table nee&s more s+a,e )or &ata at a later time/ e9tents are
a&&e&. "-ese a&&itional e9tents -ave a )i9e& si<e t-at is &etermine& by t-e si<e ,ate6ory s+e,i)ie& in
t-e A7A Di,tionary.
Eou ,an ,-oose a si<e ,ate6ory )rom 0 to 4. A )i9e& e9tent si<e/ *-i,- &e+en&s on t-e &atabase
system use&/ is assi6ne& to ea,- ,ate6ory.
%orre,tly assi6nin6 a si<e ,ate6ory ensures t-at you &o not ,reate a lar6e number o) small e9tents. 0t
also +revents stora6e s+a,e )rom bein6 *aste& *-en ,reatin6 e9tents t-at are too lar6e.
SA A! "A#12 3$10
SAP AG 2002
6ogging
Appic$tion
tr$ns$ction
Ch$nge
$ recor"
Syste' pro%ies
rec/cient FA66
...
...
TAB
/ie" 2 /ie" 3 /ie" 1
TAB 6og t$be
/ie" 1 /ie" 2 /ie" 3
*$t$b$se
ABAP *iction$ry
6og TAB 6og TAB
Eou ,an use lo66in6 to re,or& an& store mo&i)i,ations to t-e entries o) a table.
"o a,tivate lo66in6/ t-e ,orres+on&in6 )iel& must be sele,te& in t-e te,-ni,al settin6s. 5o66in6/
-o*ever/ only ta'es +la,e i) t-e R/3 System *as starte& *it- a +ro)ile ,ontainin6 +arameter
rec/client. 2nly sele,tin6 t-e )la6 in t-e A7A Di,tionary is not su))i,ient to tri66er lo66in6.
arameter rec/client ,an -ave t-e )ollo*in6 settin6s(
rec/client K A55 All ,lients s-oul& be lo66e&.
rec/client K 000L...M 2nly t-e s+e,i)ie& ,lients s-oul& be lo66e&.
rec/client K 2== 5o66in6 is not enable& on t-is system.
"-e &ata mo&i)i,ations are lo66e& in&e+en&ently o) t-e u+&ate. Eou ,an &is+lay t-e lo6s *it- t-e
"ransa,tion Table History @S%83A.
$o""n" creates a bottlenec% n t&e system:
A&&itional *rite a,,ess )or ea,- mo&i)i,ation to tables bein6 lo66e&.
"-is ,an result in lo,' situations alt-ou6- t-e users are a,,essin6 &i))erent a++li,ation tablesN
SA A! "A#12 3$11
SAP AG 2002
2nit S&''$ry
A the b&siness.oriente" "$t$ is $"'inistere" in the %or'
o% t$bes (hose "e%inition is store" in the ABAP
*iction$ry.
A t(o.e!e "o'$in concept is &se" %or "e%ining the
t$bes. The se'$ntic "e%inition is i'pe'ente" (ith "$t$
ee'ents $n" the technic$ "e%inition (ith "o'$ins.
The %ie"s o% inc&"e str&ct&res c$n be inc&"e" in t$bes.
The technic$ settings o% $ t$be "e%ine ho( the t$be
sho&" be store" in the "$t$b$se (t$besp$ce; e)tent siAe)
$n" (hether ch$nges to the "$t$ recor"s sho&" be
ogge".
SA A! "A#12 3$12
Exercse Data
39+lanation o) t-e Symbols in t-e 39er,ises an& Solutions
Exercses
Solutons
%ourse 2bDe,tives
7usiness S,enario
"i+s O "ri,'s
#arnin6 or %aution
Data in t-e 39er,ises
"y+e o) &ata Data in t-e trainin6 system
Data mo&el 7%J"RA:35 yes
All obDe,ts in &evelo+ment ,lass
7%JDA"AM2D35
yes
All obDe,ts in &evelo+ment ,lass 7%430 yes
'&en creatn" ()(* Dctonary ob+ects n t&s course, you s&ould ad&ere to t&e
-ollo.n" con/entons:
Eour obDe,t names )or tables/ &ata elements an& &omains s-oul& be6in *it- P an& en& *it-
your t*o$&i6it 6rou+ number @99A.
8se bot- your o*n &ata elements or &omains @PQ2bDe,tnameR99A an& stan&ar& SA
obDe,ts )or t-e table )iel&s.
All obDe,ts s-oul& be ,reate& as lo,al obDe,ts @&evelo+ment ,lass 0tmpA.
T&e appendx contans n-ormaton about t&e -l"&t data model used n t&e trann"
courses.
SA A! "A#12 3$13
Tables n t&e ()(* Dctonary Exercses
1nt: Tables n t&e ()(* Dctonary
At t-e ,on,lusion o) t-ese e9er,ises/ you *ill be able to(
%reate tables an& use t-e t*o$level &omain ,on,e+t
De)ine t-e te,-ni,al settin6s sensibly
Do,ument )iel&s
%reate an& use in,lu&e stru,tures
0n t-ese e9er,ises/ t-e tables o) t-e )li6-t mo&el *ill be en-an,e& *it-
em+loyee mana6ement. "-is em+loyee mana6ement enables t-e airlines
to enter an& evaluate &ata about t-eir em+loyees @)or e9am+le name/
+ersonnel number/ salary/ &e+artment/ et,.A an& about assi6nments *it-in
t-e or6ani<ation @airline &e+artmentsA.
0n t-is e9er,ise/ t*o tables *ill be ,reate& )or t-e em+loyee &ata an& t-e
airline &e+artments.
"-ese tables *ill be en-an,e& ste+$by$ste+ in t-e )ollo*in6 e9er,ises.
1$1 %reate t*o trans+arent tables P3M52ESS an& PD3M31"SS an& &e)ine t-eir
'ey )iel&s. De)ine t-e te,-ni,al settin6s *-en you a,tivate t-e tables.
1ote t-e )ollo*in6(
Data is maintaine& )or t-ree airlines. An airline -as 20/000 em+loyees an& bet*een
10 an& 30 &e+artments. Do not bu))er or lo6 t-e &ata. 7u))erin6 *ill be &is,usse& in
t-e e9er,ises )or t-e ne9t unit.
SA A! "A#12 3$14
2$1$1 %reate table P3M52ESS. "-e &ata )or t-e em+loyees is maintaine& -ere.
"-e names an& a&&resses o) t-e em+loyees an& t-eir salaries are store& -ere.
Table 2E3*$4566
Field name Data element Domain Type, Length
Client S73(8DT 3(8DT
Carrier S79(::7;D S79(::7;D
Personnel number o.n o.n 8139, <0
First name S7=8(3E S7=8(3E
Last name S7$8(3E S7$8(3E
Department code o.n o.n 9>(:, 4
Area o.n o.n 9>(:, <
Salary o.n o.n 91::, <0
2 decmal
places
Currency S791::94DE S791::
2$1$2 %reate table PD3M31"SS. "-is table ,ontains t-e &e+artments o) t-e
airline. 3a,- &e+artment ,an be rea,-e& *it- a tele+-one an& )a9 number.
Table 2DE*3E8T66
Field name Data element Domain Type, Length
Client S73(8DT 3(8DT
Carrier S79(::7;D S79(::7;D
Department code o.n o.n 9>(:, 4
Telephone o.n S7*>48E 9>(:, 30
Fax o.n S7*>48E 9>(:, 30
2$2 Do,ument )iel&s ersonnel number an& De+artment ,o&e.
2$3 %-an6es to tables P3M52ESS an& PD3M31"SS are ,riti,al an& t-ere)ore must
be re,or&e&. "-e maintenan,e transa,tion must note *-o last ,-an6e& a table entry.
"-is ,an be &one by a++en&in6 )iel&s )or t-e +ersonnel number o) t-e last +erson to
,-an6e t-e entry an& t-e &ate o) t-e last entry to tables P3M52ESS an&
PD3M31"SS. Ma'e sure t-at t-e same )iel&s are available in bot- tables )or
re,or&in6 t-e ,-an6es by a&&in6 t-ese )iel&s to bot- tables *it- a substru,ture
P%>A1!3SS. %reate a ne* &ata element )or )iel& Lastchanedby/ but use an
e9istin6 &omain. 8se SJ%>DA"3 as &ata element )or t-e &ate o) t-e last ,-an6e.
#-at a,tions are e9e,ute& on a,tivation in t-e &atabaseT
8ote: 0n a real a++li,ation/ t-e above en-an,ement *oul& al*ays ,ause t-e
stan&ar& table maintenan,e )or t-e t*o tables to be &ea,tivate&. Eour o*n
maintenan,e transa,tions *oul& instea& be ,reate& )or t-e table in *-i,- t-e )iel&s
SA A! "A#12 3$15
)or ,-an6e lo66in6 *oul& be )ille& internally by t-e +ro6ram an& not &ire,tly by t-e
user.
%reation o) su,- transa,tions 6oes beyon& t-e s,o+e o) t-is ,ourse. 0n t-is ,ourse/
you *ill t-ere)ore assume t-at all users t-emselves @,orre,tlyA )ill t-ese )iel&s in
t-e stan&ar& table maintenan,e routine.
Start ro6ram 7%430J%>3%I in "ransa,tion S33C. "-is +ro6ram
,-e,'s *-et-er your solutions are ,orre,t an& )ills t-e ne* tables
P3M52ESS an& PD3M31"SS *it- sam+le &ata nee&e& )or later
e9er,ises.
SA A! "A#12 3$16
Tables n t&e ()(* Dctonary Solutons
1nt: Tables n t&e ()(* Dctonary
1$1 "-e +at-
Tools ABAP Workbench Development Dictionary or "ransa,tion S311
ta'es you to t-e overvie* s,reen o) t-e A7A Di,tionary.
1$1$1 "o ,reate table P3M52ESS(
1A Mar' Database table an& enter table name P3M52ESS in t-e
,orres+on&in6 in+ut )iel&.
2A %-oose Create.
3A 3nter a s-ort te9t in t-e maintenan,e s,reen )or t-e table.
4A %-oose &elivery ,lass A an& mar' Table maintenance allo!ed.
5A 1o* ,-oose tab +a6e Fields to 6o to t-e maintenan,e s,reen )or t-e )iel&
&e)initions. 3nter t-e )iel& names @t-ey nee& not lie in t-e ,ustomer
names+a,eA.
6A 8se t-e 6iven &ata elements )or )iel&s Client" Carrier" First name" Last
name/ an& Currency by enterin6 t-e names o) t-e &ata elements in
,olumn Field type. Save your entries.
BA %reate your o*n &ata elements )or )iel&s Personnel number" Department
code" Area" an& Salary. 3nter a name @PQobDe,tRSSA )or t-e &ata element
in ,olumn Field type. Sele,t t-e name o) t-e &ata element. "-e &ata
element &e)inition a++ears.
CA 3nter a s-ort te9t @,om+onent o) t-e =1 -el+A. 1o* ,-oose tab +a6e
Field label an& store t-e te9ts )or t-e )iel& labels t-ere.
;A Eou also -ave to assi6n t-e &ata element a te,-ni,al &es,ri+tion
@&omainA. Sele,t tab +a6e Definition an& enter a name @PQobDe,tRSSA )or
your &omain t-ere. 0) t-e &omain is +re&e)ine&/ a,tivate t-e &ata element
an& return @usin6 =3 or A to t-e maintenan,e s,reen )or t-e table
)iel&s. 2t-er*ise sele,t t-e &omain name. "-e &omain &e)inition
a++ears.
10A De)ine t-e s-ort &es,ri+tion/ &ata ty+e @)or e9am+le 18M%A/ an&
number o) ,-ara,ters @)or e9am+le/10A t-ere. A,tivate t-e &omain.
11A !o ba,' one s,reen @usin6 =3 or A to t-e &ata element &e)inition an&
a,tivate your &ata element.
12A 1avi6ate ba,' one more s,reen to t-e )iel& &e)inition. Start a6ain *it- B
until all t-e table )iel&s are &e)ine&. Save your table.
13A De)ine t-e reference table an& reference field )or t-e salary )iel&. Sele,t
on t-e )iel& name an& enter t-e )ollo*in6 in t-e ne9t &ialo6 bo9(
SA A! "A#12 3$1B
#eference table$ 2E3*$4566
#eference field$ 9urrency
14A De)ine t-e 'ey )iel&s )or table P3M52ESS. =iel&s Client, Carrier, an&
Personnel number uniHuely i&enti)y an entry. "-ey must/ t-ere)ore/ be
mar'e& as 'ey )iel&s. Eou ,an &o t-is by mar'in6 t-e %ey ,olumn
)ollo*in6 t-e )iel& name. "-e 'ey )iel&s must be at t-e be6innin6 o) t-e
)iel& list in t-is or&er.
15A A,tivate t-e table. "-e maintenan,e s,reen )or t-e te,-ni,al settin6s
a++ears automati,ally(
Sin,e t-e ,ontents o) table P3M52ESS &o not ,-an6e )reHuently/ you
must ,-oose &ata ,lass A50 @master &ataA. "-e e9+e,te& number o)
re,or&s in table P3M52ESS is 60/000/ so you must ,-oose si<e
,ate6ory 2. "-e table s-oul& not be eit-er bu))ere& or lo66e&.
!"PL#$SS
Data class (**$0 ?master data@
Si&e cateory %
'ufferin 8ot allo.ed
Loin 8o lo""n"
Save t-e te,-ni,al settin6s. !o ba,' to t-e maintenan,e s,reen o) t-e
table @=3 or A. "-e table is a,tivate&.
SA A! "A#12 3$1C
1$1$2 "o ,reate table PD3M31"SS(
1A to 12A see Solution 1$1$1
13A De)ine t-e 'ey )iel&s )or table PD3M31"SS. =iel&s Client, Carrier,
an& Department code uniHuely i&enti)y an entry. "-ey must t-ere)ore be
mar'e& as 'ey )iel&s. Eou ,an &o t-is by mar'in6 t-e %ey ,olumn
)ollo*in6 t-e )iel& name.
14A A,tivate your table an& &e)ine t-e te,-ni,al settin6s(
Sin,e t-e ,ontents o) table PD3M31"SS &o not ,-an6e )reHuently/
you must ,-oose &ata ,lass A50 @master &ataA. "-e e9+e,te& number
o) re,or&s in table PD3M31"SS is &e)ine& to be at most ;0 entries/ so
you must ,-oose si<e ,ate6ory 0. "-e table s-oul& not be eit-er bu))ere&
or lo66e&.
D!P"!&T''
Data class (**$0 ?master data@
Si&e cateory (
'ufferin 8ot allo.ed
Loin 8o lo""n"
1$2 "o &o,ument )iel&s ersonnel number an& De+artment ,o&e(
1A Sele,t to 6o to t-e &ata element in t-e &ata element &e)inition. S*it,- to %-an6e
mo&e *it- Display ()* Chane. Sele,t Documentation or ,-oose Goto
Documentation.
2A 3nter a te9t )or t-e )iel&s an& save your entries.
1$3 %reate stru,ture P%>A1!3SS as )ollo*s(
1A 0n t-e initial s,reen o) t-e A7A Di,tionary/ mar' Data type an& enter
29>(8AE66 in t-e ,orres+on&in6 )iel&. %-oose Create+
2A Mar' Structure in t-e ne9t &ialo6 bo9.
3A 3nter t-e )iel& names in ,olumn Component an& t-e ,orres+on&in6 &ata
elements in ,olumn Component type. %reate one )iel& )or t-e +ersonnel number
an& anot-er one )or t-e &ate o) ,-an6e. 8se &ata element SJ%>DA"3 )or t-e
se,on& )iel&. %reate your o*n &ata element )or t-e )irst )iel&/ as in 39er,ise 2$1.
8se t-e &omain you ,reate& )or t-e +ersonnel number in table P3M52ESS.
4A A,tivate stru,ture P%>A1!3SS.
1o* insert P%>A1!3SS as an in,lu&e in tables P3M52ESS an&
PD3M31"SS as )ollo*s(
1A !o to t-e maintenan,e s,reen )or table P3M52ESS.
2A %-oose ,e! ro!s an& +osition t-e ,ursor on t-e )irst ne* )iel&.
3A %-oose !dit )nclude )nsert+
-. 0n t-e ne9t &ialo6 bo9/ enter t-e name C*A&+!'' an& ,-oose Continue+
SA A! "A#12 3$1;
5A A,tivate t-e table.
6A Eou ,an &is+lay t-e a,tions t-at *ere +er)orme& in t-e &atabase *it- ,tilities
Activation log.
BA Start *it- ste+ 1A to insert substru,ture P%>A1!3SS in table PD3M31"SS.
SA A! "A#12 3$20
SAP AG $%%%
7n"e)es
Primary inde" and secondary inde"
Structure of an inde"
1ata access usin' an inde"
T$be b&%%ering
Ad6anta'es of )ufferin'
*ocal ta)le )uffers
Bufferin' types
Buffer sync(roni2ation
7(ic( ta)les s(ould )e )uffered4
Per%or'$nce "&ring T$be Access
SA A! "A#12 4$1
SAP AG 2002
Co&rse 3b0ecti!es
At the en" o% this &nit; yo& (i be $be to-
G&"ge (hen t$be $ccesses c$n be spee"e" &p
by &sing in"e)es
Cre$te in"e)es in the ABAP *iction$ry
5)p$in the "i%%erent b&%%ering types
G&"ge (hen it '$kes sense to b&%%er $ t$be $n"
(hich b&%%ering type yo& sho&" choose
B&%%er $ t$be &sing the technic$ settings
SA A! "A#12 4$2
SAP AG 2002
T$be SC32#T5:
7n"e) on
A7:P3:T
4A#*T CA::7*C32#T#24 A7:P3:T
001
001
001
001
001
001
001
001
001
001
001
001
001
001
*+
BA
#A
*+
BA
*+
AA
*+
BA
*+
*+
BA
*+
*+
00000001
0000000<
00000001
00000002
00000003
0000000D
00000001
00000003
00000001
00000001
0000000<
00000002
0000000B
0000000E
ACA
AC5
B5:
6C>
69:
B5:
*5#
/:A
6C>
6GW
69:
42C
:T4
9A4
A7:P3:T P
ACA
AC5
B5:
B5:
*5#
/:A
9A4
6C>
6C>
6GW
69:
69:
42C
:T4
1
2
3
B
D
E
1<
<
C
10
1
11
12
13
Bin$ry
se$rch
Str&ct&re o% $n 7n"e)
SELECT * FROM
SCOUNTER WHERE
AIRPORT = 'LHR'.
4A#*T
001
001
001
001
001
001
001
001
001
001
001
001
001
001
An in&e9 ,an be use& to s+ee& u+ t-e sele,tion o) &ata re,or&s )rom a table.
An in&e9 ,an be ,onsi&ere& to be a ,o+y o) a &atabase table re&u,e& to ,ertain )iel&s. "-e &ata is
store& in sorte& )orm in t-is ,o+y. "-is sortin6 +ermits )ast a,,ess to t-e re,or&s o) t-e table @)or
e9am+le usin6 a binary sear,-A. 1ot all o) t-e )iel&s o) t-e table are ,ontaine& in t-e in&e9. "-e in&e9
also ,ontains a +ointer )rom t-e in&e9 entry to t-e ,orres+on&in6 table entry to +ermit all t-e )iel&
,ontents to be rea&.
#-en ,reatin6 in&e9es/ +lease note(
An in&e9 ,an only be use& u+ to t-e last s+e,i)ie& )iel& in t-e sele,tionN "-e )iel&s t-at are
s+e,i)ie& in t-e #>3R3 ,lause )or a lar6e number o) sele,tions s-oul& be in t-e )irst +osition.
2nly t-ose )iel&s *-ose values si6ni)i,antly restri,t t-e amount o) &ata are meanin6)ul in an
in&e9.
#-en you ,-an6e a &ata re,or& o) a table/ you must a&Dust t-e in&e9 sortin6. "ables *-ose
,ontents are )reHuently ,-an6e& s-oul& not -ave too many in&e9es.
Ma'e sure t-at t-e in&e9es on a table are as &isDun,t as +ossible.
SA A! "A#12 4$3
SAP AG 2002
TAB
7n"e) A
/2 =
/1 /2 /3
10
A3 10 Te)t
Access (ith 7n"e)es
7n"e) 0
/1 =
3pti'iAer
SELECT * FROM TAB
WHERE F2 = `10.
Progr$'
"-e &atabase o+timi<er &e,i&es *-i,- in&e9 on t-e table s-oul& be use& by t-e &atabase to a,,ess
&ata re,or&s.
Eou must &istin6uis- bet*een t-e +rimary in&e9 an& se,on&ary in&e9es o) a table. "-e +rimary
in&e9 ,ontains t-e 'ey )iel&s o) t-e table. "-e prmary ndex is automati,ally ,reate& in t-e &atabase
*-en t-e table is a,tivate&. 0) a lar6e table is )reHuently a,,esse& su,- t-at it is not +ossible to a++ly
+rimary in&e9 sortin6/ you s-oul& ,reate secondary ndexes )or t-e table.
"-e in&e9es on a table -ave a t-ree$,-ara,ter in&e9 0D. 0 is reserve& )or t-e +rimary in&e9.
%ustomers ,an ,reate t-eir o*n in&e9es on SA tablesG t-eir 0Ds must be6in *it- E or P.
0) t-e in&e9 )iel&s -ave 'ey )un,tion/ )or e9am+le/ t-ey alrea&y uniHuely i&enti)y ea,- re,or& o) t-e
table/ an in&e9 ,an be ,alle& a uni/ue index. "-is ensures t-at t-ere are no &u+li,ate in&e9 )iel&s in
t-e &atabase.
#-en you &e)ine a se,on&ary in&e9 in t-e A7A Di,tionary/ you ,an s+e,i)y *-et-er it s-oul& be
,reate& on t-e &atabase *-en it is a,tivate&. Some in&e9es only result in a 6ain in +er)orman,e )or
,ertain &atabase systems. Eou ,an t-ere)ore s+e,i)y a list o) &atabase systems *-en you &e)ine an
in&e9. "-e in&e9 is t-en only ,reate& on t-e s+e,i)ie& &atabase systems *-en a,tivate&.
SA A! "A#12 4$4
SAP AG 2002
Communication system
*$t$b$se
*$t$ Access &sing the B&%%er
1ata)ase interface
SELECT * FROM SBOOK
WHERE ...
ABAP progr$'
893 ta)le )uffer
1ata)ase
processes
1ata)ase
)uffer
"able bu))erin6 in,reases t-e +er)orman,e *-en t-e re,or&s o) t-e table are rea&.
"-e re,or&s o) a bu))ere& table are rea& &ire,tly )rom t-e lo,al bu))er o) t-e a++li,ation server on
*-i,- t-e a,,essin6 transa,tion is runnin6 *-en t-e table is a,,esse&. "-is eliminates time$
,onsumin6 &atabase a,,esses. "-e a,,ess im+roves by a )a,tor o) 10 to 100. "-e in,rease in s+ee&
&e+en&s on t-e stru,ture o) t-e table an& on t-e e9a,t system ,on)i6uration. 7u))erin6/ t-ere)ore/ ,an
6reatly in,rease t-e system +er)orman,e.
0) t-e stora6e reHuirements in t-e bu))er in,rease &ue to )urt-er &ata/ t-e &ata t-at -as not been
a,,esse& )or t-e lon6est time is &is+la,e&. "-is &is+la,ement ta'es +la,e asyn,-ronously at ,ertain
times *-i,- are &e)ine& &ynami,ally base& on t-e bu))er a,,esses. Data is only &is+la,e& i) t-e )ree
s+a,e in t-e bu))er is less t-an a +re&e)ine& value or t-e Huality o) t-e a,,ess is not satis)a,tory at
t-is time.
3nterin6 U"A7 in t-e ,omman& )iel& resets t-e table bu))ers on t-e ,orres+on&in6 a++li,ation server.
2nly use t-is ,omman& i) t-ere are in,onsisten,ies in t-e bu))er. 0n lar6e systems/ it ,an ta'e several
-ours to )ill t-e bu))ers. "-e +er)orman,e is ,onsi&erably re&u,e& &urin6 t-is time.
SA A! "A#12 4$5
SAP AG 2002
T$be B&%%ering
Appic$tion ser!er 2 Appic$tion ser!er 1
5a)le )uffer 5a)le )uffer
Pro'ram Pro'ram
Progr$' re$"s "$t$ %ro' $
b&%%ere" t$be
:ecor"s $re o$"e"
into the b&%%er
*$t$b$se
5AB
"-e R/3 System mana6es an& syn,-roni<es t-e bu))ers on t-e in&ivi&ual a++li,ation servers. 0) an
a++li,ation +ro6ram a,,esses &ata o) a table/ t-e &atabase inter)a,es &etermines *-et-er t-is &ata lies
in t-e bu))er o) t-e a++li,ation server. 0) t-is is t-e ,ase/ t-e &ata is rea& &ire,tly )rom t-e bu))er. 0)
t-e &ata is not in t-e bu))er o) t-e a++li,ation server/ it is rea& &ire,tly )rom t-e &atabase an& loa&e&
into t-e bu))er. "-e bu))er ,an t-ere)ore satis)y t-e ne9t a,,ess to t-is &ata.
"-e bu))erin6 ty+e &etermines *-i,- re,or&s o) t-e table are loa&e& into t-e bu))er o) t-e a++li,ation
server *-en a re,or& o) t-e table is a,,esse&. "-ere are t-e )ollo*in6 bu))erin6 ty+es(
=ull bu--ern": #-en a re,or& o) t-e table is a,,esse&/ all t-e re,or&s o) t-e table are loa&e&
into t-e bu))er.
Aenerc bu--ern": #-en a re,or& o) t-e table is a,,esse&/ all t-e re,or&s *-ose le)t$Dusti)ie&
+art o) t-e 'ey is t-e same are loa&e& into t-e bu))er.
Sn"le!record bu--ern": 2nly t-e re,or& t-at *as a,,esse& is loa&e& into t-e bu))er.
SA A! "A#12 4$6
SAP AG 2002
Appic$tion ser!er
SELECT * FROM SCOUNTER WHERE
CARRID = 'LH' AND
COUNTNUM = '00000004'.
B&%%er contents
00000001
00000001
00000002
00000003
0000000<
00000001
00000002
00000003
0000000<
00000001
0000000B
0000000D
0000000E
00000001
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
AC5
B5:
6C>
69:
B5:
*5#
/:A
6C>
6GW
69:
42C
:T4
9A4
*$t$b$se t$be SC32#T5:
A7:P3:T 4A#*T CA::7* C32#T#24
00000001
00000001
00000002
00000003
0000000<
00000001
00000002
00000003
0000000<
00000001
0000000B
0000000D
0000000E
00000001
AA
BA
BA
BA
BA
69
69
69
69
69
69
69
69
2A
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
AC5
B5:
6C>
69:
B5:
*5#
/:A
6C>
6GW
69:
42C
:T4
9A4
/& B&%%ering
AA
BA
BA
BA
BA
69
69
69
69
69
69
69
69
2A
#it- )ull bu))erin6/ t-e table is eit-er ,om+letely or not at all in t-e bu))er. #-en a re,or& o) t-e
table is a,,esse&/ all t-e re,or&s o) t-e table are loa&e& into t-e bu))er.
#-en you &e,i&e *-et-er a table s-oul& be )ully bu))ere&/ you must ta'e t-e table si<e/ t-e number
o) rea& a,,esses an& t-e number o) *rite a,,esses into ,onsi&eration. "-e smaller t-e table is/ t-e
more )reHuently it is rea& an& t-e less )reHuently it is *ritten/ t-e better it is to )ully bu))er t-e table.
=ull bu))erin6 is also a&visable )or tables -avin6 )reHuent a,,esses to re,or&s t-at &o not e9ist. Sin,e
all t-e re,or&s o) t-e table resi&e in t-e bu))er/ it is alrea&y ,lear in t-e bu))er *-et-er or not a re,or&
e9ists.
"-e &ata re,or&s are store& in t-e bu))er sorte& by table 'ey. #-en you a,,ess t-e &ata *it-
S353%"/ only )iel&s u+ to t-e last s+e,i)ie& 'ey )iel& ,an be use& )or t-e a,,ess. "-e le)t$Dusti)ie&
+art o) t-e 'ey s-oul& t-ere)ore be as lar6e as +ossible )or su,- a,,esses. =or e9am+le/ i) t-e )irst 'ey
)iel& is not &e)ine&/ t-e entire table is s,anne& in t-e bu))er. 8n&er t-ese ,ir,umstan,es/ a &ire,t
a,,ess to t-e &atabase ,oul& be more e))i,ient i) t-ere is a suitable se,on&ary in&e9 t-ere.
SA A! "A#12 4$B
SAP AG 2002
Appic$tion ser!er
B&%%er contents
00000001
00000002
00000003
0000000<
00000001
0000000B
0000000D
0000000E
69
69
69
69
69
69
69
69
001
001
001
001
001
001
001
001
B5:
*5#
/:A
6C>
6GW
69:
42C
:T4
*$t$b$se t$be SC32#T5:
4A#*T CA::7* C32#T#24
00000001
00000001
00000002
00000003
0000000<
00000001
00000002
00000003
0000000<
00000001
0000000B
0000000D
0000000E
00000001
AA
BA
BA
BA
BA
69
69
69
69
69
69
69
69
2A
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
AC5
B5:
6C>
69:
B5:
*5#
/:A
6C>
6GW
69:
42C
:T4
9A4
A7:P3:T
SELECT * FROM SCOUNTER WHERE
CARRID = 'LH' AND
COUNTNUM = '00000004'.
Generic B&%%ering
Generic key
#it- 6eneri, bu))erin6/ all t-e re,or&s *-ose 6eneri, 'ey )iel&s a6ree *it- t-is re,or& are loa&e& into
t-e bu))er *-en one re,or& o) t-e table is a,,esse&. "-e "enerc %ey is a le)t$Dusti)ie& +art o) t-e
+rimary 'ey o) t-e table t-at must be &e)ine& *-en t-e bu))erin6 ty+e is sele,te&. "-e 6eneri, 'ey
s-oul& be sele,te& so t-at t-e 6eneri, areas are not too small/ *-i,- *oul& result in too many 6eneri,
areas. 0) t-ere are only a )e* re,or&s )or ea,- 6eneri, area/ )ull bu))erin6 is usually +re)erable )or t-e
table. 0) you ,-oose too lar6e a 6eneri, 'ey/ too mu,- &ata *ill be invali&ate& i) t-ere are ,-an6es to
table entries/ *-i,- *oul& -ave a ne6ative e))e,t on t-e +er)orman,e.
A table s-oul& be 6eneri,ally bu))ere& i) only ,ertain 6eneri, areas o) t-e table are usually nee&e& )or
+ro,essin6.
%lient$&e+en&ent/ )ully bu))ere& tables are automati,ally 6eneri,ally bu))ere&. "-e ,lient )iel& is t-e
6eneri, 'ey. 0t is assume& t-at not all o) t-e ,lients are bein6 +ro,esse& at t-e same time on one
a++li,ation server. 5an6ua6e$&e+en&ent tables are a )urt-er e9am+le o) 6eneri, bu))erin6. "-e
6eneri, 'ey in,lu&es all t-e 'ey )iel&s u+ to an& in,lu&in6 t-e lan6ua6e )iel&.
"-e 6eneri, areas are mana6e& in t-e bu))er as in&e+en&ent obDe,ts. "-e 6eneri, areas are mana6e&
analo6ously to )ully bu))ere& tables. Eou s-oul& t-ere)ore also rea& t-e in)ormation about )ull
bu))erin6.
SA A! "A#12 4$C
SAP AG 2002
B&%%er contents
0000000< 69 001 6C>
*$t$b$se t$be SC32#T5:
4A#*T CA::7* C32#T#24
00000001
00000001
00000002
00000003
0000000<
00000001
00000002
00000003
0000000<
00000001
0000000B
0000000D
0000000E
00000001
AA
BA
BA
BA
BA
69
69
69
69
69
69
69
69
2A
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
AC5
B5:
6C>
69:
B5:
*5#
/:A
6C>
6GW
69:
42C
:T4
9A4
A7:P3:T
Appic$tion ser!er
SELECT SINGLE * FROM SCOUNTER WHERE
CARRID = 'LH' AND
COUNTNUM = '00000004'.
Singe.:ecor" B&%%ering
2nly t-ose re,or&s t-at are a,tually a,,esse& are loa&e& into t-e bu))er. Sin6le$re,or& bu))erin6 saves
stora6e s+a,e in t-e bu))er ,om+are& to 6eneri, an& )ull bu))erin6. "-e over-ea& )or bu))er
a&ministration/ -o*ever/ is -i6-er t-an )or 6eneri, or )ull bu))erin6. %onsi&erably more &atabase
a,,esses are ne,essary to loa& t-e re,or&s t-an )or t-e ot-er bu))erin6 ty+es.
Sin6le$re,or& bu))erin6 is re,ommen&e& +arti,ularly )or lar6e tables in *-i,- only a )e* re,or&s are
a,,esse& re+eate&ly *it- S353%" S01!53. All t-e a,,esses to t-e table t-at &o not use S353%"
S01!53 by+ass t-e bu))er an& &ire,tly a,,ess t-e &atabase.
0) you a,,ess a re,or& t-at *as not yet bu))ere& usin6 S353%" S01!53/ t-ere is a &atabase a,,ess
to loa& t-e re,or&. 0) t-e table &oes not ,ontain a re,or& *it- t-e s+e,i)ie& 'ey/ t-is re,or& is re,or&e&
in t-e bu))er as non$e9istent. "-is +revents a )urt-er &atabase a,,ess i) you ma'e anot-er a,,ess *it-
t-e same 'ey.
Eou only nee& one &atabase a,,ess to loa& a table *it- )ull bu))erin6/ but you nee& several &atabase
a,,esses *it- sin6le$re,or& bu))erin6. =ull bu))erin6 is t-ere)ore 6enerally +re)erable )or small tables
t-at are )reHuently a,,esse&.
SA A! "A#12 4$;
SAP AG 2002
Ser6er 2
Buffer
5AB
SELECT * FROM TAB
WHERE FIELD = 'X'.
Ser6er $
Buffer
Sync(roni2ation ta)le
1
1
2
2
5AB
B&%%er SynchroniA$tion 1
Sin,e t-e bu))ers resi&e lo,ally on t-e a++li,ation servers/ t-ey must be syn,-roni<e& a)ter &ata -as
been mo&i)ie& in a bu))ere& table. Syn,-roni<ation ta'es +la,e at )i9e& time intervals t-at ,an be set
in t-e system +ro)ile. "-e ,orres+on&in6 +arameter is rdisp/bufreftime an& &e)ines t-e len6t- o) t-e
interval in se,on&s. "-e value must lie bet*een 60 an& 3600. A value bet*een 60 an& 240 is
re,ommen&e&.
"-e )ollo*in6 e9am+le s-o*s -o* t-e lo,al bu))ers o) t-e system are syn,-roni<e&. A system *it-
t*o a++li,ation servers is assume&.
Startn" stuaton: 1eit-er server -as yet a,,esse& re,or&s o) t-e table "A7 to be )ully bu))ere&.
"-e table t-ere)ore &oes not yet resi&e in t-e lo,al bu))ers o) t-e t*o servers.
Tmepont <: Server 1 rea&s re,or&s )rom table "A7 on t-e &atabase.
Tmepont 2: "able "A7 is )ully loa&e& into t-e lo,al bu))er o) server 1. A,,esses )rom server 1 to
t-e &ata o) table "A7 no* use t-e lo,al bu))er o) t-is server.
SA A! "A#12 4$10
SAP AG 2002
SELECT * FROM TAB
WHERE FIELD = ''.
Ser6er 2
Buffer
5AB
Ser6er $
Buffer
Sync(roni2ation ta)le
3
3
<
<
5AB 5AB
B&%%er SynchroniA$tion 2
Tmepont 3: Server 2 a,,esses re,or&s o) t-e table. Sin,e t-e table &oes not yet resi&e in t-e lo,al
bu))er o) server 2/ t-e re,or&s are rea& &ire,tly )rom t-e &atabase.
Tmepont 4: "able "A7 is loa&e& into t-e lo,al bu))er o) server 2. Server 2 t-ere)ore also uses its lo,al
bu))er to a,,ess &ata o) "A7 t-e ne9t time it rea&s.
SA A! "A#12 4$11
SAP AG 2002
Ser6er 2
Buffer
5AB
DELETE * FROM TAB
WHERE FIELD = 'X'.
Ser6er $
Buffer
Sync(roni2ation ta)le
5AB 5AB
5AB modified )y
Ser6er $
1
1
B
B
D
D
B&%%er SynchroniA$tion 3
Tmepont 5: Server 1 &eletes re,or&s )rom table "A7 an& u+&ates t-e &atabase.
Tmepont 6: Server 1 *rites an entry in t-e syn,-roni<ation table.
Tmepont 7: Server 1 u+&ates its lo,al bu))er.
SA A! "A#12 4$12
SAP AG 2002
5AB
Sync(roni2ation ta)le
5AB modified )y
Ser6er $
SELECT * FROM TAB
WHERE FIELD = 'X'.
Ser6er 2
Buffer
Ser6er $
Buffer
5AB 5AB
E
E
B&%%er SynchroniA$tion <
Tmepont 8: Server 2 a,,esses t-e &elete& &ata re,or&s. Sin,e table "A7 resi&es in its lo,al bu))er/ t-e
a,,ess uses t-is lo,al bu))er.
Server 2 t-ere)ore )in&s t-e re,or&s alt-ou6- t-ey no lon6er e9ist in t-e &atabase table.
0) t-e same a,,ess *ere ma&e )rom an a++li,ation +ro6ram to Server 1/ t-is +ro6ram *oul&
re,o6ni<e t-at t-e re,or&s no lon6er e9ist. At t-is time t-e be-avior o) an a++li,ation +ro6ram
&e+en&s on t-e server on *-i,- it is runnin6.
SA A! "A#12 4$13
SAP AG 2002
Ser6er 2
Buffer
5AB
Ser6er $
Buffer
Sync(roni2ation ta)le
5AB 5AB
5AB modified )y
Ser6er $
C
C
C
C
10
10
Sync(roni2ation
B&%%er SynchroniA$tion 1
Tmepont B: "-e moment o) syn,-roni<ation -as arrive&. 7ot- servers loo' in t-e syn,-roni<ation
table to see i) anot-er server -as mo&i)ie& one o) t-e tables in its lo,al bu))er in t-e meantime.
Tmepont <0: Server 2 )in&s t-at table "A7 -as been mo&i)ie& by Server 1 in t-e meantime. Server 2
t-ere)ore invali&ates t-e table in its lo,al bu))er. "-e ne9t a,,ess )rom Server 2 to &ata o) table "A7
t-ere)ore uses t-e &atabase. Server 1 &oes not -ave to invali&ate t-e table in its bu))er sin,e it itsel) is
t-e only one to mo&i)y table "A7. Server 1 t-ere)ore uses its lo,al bu))er a6ain t-e ne9t time to a,,ess
re,or&s o) table "A7.
SA A! "A#12 4$14
SAP AG 2002
5AB
Sync(roni2ation ta)le
SELECT * FROM TAB
WHERE FIELD = ''.
Ser6er 2
Buffer
Ser6er $
Buffer
5AB 5AB
11
11
12
12
B&%%er SynchroniA$tion B
Tmepont <<: Server 2 a6ain a,,esses re,or&s o) table "A7. Sin,e "A7 is invali&ate& in t-e lo,al
bu))er o) Server 2/ t-e a,,ess uses t-e &atabase.
Tmepont <2: "-e table is a6ain loa&e& into t-e lo,al bu))er o) Server 2. "-e in)ormation about table
"A7 is no* ,onsistent a6ain in bot- servers an& t-e &atabase.
A&vanta6es an& &isa&vanta6es o) t-is met-o& o) bu))er syn,-roni<ation(
A&vanta6e( "-e loa& on t-e net*or' is 'e+t to a minimum. 0) t-e bu))ers *ere to be
syn,-roni<e& imme&iately a)ter ea,- mo&i)i,ation/ ea,- server *oul& -ave to in)orm all ot-er
servers about ea,- mo&i)i,ation to a bu))ere& table via t-e net*or'. "-is *oul& -ave a ne6ative
e))e,t on t-e +er)orman,e.
Disa&vanta6e( "-e lo,al bu))ers o) t-e a++li,ation servers ,an ,ontain obsolete &ata bet*een t-e
moments o) syn,-roni<ation.
"-is means t-at(
2nly t-ose tables t-at are *ritten very in)reHuently @rea& mostlyA or )or *-i,- su,- tem+orary
in,onsisten,ies are o) no im+ortan,e may be bu))ere&.
"ables *-ose entries ,-an6e )reHuently s-oul& not be bu))ere&. 2t-er*ise t-ere *oul& be a
,onstant invali&ation an& reloa&/ *-i,- *oul& -ave a ne6ative e))e,t on t-e +er)orman,e.
SA A! "A#12 4$15
SAP AG 2002
2nit S&''$ry
An in"e) heps yo& to spee" &p re$" $ccesses to $
t$be. An in"e) c$n be consi"ere" $ sorte" copy o% the
t$be th$t is re"&ce" to the in"e) %ie"s.
The t$be b&%%ers resi"e oc$y on the $ppic$tion
ser!ers.
B&%%ering c$n s&bst$nti$y incre$se the per%or'$nce
(hen the recor"s o% the t$be $re $ccesse". Choosing
the correct b&%%ering type is i'port$nt.
The t$be b&%%ers $re $"0&ste" to ch$nges to the t$be
entries $t %i)e" inter!$s.
The 'ore %re,&enty $ t$be is re$" $n" the ess
%re,&enty the t$be contents $re ch$nge"; the better it is
to b&%%er the t$be.
SA A! "A#12 4$16
*e-ormance Durn" Table (ccess Exercses
1nt: *er-ormance Durn" Table (ccess
At t-e ,on,lusion o) t-ese e9er,ises/ you *ill be able to(
%reate in&e9es
Maintain t-e bu))erin6 attributes o) a table
0n t-eir &aily *or'/ airline em+loyees nee& )ast a,,ess to t-e &ata in t-e
em+loyee a&ministration tables. 0n t-is e9er,ise/ a,,ess to t-e &ata in
t-ese tables s-oul& be s+ee&e& u+.
1$1 "-e ,ombination o) )irst an& last names is o)ten use& to a,,ess t-e +ersonnel &ata o)
an em+loyee. "-e last name is more o)ten 'no*n @t-at is/ s+e,i)ie& in t-e a,,essA
t-an t-e )irst name.
%reate an in&e9 t-at su++orts t-is a,,ess. Ma'e sure t-at t-e in&e9 is ,reate& in t-e
&atabase.
1$2 "o set u+ a )li6-t ,re*/ you -ave to assi6n em+loyees @+ilots an& ste*ar&sA to
)li6-ts. %reate a table in *-i,- t-e em+loyees involve& an& t-eir )un,tions ,an be
entere& )or ea,- )li6-t.
A table *it- t-e ,orres+on&in6 stru,ture alrea&y e9ists in t-e system. %o+y t-is
table S=5%R3# to table P=5%R3#SS. Re+la,e t-e e9istin6 &ata element )or t-e
em+loyee number *it- your o*n &ata element.
Do not )or6et to a,tivate table P=5%R3#SS.
1$3 Re,onsi&er t-e settin6s you ma&e )or bu))erin6 tables PD3M31"SS an&
P=5%R3#SS. Iee+ t-e )ollo*in6 in)ormation )or usin6 t-ese tables in min&(
"-e ,arriers -ave bet*een 10 an& 30 &e+artments. 2nly a )e* ,arriers @ma9imum
3A are a&ministere& in t-e tables. "-e &ata about t-e ,re*s o) ,om+lete& )li6-ts are
rolle& out to an ar,-ive )ile every t-ree mont-s. "able P=5%R3#SS t-ere)ore -as
relatively )e* entries @at most 5/000 +er ,arrierA.
"ables PD3M31"SS an& P=5%R3#SS are a,,esse& very )reHuently. Data
re,or&s are rea& re+eate&ly )rom t-ese tables.
A&ministrative em+loyees o) only one airline *or' on one a++li,ation server. "-e
&ata about t-e )li6-t ,re* is only o) interest *it-in t-e airline. Sin,e t-e airlines
SA A! "A#12 4$1B
s-are some servi,es/ a&ministrative em+loyees o) an airline/ o)ten -ave to a,,ess
&e+artmental &ata o) ot-er airlines.
Start ro6ram 7%430J%>3%I in "ransa,tion S33C. "-is +ro6ram
,-e,'s *-et-er your solutions are ,orre,t an& )ills t-e ne* table
P=5%R3#SS *it- sam+le &ata nee&e& )or later e9er,ises.
0) you &o t-e su++lementary e9er,ise/ only start t-is +ro6ram a)ter
,om+letin6 t-e su++lementary e9er,ise.
1$4 Supplementary Exercse: 8sin6 an in&e9 on t-e areas mi6-t result in a 6ain in
+er)orman,e *-en a,,essin6 t-e em+loyee &ata/ )or e9am+le/ i) all +ilots are
)reHuently sele,te&.
0n +er)orman,e measurements on &i))erent &atabase systems it *as )oun& t-ere is
only a 6ain in +er)orman,e )or t-e ADA7AS an& SQ5 Server &atabase systems.
%reate an in&e9 an& ma'e sure t-at it is only ,reate& on t-e ADA7AS an& SQ5
Server &atabase systems.
SA A! "A#12 4$1C
*er-ormance Durn" Table (ccess Solutons
1nt: *er-ormance Durn" Table (ccess
1$1 "-e +ersonnel &ata o) t-e em+loyees is mana6e& in "able P3M52ESS. %reate an
in&e9 )or t-is table. 0t -as to ,ontain )iel&s Client/ Lastname an& Firstname. Sin,e
t-e last name is usually s+e,i)ie& an& is mu,- more sele,tive t-an t-e )irst name/
t-e last name must be in its in&e9. "-e or&er o) t-e )iel&s is t-en Client/ Lastname"
an& t-en Firstname.
"o ,reate t-e in&e9(
1A 0n &is+lay mo&e/ 6o to t-e maintenan,e s,reen o) table P3M52ESS an&
,-oose 0ndexes.
2A 0n t-e ne9t &ialo6 bo9/ ,on)irm t-at you *ant to ,reate an in&e9.
3A 0n t-e )ollo*in6 &ialo6 bo9/ enter a t-ree$+la,e in&e9 0D an& ,-oose Continue.
4A "-e maintenan,e s,reen )or t-e in&e9 a++ears. 3nter a Short description.
5A %-oose Table fields. A list o) all t-e )iel&s in t-e table a++ears. Sele,t )iel&s
Client/ Lastname" an& Firstname an& ,-oose Copy.
6A "-e )iel&s are ,o+ie& )rom t-e &ialo6 bo9 to t-e in&e9 in t-at or&er. 0) )iel&
Firstname is be)ore )iel& Lastname/ you -ave to ,-an6e t-e or&er o) t-e )iel&s.
Do t-is by +la,in6 t-e ,ursor on t-e line *it- )iel& Firstname an& ,-oosin6 Cut.
1o* +la,e t-e ,ursor on t-e )irst )ree line a)ter )iel& Lastname an& ,-oose
Paste.
BA "-e in&e9 is ,ertainly not a uniHue in&e9 sin,e t-ere ,an be em+loyees *it- t-e
same )irst an& last names. "-ere is no reason to ,reate t-e in&e9 only in ,ertain
&atabase systems. Eou s-oul& t-ere)ore leave t-e stan&ar& settin6s ,on)uni/ue
index an& 0ndex in all database systems.
CA A,tivate t-e in&e9. "-e in&e9 is automati,ally ,reate& in t-e &atabase.
1$2 "o ,o+y table S=5%R3#(
1A 0n t-e initial s,reen o) t-e A7A Di,tionary/ enter S=5%R3# in )iel& Database
table. %-oose Copy.
2A 0n t-e ne9t &ialo6 bo9/ enter t-e name P=5%R3#SS in )iel& to table an& ,-oose
Continue.
3A 0n ,-an6e mo&e/ 6o to t-e table maintenan,e s,reen an& re+la,e &ata element
S3MJ18M *it- t-e &ata element you ,reate& )or t-e em+loyee number.
4A A,tivate t-e table.
SA A! "A#12 4$1;
1$3 Eou ,an maintain t-e bu))erin6 settin6s )or t-e s+e,i)ie& tables in t-eir te,-ni,al
settin6s. "o &o so/ 6o to t-e maintenan,e s,reen )or t-e table in &is+lay mo&e an&
,-oose Technical settins. "-e &esire& maintenan,e s,reen a++ears an& you ,an
s*it,- to ,-an6e mo&e -ere.
Sin,e t-e ,ontents o) table PD3M31"SS are rarely ,-an6e& but )reHuently rea&/ it
is a&visable to bu))er t-e table. %-oose 'ufferin s!itched on. Sin,e t-ere are no
restri,tions on t-e a,,ess an& t-e table is small/ you s-oul& sele,t )ull bu))erin6.
Sele,t Fully buffered.
A,tivate t-e te,-ni,al settin6s o) table PD3M31"SS.
"-e &ata o) table P=5%R3#SS are o)ten rea& re+eate&ly. A,,esses t-at ,-an6e t-e
,ontents are rare. Eou s-oul& t-ere)ore bu))er t-e table. Sele,t 'ufferin s!itched
on. 8sually only t-e &ata o) one airline is nee&e& on an a++li,ation server. Eou
s-oul& t-ere)ore bu))er t-e table 6eneri,ally *it- t-e 6eneri, 'ey Client an&
Carrier. Sele,t Generic bufferin an& ,-oose 2 as t-e number o) 6eneri, 'ey )iel&s.
A,tivate t-e te,-ni,al settin6s o) table P=5%R3#SS.
1$4 0) you &o as s+e,i)ie& in 3.1/ t-e system &is+lays t-e in&e9 you ,reate& in a &ialo6
bo9. 0n t-is &ialo6 bo9/ ,-oose Create. 0n,lu&e )iel&s Client" Carrier" an& Area in
t-e in&e9. "-is is not a uniHue in&e9 eit-er.
"o ,reate t-e in&e9 only in t-e A&abas an& SQ5 Server &atabase systems(
1A %-oose =or sele,te& &atabase systems.
2A "-en sele,t t-e arro* symbol in t-is line. Sele,t Sele,tion list. 8sin6 t-e =4
-el+/ sele,t t-e i&enti)iers )or t-e A&abas @ADAA an& SQ5 Server @MSSA
&atabase systems in t-e list.
3A %-oose %ontinue.
4A A,tivate t-e in&e9.
"-e in&e9 is only ,reate& in t-e &atabase i) your trainin6 system is runnin6 on one
o) t-e sele,te& &atabase systems.
SA A! "A#12 4$20
SAP AG 2002
/i)e" !$&es
8$&e t$be
Wh$t is $ %oreign keyH
/ie" $ssign'ent &sing the check %ie"
/oreign key t$be / check t$be
Se'$ntic $ttrib&tes o% the %oreign key
Te)t t$be
Consistency Thro&gh 7np&t Checks
SA A! "A#12 5$1
SAP AG 2002
Co&rse 3b0ecti!es
At the en" o% this &nit; yo& (i be $be to-
Cre$te $n" &se %i)e" !$&es
*e%ine (h$t $ %oreign key is
Appy the con"itions %or the %ie" $ssign'ent o% the
%oreign key
?no( the "i%%erence bet(een the !$&e t$be $n" the
check t$be
Cre$te /oreign ?ey
SA A! "A#12 5$2
SAP AG 2002
*o'$in
Short "escription
S@C6ASS
/ight c$ss
1ictionary: 1isplay domain S;C*ASS: &i"ed 6alues
/i)e" !$&e Short "escription
C
>
/
B&siness C$ss
5cono'y C$ss
/irst C$ss
6o(er i'it 2pper i'it Short "escription
/i)e" 8$&es
"-e &omain &es,ribes t-e value ran6e o) a )iel& by s+e,i)yin6 its &ata ty+e an& )iel& len6t-. 0) only a
limite& set o) values is allo*e&/ t-ey ,an be &e)ine& as )i9e& values.
S+e,i)yin6 )i9e& values ,auses t-e value ran6e o) t-e &omain to be restri,te& by t-ese values. =i9e&
values are imme&iately use& as ,-e,' values in s,reen entries. "-ere is also =4 -el+.
=i9e& values are only ,-e,'e& in s,reens. 1o ,-e,' is ma&e *-en &ata re,or&s are inserte& in a table
by an A7A +ro6ram.
=i9e& values ,an eit-er be liste& in&ivi&ually or &e)ine& as an interval.
SA A! "A#12 5$3
SAP AG 2002
8$&e T$be
*iction$ry- *isp$y "o'$in S@CA::@7*
*o'$in
Short "escription
S@CA::@7*
Short "escription o% the c$rrier
Format
Valid values
8$&e t$be SCA::
*$t$ type
#o. o% p$ces
C9A:
3
Ch$r$cter strings
4A#*T CA::7* CA::#A45 C2::C3*5
-0$ AA American Airlines #S1
-0$ BA Britis( Airways GBP
-0$ *+ *uft(ansa 1EM
-$0 #A #nited Airlines #S1
T$be SCA::
"-e value ran6e o) a )iel& ,an also be &e)ine& by s+e,i)yin6 a value table in t-e &omain.
0n ,ontrast to )i9e& values/ -o*ever/ sim+ly s+e,i)yin6 a value table &oes not ,ause t-e in+ut to be
,-e,'e&. "-ere is no =4 -el+ eit-er.
0) you enter a value table/ t-e system ,an use it to ma'e a +ro+osal )or t-e )orei6n 'ey &e)inition.
A value table only be,omes a ,-e,' table *-en a )orei6n 'ey is &e)ine&.
0) you re)er to a &omain *it- a value table in a )iel&/ but no )orei6n 'ey *as &e)ine& at )iel& level/
t-ere is no ,-e,'.
SA A! "A#12 5$4
SAP AG 2002
*$t$b$se t$be SC32#T5:
(s$es co&nter)
CA::7* (C$rrier)
C3##7* (Connection)
/6*AT5 (*$te o% %ight)
C32#T5: (Co&nter)
C2ST347* (C&sto'er)
C$n this %ight
be booke" $t
s$es co&nter E H
5ntries to %ie"s o% t$be SB33?
(%ight booking)-
4A#*T CA::7* C32#T#24
00000001
00000001
00000002
00000003
0000000<
00000001
00000002
00000003
0000000<
00000001
0000000B
0000000D
0000000E
00000001
AA
BA
BA
BA
BA
69
69
69
69
69
69
69
69
2A
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
AC5
B5:
6C>
69:
B5:
*5#
/:A
6C>
6GW
69:
42C
:T4
9A4
A7:P3:T
7nserting $ *$t$ :ecor"
AA AA
001D 001D
0000000E 0000000E
000001<E 000001<E
21.0D.2000 21.0D.2000
A ,ustomer *ants to boo' a )li6-t *it- Ameri,an Airlines @AAA. "-is )li6-t *it- )li6-t number 001B
is to be on ?uly 25/ 2000. "-e boo'in6 s-oul& be ma&e at ,ounter C.
"able S722I ,ontains all t-e )li6-t boo'in6s o) t-e ,arriers.
"able S%281"3R ,ontains all t-e vali& ,ounters o) t-e ,arriers.
0) an entry is ma&e in )iel& %281"3R o) table S722I/ you must ma'e sure t-at only vali&
,ounters ,an be entere&. "-is means t-at t-e ,ounters must be store& in table S%281"3R.
Cueston:
Are you allo*e& to insert t-e above &ata re,or& in table S722IT
SA A! "A#12 5$5
SAP AG $%%%
*$t$b$se t$be SC32#T5:
4A#*T CA::7* C32#T#24
00000001
00000001
00000002
00000003
0000000<
00000001
00000002
00000003
0000000<
00000001
0000000B
0000000D
0000000E
00000001
AA
BA
BA
BA
BA
69
69
69
69
69
69
69
69
2A
001
001
001
001
001
001
001
001
001
001
001
001
001
001
ACA
AC5
B5:
6C>
69:
B5:
*5#
/:A
6C>
6GW
69:
42C
:T4
9A4
A7:P3:T
CA::7* (C$rrier)
C3##7* (Connection)
/6*AT5 (*$te o% %ight)
C32#T5: (Co&nter)
C2ST347* (C&sto'er)
5ntries to %ie"s o% t$be SB33?-
7nsertion not $o(e"I 7nsertion not $o(e"I
8io$tion o% the /oreign ?ey Check
5%%ect o% the %oreign key "e%inition- 5%%ect o% the %oreign key "e%inition-
A "$t$ recor" (ith the contents- A "$t$ recor" (ith the contents-
4A#*T F J001J; CA::7* F JAAJ; 4A#*T F J001J; CA::7* F JAAJ;
C32#T#24 F J00000000CJ "oes not C32#T#24 F J00000000CJ "oes not
e)ist in t$be SC32#T5:. e)ist in t$be SC32#T5:.
AA AA
001D 001D
000001<E 000001<E
21.0D.2000 21.0D.2000
00000000E 00000000E
"-e )li6-t ,annot be boo'e& be,ause Ameri,an Airlines @AAA &oes not -ave a ,ounter C.
1o &ata re,or& is sele,te& in table S%281"3R )or t-e entries in t-e e9am+le. "-e entry )or table
S722I is reDe,te&.
0n t-e A7A Di,tionary/ su,- relations-i+s bet*een t*o tables are ,alle& -ore"n %eys an& t-ey
must be &e)ine& e9+li,itly )or t-e )iel&s.
=orei6n 'eys are use& to ensure t-at t-e &ata is ,onsistent. Data t-at -as been entere& is ,-e,'e&
a6ainst e9istin6 &ata to ensure t-at it is ,onsistent.
SA A! "A#12 5$6
SAP AG 2002
/oreign ?ey /ie"s / Check /ie"s
?ey %ie"s
MA/15 CA8831 C#/5/#M A38P85
&orei'n key ta)le SB33?
MA/15 CA8831 C//31 &*1A5E C#S5M31 CA/CE*E1
/oreign key %ie"s
C(eck field
!!! C#/5E8 !!!
C(eck ta)le SC32#T5:
ED(3*$E (
0n t-is e9am+le/ t-e -ore"n %ey table is table S722I. "-e +ur+ose o) t-e )orei6n 'ey is to ensure
t-at only vali& ,ounters o) ,arriers ,an be assi6ne& to a boo'in6. 9&ec% table S%281"3R ,ontains
e9a,tly t-is in)ormation. 3a,- ,ounter is i&enti)ie& *it- t-ree 'ey )iel&s in t-is table( MA1D"/
%ARR0D/ an& %281"18M.
0n or&er to &e)ine t-e )orei6n 'ey/ t-ese t-ree )iel&s are assi6ne& to t-e )iel&s o) t-e )orei6n 'ey table
@)orei6n 'ey )iel&sA *it- *-i,- t-e in+ut to be ,-e,'e& is entere& on t-e s,reen. 0n table S722I/
t-ese are t-e )iel&s( MA1D"/ %ARR0D/ %281"3R. "-e entry is a,,e+te& i) it re+resents a vali&
,ounterG ot-er*ise t-e system *ill reDe,t it.
"-e )orei6n 'ey is &e)ine& )or )iel& S722I$%281"3R @,-e,' )iel&A/ *-i,- means t-at t-e entry in
t-is )iel& is ,-e,'e&. =iel& %281"3R is t-ere)ore ,alle& t-e c&ec% -eld )or t-is )orei6n 'ey.
A )orei6n 'ey is &e)ine& )or )iel& %281"3R/ table S722I/ resultin6 in t-e )ollo*in6 )iel&
assi6nment(
9&ec% table =ore"n %ey table
S%281"3R$MA1D" S722I$MA1D"
S%281"3R$%ARR0D S722I$%ARR0D
S%281"3R$%281"18M S722I$%281"3R
SA A! "A#12 5$B
SAP AG 2002
*$t$ Consistency thro&gh /oreign ?eys
4A#*T CA::7* C3##7*
...
E00
E00
E00
E00
AA
AA
:o'e
:o'e
001D
00B<
0111
0DEE
4A#*T CA::7*
...
E00
E00
E00
E00
AA
AC
A/
:o'e
SCA::- Check t$be F re%. ob0. SP/67- /oreign key t$be F "ep. ob0.
SP&*3.CA8831 SP&*3.MA/15
C$rrier
/ight n&'ber
*et$i
'$int.
AB
0020
Check %ie"
/oreign key %ie"s
STOP STOP
A ,ombination o) )iel&s in a table is ,alle& a )orei6n 'ey i) t-is )iel& ,ombination is t-e +rimary 'ey
o) anot-er table.
A )orei6n 'ey lin's t*o tables.
"-e ,-e,' table is t-e table *-ose 'ey )iel&s are ,-e,'e&. "-is table is also ,alle& t-e referenced
table.
An entry is to be *ritten in t-e )orei6n 'ey table. "-is entry must be ,onsistent *it- t-e 'ey )iel&s o)
t-e ,-e,' table.
"-e )iel& o) t-e )orei6n 'ey table to be ,-e,'e& is ,alle& t-e chec1 field.
=orei6n 'eys ,an only be use& in s,reens. Data re,or&s ,an be *ritten to t-e table *it-out bein6
,-e,'e& usin6 an A7A +ro6ram.
Example: A ne* entry is to be *ritten in table S=50 @)li6-t s,-e&uleA. "-ere is a ,-e,' *-et-er t-e
airline ,arrier entere& is store& in table S%ARR @,arrierA )or )iel& S=50$%ARR0D. "-e re,or& is
only ,o+ie& to table S=50 @)orei6n 'ey tableA i) t-is is t-e ,ase. A )orei6n 'ey is &e)ine& )or )iel&
S=50$%ARR0D @,-e,' )iel&A/ )or e9am+le/ t-e ,-e,'s are on t-is )iel&. "-e ,orres+on&in6 ,-e,'
table is table S%ARR *it- t-e +rimary 'ey )iel&s MA1D" an& %ARR0D.
SA A! "A#12 5$C
SAP AG 2002
/oreign ?ey *e%initions in the Check /ie"
?ey %ie"s
T$be SP/67
4A#*T !!! !!! *ep$rt&re
$irport
(ith check t$be-
SA7:P3:T
T$be SA7:P3:T
4A#*T
...... Airport
1omain S;A38P31 1omain S;A38P31
<alue ta)le SA38P85 <alue ta)le SA38P85
1ata element S;A38P85 1ata element S;A38P85 1ata element S;&8MA38P 1ata element S;&8MA38P
/oreign key re$tionship to the check %ie" *ep$rt&re Airport
0n t-e A7A Di,tionary/ t-e same &omain is reHuire& )or t-e ,-e,' )iel& an& re)eren,e& 'ey )iel& o)
t-e ,-e,' table so t-at you &o not ,om+are )iel&s *it- &i))erent &ata ty+es an& )iel& len6t-s. Doman
eEualty s essental. D--erent data elements can be used, but t&ey must re-er to t&e same
doman.
"-e reHuirement )or &omain eHuality is only vali& )or t-e ,-e,' )iel&. =or all ot-er )orei6n 'ey )iel&s/
it is su))i,ient i) t-e &ata ty+e an& t-e )iel& len6t- are eHual. Eou nevert-eless s-oul& strive )or
&omain eHuality. 0n t-is ,ase/ t-e )orei6n 'ey *ill remain ,onsistent i) t-e )iel& len6t- is ,-an6e&
be,ause t-e ,orres+on&in6 )iel&s are bot- ,-an6e&. 0) t-e &omains are &i))erent/ t-e )orei6n 'ey *ill
be in,onsistent i)/ )or e9am+le/ t-e )iel& len6t- is ,-an6e&.
0) t-e &omain o) t-e ,-e,' )iel& -as a value table/ you ,an -ave t-e system ma'e a +ro+osal *it- t-e
value table as ,-e,' table. 0n t-is ,ase/ a +ro+osal is ,reate& )or t-e )iel& assi6nment in t-e )orei6n
'ey.
9(1T;48F
T&e example t&at a doman t&at tsel- &as table S(;:*4:T as /alue table s used -ollo.n"
-eld S(;:*4:T!(rport s correctF >o.e/er, a -ore"n %ey s ne/er de-ned on t&s -eld
?a/odn" a loop@.
SA A! "A#12 5$;
SAP AG 2002
Check T$be not 5,&$ to 8$&e T$be
5a)le SB#SPA85
MA/15 B#SPA85/#M !!!
*o'$in S@ *o'$in S@B2SPA#24 B2SPA#24
8$&e t$be SB2SPA:T 8$&e t$be SB2SPA:T
MA/15 AG5#C>#24 !!!
5a)le S58A<E*AG
&orei'n key ta)le SB33?
MA/15 CA8831 CA/CE*E1 !!! AG5#C>#24 !!!
0n t-e above e9am+le )or t-e )orei6n 'ey &e)inition )or )iel& S722I$A!31%E18M/ t-e system
+ro+osal is as )ollo*s base& on t-e value table in t-e &omain(
%-e,' table( S78SAR"
=eld ass"nment:
9&ec% table =ore"n %ey table
S78SAR"$MA1D" S722I$MA1D"
S78SAR"$78SAR"18M S722I$A!31%E18M
T&s proposal does not do .&at you .ant t to do:
"able S78SAR" ,ontains all t-e business +artners o) airline ,arriers. >o*ever/ only a6en,ies are
allo*e& )or )iel& S722I$A!31%E18M. "able S78SAR" t-ere)ore ,ontains invali& &ata )or t-is
)iel&. "-e system +ro+osal is t-ere)ore in,orre,tN "-e ,orre,t ,-e,' table is table S"RA:35A!. 0t is
a subset o) table S78SAR" &ue to its )orei6n 'ey &e)inition on )iel& A!31%E18M.
5ou must o/er.rte t&e system proposal .t& table ST:(GE$(A. ;- you do not %no. t&e
correct c&ec% table, t&e system can &elp you by lstn" all t&e tables n Eueston. T&s ncludes
all t&e tables t&at &a/e a %ey -eld .t& doman S7 )1S*(813.
SA A! "A#12 5$10
SAP AG 2002
Se'$ntic Attrib&tes
1-C
1-# 1-1
1-C#
C$r"in$ity
C
C
C
C
/
/
/
/
"-e ,ar&inality &es,ribes t-e )orei6n 'ey relations-i+ *it- re6ar& to -o* many re,or&s o) t-e ,-e,'
table are assi6ne& to re,or&s o) t-e )orei6n 'ey table. "-e ,ar&inality is al*ays &e)ine& )rom t-e
+oint o) vie* o) t-e ,-e,' table.
"-e ty+e o) t-e )orei6n 'ey )iel& &e)ines *-et-er or not t-e )orei6n 'ey )iel& i&enti)ies a table entry.
"-is means t-at t-e )orei6n 'ey )iel&s are eit-er 'ey )iel&s or t-ey are not 'ey )iel&s or t-ey are a
s+e,ial ,ase/ namely t-e 'ey )iel&s o) a te9t table.
"-ere are t-e )ollo*in6 'in&s o) )orei6n 'ey )iel&s(
8ot spec-ed: 1o in)ormation about t-e 'in& o) )orei6n 'ey )iel& ,an be 6iven.
8o %ey -elds H canddates: "-e )orei6n 'ey )iel&s are neit-er +rimary 'ey )iel&s o) t-e )orei6n
'ey table nor &o t-ey uniHuely i&enti)y a re,or& o) t-e )orei6n 'ey table @'ey ,an&i&atesA. "-e
)orei6n 'ey )iel&s t-ere)ore &o not @+artiallyA i&enti)y t-e )orei6n 'ey table.
Iey -elds H canddates: "-e )orei6n 'ey )iel&s are eit-er +rimary 'ey )iel&s o) t-e )orei6n 'ey
table or t-ey uniHuely i&enti)y a re,or& o) t-e )orei6n 'ey table @'ey ,an&i&atesA. "-e )orei6n 'ey
)iel&s t-ere)ore @+artiallyA i&enti)y t-e )orei6n 'ey table.
Iey -elds o- a text table$ "-e )orei6n 'ey table is a te9t table o) t-e ,-e,' table/ )or e9am+le/ t-e
'ey o) t-e )orei6n 'ey table only &i))ers )rom t-e 'ey o) t-e ,-e,' table in an a&&itional lan6ua6e
'ey )iel&. "-is is a s+e,ial ,ase o) t-e ,ate6ory %ey fields / candidates.
SA A! "A#12 5$11
SAP AG 2002
Te)t T$be
Te)t t$be S45A6T
MEA*.
/#MBE8
MA/15 CA8831
*A/G#AGE 5E=5
T$be S45A6
MA/15 CA8831
MEA*.
50PE
MEA*.
/#MBE8
?ey %ie"s ?ey %ie"s
/oreign ?ey :e$tionship (ith Check T$be S45A6
Type o% %oreign key %ie"s- key %ie"s o% $ te)t t$be
"able SM3A5 ,ontains t-e meals serve& to t-e +assen6ers &urin6 a )li6-t. "-e meal names are
maintaine& in table SM3A5".
"able SM3A5" is t-e te9t table )or table SM3A5 sin,e t-e 'ey o) SM3A5" ,onsists o) t-e 'ey o)
SM3A5 an& an a&&itional lan6ua6e 'ey )iel& @)iel& *it- &ata ty+e 5A1!A.
"able SM3A5" ,an ,ontain e9+lanatory te9t in several lan6ua6es )or ea,- 'ey entry o) SM3A5.
"o lin' t-e 'ey entries *it- t-e te9t/ t-e te9t table SM3A5" must be lin'e& *it- table SM3A5 usin6
a )orei6n 'ey. %ey fields of a text table must be ,-osen )or t-e ty+e o) t-e )orei6n 'ey )iel&s.
T&e -ore"n %ey relatons&p s de-ned -rom S3E($T to S3E($.
2nly one te9t table ,an be ,reate& )or a table.
SA A! "A#12 5$12
SAP AG 2002
2nit S&''$ry
T(o ($ys to check the "$t$ consistency (ere
intro"&ce" in this &nit-
/i)e" !$&es (st$tic)
/oreign keys ("yn$'ic)
The %i)e" !$&es $re store" in the "o'$in.
The %oreign key per'its yo& to check the !$&es yo&
enter $g$inst e)isting "$t$.
The %oreign key re$tionship is '$int$ine" %or the
check %ie" (%ie" o% the %oreign key t$be).
The check %ie" '&st be $ssigne" to $ check t$be key
%ie" h$!ing the s$'e "o'$in.
SA A! "A#12 5$13
9onsstency T&rou"& ;nput 9&ec%s Exercses
1nt: 9onsstency t&rou"& ;nput 9&ec%s
At t-e ,on,lusion o) t-ese e9er,ises/ you *ill be able to(
%reate )i9e& values
Set value tables to t-e ,orre,t ,onte9t
De)ine )orei6n 'eys
8se t-e above me,-anism to ensure t-at t-e &ata is ,onsistent
#-en you enter or ,-an6e t-e em+loyee master &ata/ only ,onsistent
&ata/ )or e9am+le/ vali& airline ,arriers/ &e+artments/ areas/ et,./ s-oul&
be allo*e&. "-is *ill be im+lemente& in t-e ne9t e9er,ise.
1$1 "-e em+loyees o) t-e airlines are &ivi&e& into a&ministration +ersonnel @AA/ )li6-t
+ersonnel @=A an& servi,e +ersonnel @SA. "-ey are assi6ne& to a,tivity areas A/ = or
S a,,or&in6ly. Ma'e sure t-at only vali& a,tivity areas ,an be entere& in table
P3M52ESS.
1$2 De)ine suitable )orei6n 'eys )or tables P3M52ESS/ PD3M31"SS/ an&
P=5%R3#SS. 8se t-e tables o) t-e )li6-t mo&el or tables "000 @,lientA an&
S%8R4 @,urren,y ,o&eA as *ell as your tables to &e)ine t-e )orei6n 'eys. De)ine a
)orei6n 'ey ,-e,' )or ea,- o) t-e )ollo*in6 )iel&s(
P3M52ESS$%lient
P3M52ESS$%arrier
P3M52ESS$De+artment ,o&e
P3M52ESS$%urren,y
an&
PD3M31"SS$%lient
PD3M31"SS$%arrier
an&
P=5%R3#SS$3m+Jnum
SA A! "A#12 5$14
Maintain t-e &ata )or table P3M52ESS an& test t-e e))e,t o) your )orei6n 'ey
relations-i+s.
1$3 Some em+loyees o) ,arriers *or' in travel a6en,ies in or&er to sell )li6-ts )or t-eir
,om+anies t-ere. 3n-an,e table P3M52ESS *it- a )iel& t-at &o,uments t-e
travel a6en,y *-ere ea,- em+loyee *or's.
3n-an,e table P3M52ESS a,,or&in6ly an& &e)ine t-e )orei6n 'ey relations-i+.
"-e table o) all travel a6en,ies is ,alle& ST:(GE$(A.
1$4 3a,- &e+artment o) an airline -as a -ea& o) &e+artment. "-e assi6nment bet*een
t-e &e+artment an& t-e -ea& o) t-e &e+artment s-oul& be ma++e& in t-e )li6-t
mo&el. 3n-an,e table PD3M31"SS *it- )iel& Dephead+ De)ine a suitable )orei6n
'ey )or t-is )iel&.
8se t-e t*o$ste+ &omain ,on,e+t.
1$5 %reate a te9t table PD3M31""SS )or table PD3M31"SS to e9+lain t-e
&e+artment ,o&e )or t-e em+loyees o) t-e ,arriers in all ,ountries.
%reate t-e ,orres+on&in6 table an& use &ata elements SRAS an& SJ"34" )or t-e
)iel& &e)inition.
De)ine t-e reHuire& )orei6n 'ey relations-i+s.
SA A! "A#12 5$15
9onsstency T&rou"& ;nput 9&ec%s Solutons
1nt: 9onsstency t&rou"& ;nput 9&ec%s
1$1 %all t-e &omain maintenan,e s,reen )or )iel& P3M52ESS$Area. Eou ,an &o t-is
by navi6atin6 )rom t-e table maintenan,e s,reen to t-e ,orres+on&in6 &ata element
an& )rom -ere to t-e &omain. %-oose tab +a6e 2alue rane an& enter t-e )ollo*in6
)i9e& values(
Fi-ed value .hort description
A (dmnstraton personnel
F =l"&t personnel
S Ser/ce personnel
A,tivate your &omain.
1$2 "o maintain t-e in&ivi&ual )orei6n 'eys/ ,all t-e maintenan,e routine )or t-e
+arti,ular tables. %-oose tab +a6e Fields.
%reate )orei6n 'ey P3M52ESS$%lient as )ollo*s(
1A la,e t-e ,ursor on )iel& P3M52ESS$%lient. Sele,t Forein 1ey or ,-oose
+oto Foreign key.
2A Sin,e you are usin6 &omain MA1D" )or )iel& P3M52E$%lient/ t-e
system +ro+oses value table "000 as ,-e,' table.
3A >ave t-e system ma'e a +ro+osal )or t-e )orei6n 'ey &e)inition. %-e,' t-e
+ro+osal. "-e )ollo*in6 )iel&s must be assi6ne&(
Check table CkTabFld For/ key table For/ key 0ld
T333 4A,DT P3M52ESS Client
4A 3nter a s-ort te9t an& &e)ine t-e semanti, attributes as )ollo*s(
Type of forein 1ey fields$ %ey -elds H canddates
Cardinality$ <:98
5A Save your )orei6n 'ey.
%reate )orei6n 'ey P3M52ESS$%arrier as )ollo*s(
SA A! "A#12 5$16
1A la,e t-e ,ursor on )iel& P3M52ESS$%arrier. Sele,t Forein 1ey or
,-oose +oto Foreign key.
2A Sin,e you are usin6 &omain SJ%ARRJ0D )or )iel& P3M52E$%arrier/
you ,an use value table S%ARR )or t-e )orei6n 'ey &e)inition.
3A >ave t-e system ma'e a +ro+osal )or t-e )orei6n 'ey &e)inition. %-e,'
t-e +ro+osal. "-e )ollo*in6 )iel&s must be assi6ne&(
Check table ChkTablFld For/ key table Foreign key 0ield
S9(:: 3(8DT 2E3*$4566 9lent
S9(:: 9(::;D 2E3*$4566 9arrer
4A 3nter a s-ort te9t an& &e)ine t-e semanti, attributes as )ollo*s(
Type of forein 1ey fields$ %ey -elds H canddates
Cardinality$ <:98
5A Save your )orei6n 'ey.
%reate )orei6n 'ey P3M52ESS$De+artment ,o&e as )ollo*s(
1A "o 6et a +ro+osal )or t-e )orei6n 'ey &e)inition/ you must ,-an6e t-e
&omain )or )iel& P3M52ESS$De+artment ,o&e. "-is is not
absolutely ne,essary )or later )orei6n 'ey &e)initions/ but ma'es t-e
&e)inition easier. 3nter value table PD3M31"SS in t-e &omain )or
t-is )iel& an& a,tivate t-e &omain.
2A la,e t-e ,ursor on )iel& P3M52ESS$De+artment ,o&e. Sele,t
Forein 1ey or ,-oose Goto Forein 1ey.
3A Sin,e you are usin6 t-e &omain o) )iel& PD3M31"SS$De+artment
,o&e )or )iel& P3M52E$De+artment ,o&e/ you ,an use value table
PD3M31"SS )or t-e )orei6n 'ey &e)inition.
4A >ave t-e system ma'e a +ro+osal )or t-e )orei6n 'ey &e)inition.
%-e,' t-e +ro+osal. "-e )ollo*in6 )iel&s must be assi6ne&(
Check table ChkTablFld For/ key table Foreign key 0ield
2DE*3E8T66 Client 2E3*$4566 Client
2DE*3E8T66 9arrer 2E3*$4566 9arrer
2DE*3E8T66 Department code 2E3*$4566 Department code
5A 3nter a s-ort te9t an& &e)ine t-e semanti, attributes as )ollo*s(
Type of forein 1ey fields$ non!%ey!-elds H canddates
Cardinality$ 5$C,
6A Save your )orei6n 'ey.
SA A! "A#12 5$1B
%reate )orei6n 'ey P3M52ESS$%urren,y as )ollo*s(
1A la,e t-e ,ursor on )iel& P3M52ESS$%urren,y. Sele,t Forein
1ey or ,-oose +oto Foreign key.
2A Sin,e you are usin6 &omain SJ%8RR )or )iel& P3M52ESS$
%urren,y/ you ,an use value table S%8R4 )or t-e )orei6n 'ey
&e)inition.
3A >ave t-e system ma'e a +ro+osal )or t-e )orei6n 'ey &e)inition.
%-e,' t-e +ro+osal. "-e )ollo*in6 )iel&s must be assi6ne&(
Check table ChkTablFld For/ key table For/ key 0ld
S91:D 91::IE5 2E3*$4566 9urrency
4A 3nter a s-ort te9t an& &e)ine t-e semanti, attributes as )ollo*s(
Type of forein 1ey fields$ non!%ey!-elds H canddates
Cardinality$ <:98
5A Save your )orei6n 'ey.
%reate )orei6n 'ey PD3M31"SS$%lient as )ollo*s(
See )orei6n 'ey P3M52ESS$%lient.
%reate )orei6n 'ey PD3M31"SS$%arrier as )ollo*s(
See )orei6n 'ey P3M52ESS$%arrier.
%reate )orei6n 'ey P=5%R3#SS$3m+Jnum as )ollo*s(
1A la,e t-e ,ursor on )iel& P=5%R3#SS$3m+Jnum. Sele,t
Forein 1ey or ,-oose +oto Foreign key.
2A "-e ,-e,' table is table P3M52ESS. 0) you store& t-is table as
a value table )or t-e &omain )or t-e +ersonnel number/ t-e
system *ill ma'e t-is +ro+osal. 0) not/ you -ave to enter it
yoursel). Eou ,an ,o+y t-e system +ro+osal in t-e )iel& allo,ation
o) t-e )orei6n 'ey. "-e ,ar&inality is 1(%1 an& t-e )orei6n 'ey
)iel&s are 'ey )iel&s / ,an&i&ates.
0n t-e maintenan,e s,reen )or table P3M52ESS ,-oose
,tilities Table contents Create entries.
3nter &ata an& ,-e,' *-et-er your )orei6n 'ey )un,tions
,orre,tly usin6 t-e =4 -el+.
1$3 %reate a ne* )iel& Aency in your table P3M52ESS as )ollo*s(
1A 1avi6ate to t-e )iel& maintenan,e s,reen )or table P3M52ESS. 0nsert a
ne* )iel& Aency in t-e )iel& list @sele,t ,e! ro!sA. 0n t-e maintenan,e
s,reen )or table S"RA:35A! you ,an see t-at t-e suitable &ata element is
,alle& SJA!1%E18M. Assi6n t-is &ata element to your ne* )iel&
P3M52ESS$A6en,y.
2A osition t-e ,ursor on t-e )iel& Aency an& -ave t-e system ma'e a +ro+osal
)or t-e )orei6n 'ey &e)inition.
SA A! "A#12 5$1C
3A %-e,' t-e +ro+osal. "-e ,-e,' table is S78SAR". "-is ,-e,' table is not
,orre,t sin,e it ,ontains all t-e business +artners o) ,arriers an& not Dust
a6en,ies.
4A "-e ,orre,t ,-e,' table is S"RA:35A!/ *-i,- it ,ontains t-e a6en,ies t-e
,arriers *or' *it-.
5A Eou ,an im+rove un&erstan&in6 by loo'in6 at t-e &e)inition o) table
S"RA:35A! in a se,on& session. =iel& A!31%E18M -as a )orei6n 'ey
*it- ,-e,' table S78SAR". "-is means t-at table S"RA:35A! is a
subset o) table S78SAR".
0n t-e )orei6n 'ey &e)inition )or P3M52ESS$A6en,y/ over*rite entry
S78S7AR" in t-e in+ut )iel& Chec1 table *it- S"RA:35A!.
6A Sele,t Copy. "-e system re,o6ni<es t-e ,-an6e in t-e ,-e,' table an&
su66ests t-at it ,reate a +ro+osal. A,,e+t t-is o))er an& sele,t t-e +ro+osal.
"-e )ollo*in6 )iel&s must be assi6ne&(
Check table ChkTablFld For/ key table For/ key 0ld
ST:(GE$(A 3(8DT 2E3*$4566 9lent
ST:(GE$(A (AE895813 2E3*$4566 ("ency
BA 3nter a s-ort &es,ri+tion. 3nter ,ar&inality 1(%1 an& in&i,ate t-at t-e
)orei6n 'ey )iel&s are not 'ey )iel&s / ,an&i&ates. %-oose Copy.
CA A,tivate t-e table.
;A 0n t-e maintenan,e s,reen )or table P3M52ESS/ ,-oose ,tilities Table
Contents Create !ntries.
:eri)y your )orei6n 'ey usin6 t-e =4 -el+.
1$4 0n our mo&el/ +eo+le are i&enti)ie& by t-eir +ersonnel number. "-ere)ore/ t-e ne*
)iel& to be a&&e& to table PD3M31"SS must ,ontain +ersonnel numbers @an& not
namesA. "-e )iel& s-oul& t-ere)ore re)er to t-e &omain )or +ersonnel numbers t-at
you ,reate& in t-e )irst e9er,ise. Sin,e t-e +erson to be mana6e& in t-is ,ase -as a
s+e,ial role/ you s-oul& ,reate a ne* &ata element an& not use t-e one alrea&y
,reate& )or t-e +ersonnel number. Eou ,an eit-er )irst ,reate t-e &ata element an&
t-en maintain t-e table/ or ,reate t-e &ata element )rom t-e table maintenan,e
s,reen *it- )or*ar& navi6ation. "-e se,on& *ay is &es,ribe& belo*(
1A !o to ,-an6e mo&e in t-e maintenan,e s,reen )or table PD3M31"SS.
Sele,t tab +a6e Fields.
2A %-oose ,e! ro!s.
3A 3nter t-e ne* )iel& &ire,tly )ollo*in6 t-e e9istin6 )iel&s by enterin6 a
suitable )iel& name in t-e )irst ,olumn an& enterin6 a name )or t-e &ata
element to be ,reate& in ,olumn Field type.
4A Save t-e table &e)inition.
5A Sele,t t-e name o) t-e ne* &ata element to be ,reate&. %on)irm t-at you
*ant to ,reate a &ata element.
SA A! "A#12 5$1;
6A 3nter a s-ort te9t )or t-e &ata element. 3nter t-e &omain name t-at you
alrea&y ,reate& )or t-e +ersonnel number in )iel& Domain.
BA Sele,t +a6e Field label an& enter t-e ,orres+on&in6 te9t t-ere.
CA A,tivate t-e &ata element. !o ba,' to t-e maintenan,e s,reen )or table
PD3M31"SS by ,-oosin6 'ac1+
;A %reate t-e )orei6n 'ey )or t-e ne* )iel& in t-e usual manner. "-e ,-e,' table
is table P3M52ESS. 0) you store& t-is table as a value table )or t-e
&omain )or t-e +ersonnel number/ t-e system *ill ma'e t-is +ro+osal. 0) not/
you -ave to enter it yoursel). Eou ,an ,o+y t-e system +ro+osal in t-e )iel&
allo,ation o) t-e )orei6n 'ey. "-e ,ar&inality is 1(%1 an& t-e )orei6n 'ey
)iel&s are non 'ey )iel&s / ,an&i&ates.
10A A,tivate t-e table.
1$5 %reate your te9t table PD3M31""SS as )ollo*s(
1A %o+y table PD3M31"SS to table PD3M31""SS.
2A 1avi6ate to t-e )iel& maintenan,e s,reen )or table PD3M31""SS. Delete
all t-e )iel&s t-at are not 'ey )iel&s. %reate t-e )ollo*in6 ne* )iel&s(
Field name Data element Data type, Length
Lanuae S*:(S $(8A
Description S7TEDT 9>(:40
=iel& PD3M31"SS$5an6ua6e must be a 'ey )iel&.
3A "-e )orei6n 'eys )or )iel&s PD3M31""SS$%lient an& PD3M31""SS$
%arrier *ere alrea&y ,orre,tly &e)ine& by ,o+yin6. Eou still -ave to &e)ine
t-e )orei6n 'eys o) )iel&s PD3M31""SS$De+artment ,o&e an&
PD3M31""SS$5an6ua6e.
4A la,e t-e ,ursor on )iel& PD3M31""SS$De+artment ,o&e. Sele,t Forein
1ey or ,-oose +oto Foreign key.
5A Sin,e you are usin6 t-e &omain o) )iel& PD3M31"SS$De+artment ,o&e
)or )iel& PD3M31""SS$De+artment ,o&e/ you ,an use value table
PD3M31"SS )or t-e )orei6n 'ey &e)inition.
6A >ave t-e system ma'e a +ro+osal )or t-e )orei6n 'ey &e)inition. %-e,' t-e
+ro+osal. "-e )ollo*in6 )iel&s must be assi6ne&(
Check table ChkTablFld For/ key table For/ key 0ld
2DE*3E8T66 9lent 2DE*3E8TT66 9lent
2DE*3E8T66 9arrer 2DE*3E8TT66 9arrer
2DE*3E8T66 Department code 2DE*3E8TT66 Department code
BA 3nter a s-ort te9t an& &e)ine t-e semanti, attributes as )ollo*s(
SA A! "A#12 5$20
Type of forein 1ey fields$ %ey -elds o- a text table
Cardinality$ <:98
CA Save your )orei6n 'eys.
;A la,e t-e ,ursor on )iel& PD3M31""SS$5an6ua6e. Sele,t Forein 1ey or
,-oose +oto Foreign key.
10A Sin,e you are usin6 &omain SRAS )or )iel& PD3M31""SS$5an6ua6e/
you ,an use value table "002 )or t-e )orei6n 'ey &e)inition.11A >ave
t-e system ma'e a +ro+osal )or t-e )orei6n 'ey &e)inition. %-e,' t-e
+ro+osal. "-e )ollo*in6 )iel&s must be assi6ne&(
Check table ChkTablFld For/ key table Foreign key 0ield
T002 S*:(S 2DE*3E8TT66 $an"ua"e
11A 3nter a s-ort te9t an& &e)ine t-e semanti, attributes as )ollo*s(
Type of forein 1ey fields$ %ey -elds H canddates
Cardinality$ <:98
12A Save your )orei6n 'ey.
13A A,tivate t-e table.
SA A! "A#12 5$21
SAP AG $%%%
Acti!$tion o% ABAP *iction$ry ob0ects
9$n"ing o% "epen"ent ob0ects
Where.&se" ist $n" :/3 :epository 7n%or'$tion
Syste' $s seen by the ABAP *iction$ry
*epen"encies o% ABAP *iction$ry 3b0ects
SA A! "A#12 6$1
SAP AG 2002
Co&rse 3b0ecti!es
At the en" o% this &nit; yo& (i be $be to-
*i%%erenti$te bet(een the $cti!e $n" in$cti!e !ersion o% $n
ABAP *iction$ry ob0ect.
*escribe the 'ech$nis' %or h$n"ing "epen"ent ob0ects
in the ABAP *iction$ry
5)p$in ho( the :epository 7n%or'$tion Syste' $n" the
Where.&se" ist %or ABAP *iction$ry ob0ects %&nction
SA A! "A#12 6$2
SAP AG 2002
Acti!e $n" 7n$cti!e 8ersions
Acti!e !ersion 7n$cti!e !ersion
Acti!e !ersion
Acti!e !ersion
/ie" 1 /ie" 2 /ie" 3 /ie" 1 /ie" 2 /ie" 3 /ie" <
/ie" 1 /ie" 2 /ie" 3 /ie" <
Acti!$te
A"" /ie" < in the ABAP *iction$ry
/ie" 2 /ie" 3 /ie" 1
Durin6 &evelo+ment/ you sometimes nee& to ,-an6e an @a,tiveA obDe,t alrea&y use& by t-e system.
Su,- ,-an6es are su++orte& in t-e A7A Di,tionary by se+aratin6 t-e a,tive an& ina,tive versions.
"-e act/e version o) an A7A Di,tionary obDe,t is t-e version t-at t-e ,om+onents o) t-e runtime
environment @)or e9am+le A7A +ro,essor/ &atabase inter)a,eA a,,ess. "-is version is not initially
,-an6e&.
An nact/e version is ,reate& *-en an a,tive obDe,t is ,-an6e&. "-e ina,tive version ,an be save&
*it-out ,-e,'in6. 0t -as no e))e,t on t-e runtime system.
At t-e en& o) t-e &evelo+ment +ro,ess/ t-e ina,tive version ,an be ma&e t-e a,tive version. "-is is
&one by act/aton. "-e ina,tive version o) t-e obDe,t is )irst ,-e,'e& )or ,onsisten,y. 0) it is
,onsistent/ t-e ina,tive version re+la,es t-e a,tive one. =rom no* on/ t-e runtime system uses t-e
ne* a,tive version.
"-e above e9am+le s-o*s -o* t-e obDe,t status ,-an6es. An a,tive stru,ture ,ontains t-ree )iel&s. A
)iel& is a&&e& to t-is stru,ture in t-e A7A Di,tionary. A)ter t-is a,tion/ t-ere is an a,tive version
*it- t-ree )iel&s an& an ina,tive version *it- )our )iel&s. Durin6 a,tivation/ t-e a,tive version is
over*ritten *it- t-e ina,tive version. "-e ina,tive version t-us be,omes t-e a,tive version. A)ter t-is
a,tion t-ere is only t-e a,tive version *it- )our )iel&s.
SA A! "A#12 6$3
SAP AG 2002
:&nti'e 3b0ects
Str&ct&re
7n%or'$tion $bo&t
the str&ct&re
/ie" in%or'$tion
:&nti'e ob0ect
o% the str&ct&re
*$t$ ee'ents
/ie" 2 /ie" 3 /ie" 1
ABAP
7nterpreter
1ata 1ata
element $ element $
1ata 1ata
element 2 element 2
1ata 1ata
element 3 element 3
1omain $ 1omain $ 1omain 2 1omain 2 1omain 3 1omain 3
"-e in)ormation about a stru,ture @or tableA is &istribute& in t-e A7A Di,tionary in &omains/ &ata
elements/ an& t-e stru,ture &e)inition. "-e runtime obDe,t @nametabA ,ombines t-is in)ormation into a
stru,ture in a )orm t-at is o+timi<e& )or a,,ess )rom A7A +ro6rams. "-e runtime obDe,t is ,reate&
*-en t-e stru,ture is a,tivate&.
"-e runtime obDe,ts o) t-e stru,tures are bu))ere& so t-at t-e A7A runtime system ,an Hui,'ly
a,,ess t-is in)ormation.
"-e runtime obDe,t ,ontains in)ormation about t-e overall stru,ture @)or e9am+le/ number o) )iel&sA
an& t-e in&ivi&ual stru,ture )iel&s @)iel& name/ +osition o) t-e )iel& in t-e stru,ture/ &ata ty+e/ len6t-/
number o) &e,imal +la,es/ re)eren,e )iel&/ re)eren,e table/ ,-e,' table/ ,onversion routine/ et,.A.
"-e runtime obDe,t o) a table ,ontains )urt-er in)ormation nee&e& by t-e &atabase inter)a,e )or
a,,essin6 t-e table &ata @,lient &e+en&en,e/ bu))erin6/ 'ey )iel&s/ et,.A.
Runtime obDe,ts are ,reate& )or all A7A Di,tionary obDe,ts t-at ,an be use& as ty+es in A7A
+ro6rams. "-ese are &ata elements/ table ty+es/ an& vie*s/ as *ell as stru,tures an& tables.
SA A! "A#12 6$4
SAP AG 2002
9$n"ing o% *epen"ent 3b0ects
Str&ct&re 3 T$be 1 Str&ct&re 2 Str&ct&re 1
T$be 2
inc&"es
1omain 1omain
1ata element $ 1ata element $ 1ata element 2 1ata element 2 1ata element 3 1ata element 3
0) an obDe,t t-at is alrea&y a,tive is mo&i)ie&/ t-is ,an a))e,t ot-er obDe,ts t-at use it @&ire,tly or
in&ire,tlyA. "-ese obDe,ts usin6 anot-er obDe,t are ,alle& dependent obDe,ts. 2n t-e one -an&/ it
mi6-t be ne,essary to a&Dust t-e runtime obDe,ts o) t-ese &e+en&ent obDe,ts to t-e ,-an6es. 2n t-e
ot-er -an&/ a ,-an6e mi6-t sometimes ma'e a &e+en&ent obDe,t in,onsistent.
=or t-is reason/ t-e &e+en&ent obDe,ts are &etermine& an& a,tivate& @i) ne,essaryA *-en an a,tive
obDe,t is a,tivate&. "-e a,tive versions o) t-e &e+en&ent obDe,ts are a,tivate& a6ain. 0n +arti,ular/
ne* an& ina,tive versions o) obDe,ts usin6 t-e ,-an6e& obDe,t are not ,-an6e&.
Example: #-en you ,-an6e a &omain/ )or e9am+le/ its &ata ty+e/ all t-e &ata elements/ stru,tures/
an& tables re)errin6 to t-is &omain must be a,tivate& a6ain. "-is a,tivation is automati,ally tri66ere&
*-en t-e &omain is a,tivate&. "-is ensures t-at all a))e,te& runtime obDe,ts are a&Duste& to t-e
,-an6e& ty+e in)ormation.
0) an A7A Di,tionary obDe,t -as a table as &e+en&ent obDe,t/ its &atabase obDe,t as *ell as its
runtime obDe,t mi6-t -ave to be a&Duste& *-en t-e &e+en&ent obDe,t is a,tivate&. "-e met-o& use&
-ere *ill be &is,usse& in t-e ne9t unit.
SA A! "A#12 6$5
SAP AG 2002
Where.2se" 6ists
2se
Where.&se" ists
Progr$' 1 Progr$' 2
Str&ct&re 3 T$be 1 Str&ct&re 2 Str&ct&re 1
1omain 1omain
T$be 2
1ata element $ 1ata element $ 1ata element 2 1ata element 2 1ata element 3 1ata element 3
%-an6in6 an A7A Di,tionary obDe,t mi6-t also a))e,t its &e+en&ent obDe,ts. 7e)ore ma'in6 a
,riti,al ,-an6e @su,- as ,-an6in6 t-e &ata ty+e or &eletin6 a )iel&A/ you s-oul& &e)ine t-e set o)
obDe,ts a))e,te& in or&er to estimate t-e im+li,ations o) t-e +lanne& a,tion.
"-ere is a '&ere!used lst )or ea,- A7A Di,tionary obDe,t *it- *-i,- you ,an )in& all t-e obDe,ts
t-at re)er to t-is obDe,t. Eou ,an ,all t-e #-ere$use& list )rom t-e maintenan,e transa,tion o) t-e
obDe,t.
Eou ,an )in& &ire,t an& in&ire,t usa6es o) an A7A Di,tionary obDe,t *it- t-e *-ere$use& list. Eou
also -ave to &e)ine *-i,- usa6e obDe,t ty+es s-oul& be in,lu&e& in t-e sear,- @)or e9am+le/ all
stru,tures an& tables usin6 a &ata elementA. Eou ,an also sear,- )or usa6es t-at are not A7A
Di,tionary obDe,ts @)or e9am+le/ all +ro6rams usin6 a tableA. "-e sear,- ,an also be limite& by
&evelo+ment ,lass or user names+a,e.
0) an obDe,t is +robably use& by several obDe,ts/ you s-oul& +er)orm t-e sear,- in t-e ba,'6roun&.
SA A! "A#12 6$6
SAP AG 2002
Sho( $ ob0ects o% type K
(ith $ttrib&te >
Sho( $ ob0ects
o% type K th$t
(ere ch$nge" by &ser >
$t ti'e **44>>>>
Sho( $ ob0ects o% type K
th$t &se
ob0ect >
Sho( $ t$be %ie"s
(ith check t$be K
7n%or'$tion $bo&t 7n%or'$tion $bo&t
re$tionships re$tionships
bet(een t$bes bet(een t$bes Proo% o% ch$nge Proo% o% ch$nge
Where Where. .&se" ist &se" ist Se$rch by $ttrib&te Se$rch by $ttrib&te
ABAP ABAP
*iction$ry *iction$ry
H H
H H
The :epository 7n%or'$tion Syste' ABAP
*iction$ry
"-e Re+ository 0n)ormation System A7A Di,tionary is +art o) t-e 6eneral Re+ository 0n)ormation
System. 0t -el+s you sear,- )or A7A Di,tionary obDe,ts an& t-eir users.
"-e #-ere$use& list )or Re+ository obDe,ts ,an be ,alle& )rom t-e in)ormation system. "-e
in)ormation system also enables you to sear,- )or obDe,ts by t-eir attributes.
0n a&&ition to t-e obDe,t$s+e,i)i, sear,- ,riteria @)or e9am+le/ bu))erin6 ty+e )or tablesA/ you ,an
sear,- )or all obDe,ts by &evelo+ment ,lass/ s-ort &es,ri+tion or aut-or/ an& &ate o) last ,-an6e.
"-e obDe,t lists ,reate& by t-e Re+ository 0n)ormation System are entirely inte6rate& in t-e A7A
#or'ben,-. "-ey +ermit you to navi6ate &ire,tly to t-e maintenan,e transa,tions o) t-e obDe,ts
)oun&.
SA A! "A#12 6$B
SAP AG 2002
2nit S&''$ry
When $n ob0ect is $cti!$te"; the in$cti!e !ersion
beco'es the $cti!e !ersion ($%ter $ check). The o"
$cti!e !ersion is o!er(ritten.
When $n ob0ect th$t is $re$"y $cti!e is $cti!$te"; $ny
$cti!e "epen"ent ob0ects $re $so $cti!$te". The
r&nti'e ob0ect $n" the "$t$b$se ob0ect o% these
"epen"ent ob0ects $re $so &p"$te".
The Where.&se" ist c$n be &se" to %in" $ the
:epository ob0ects th$t &se $n ABAP *iction$ry ob0ect.
>o& c$n %in" ABAP *iction$ry ob0ects by their
$ttrib&tes in the :epository 7n%or'$tion Syste'.
7n the ABAP *iction$ry there is $n $cti!e $n" $n in$cti!e
!ersion o% $n ob0ect. The r&nti'e syste' &ses the $cti!e
!ersion $n" the "e!eop'ent process e"its the in$cti!e
!ersion.
SA A! "A#12 6$C
Dependences o- ()(* Dctonary 4b+ects Exercses
1nt: Dependences o- ()(* Dctonary 4b+ects
At t-e ,on,lusion o) t-ese e9er,ises/ you *ill be able to(
3n-an,e tables an& stru,tures *it- )iel&s
8se t-e R/3 Re+ository 0n)ormation System an& t-e #-ere$
use& list )or A7A Di,tionary obDe,ts
0n)ormation about t-e -ea& o) t-e &e+artment s-oul& be store& in t-e
em+loyee mana6ement system. "-e ,-an6e lo6 s-oul& also be ma&e more
&etaile&. "-is e9er,ise ma'es t-e a++ro+riate en-an,ements to t-e tables
an& stru,tures.
1$1 "-e ,-an6e lo6 )or tables P3M52ESS an& PD3M31"SS is not +re,ise enou6-.
0n a&&ition to t-e +erson *-o ma&e t-e last ,-an6e an& t-e &ate o) t-is ,-an6e/ you
also *ant to re,or& t-e time o) t-e last ,-an6e. >ave a suitable )iel& inserte& in bot-
tables as easily as +ossible. 8se &ata element SJ"0M3.
Ma'e sure t-at t-e )iel& is inserte& in bot- tables. %-e,' t-e a,tivation lo6 o) t-e
tables an& stru,tures involve&.
Start ro6ram 7%430J%>3%I in "ransa,tion S33C. 0t ,-e,'s
*-et-er your solutions are ,orre,t.
1$2 %reate a list o) t-e )ollo*in6 A7A Di,tionary obDe,ts(
1$2$1 All &omains *it- )i9e& values *-ose names be6in *it- P.
1$2$2 All table )iel&s t-at use &ata element SJ=1AM3.
1$2$3 All tables o) t-e )li6-t mo&el @&evelo+ment ,lass 7%JDA"AM2D35A t-at
-ave &elivery ,lass A.
1$3 Determine all t-e +ro6rams t-at use table S=50!>".
SA A! "A#12 6$;
1$4 #-at are t-e &ata elements ,reate& by your nei6-bors ,alle&T
JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
SA A! "A#12 6$10
Dependences o- ()(* Dctonary 4b+ects Solutons
1nt: Dependences o- ()(* Dctonary 4b+ects
1$1 "-e )iel&s )or t-e ,-an6e lo6 ,an be )oun& in t-e in,lu&e stru,ture P%>A1!3SS.
"-e ne* )iel& s-oul& t-ere)ore be inserte& in t-is stru,ture. "-e )iel& is
automati,ally inserte& in tables P3M52ESS an& PD3M31"SS usin6 t-e
in,lu&e me,-anism. ro,ee& as )ollo*s(
1A 0n t-e initial s,reen o) t-e A7A Di,tionary/ sele,t Data type an& enter
P%>A1!3SS in t-e ,orres+on&in6 )iel&. %-oose Chane.
2A Sele,t on tab +a6e Components. 3nter t-e name )or t-e ne* )iel& in t-e )irst
)ree ro* o) t-e ,om+onent list an& enter SJ"0M3 in ,olumn Component
type.
3A A,tivate t-e stru,ture.
4A #it- ,tilities Activation log you ,an )in& t-e a,tivation lo6 o) t-e
stru,ture. Eou ,an see -ere t-at tables P3M52ESS an& PD3M31"SS
are a,tivate& as &e+en&ent obDe,ts an& *ere en-an,e& *it- t-e ne* )iel&.
5A !o to &is+lay mo&e in t-e maintenan,e s,reen )or table P3M52ESS @or
PD3M31"SSA. %-oose ,tilities Table contents Create entries+ Eou
,an see -ere t-at t-e table *as really en-an,e& *it- t-e ,orres+on&in6 )iel&.
1$2 All t-e e9er,ises ,an be solve& *it- t-e Re+ository 0n)ormation System. Eou ,an &o
t-is )rom t-e initial s,reen o) t-e A7A Di,tionary *it- !nvironment
1epository )n0ormation .ystem. 39+an& t-e no&es )or t-e A7A Di,tionary.
1A 39+an& t-e no&e 'asic ob6ects. Sele,t Domains. 0n t-e sele,tion s,reen/
enter PV in t-e )irst )iel&. %-oose All selections. 0n t-e en-an,e& sele,tion
s,reen/ sele,t 7nly domains !ith fixed 8alues. Eou ,an ,reate t-e &esire& list
*it- 9xecute.
2A %-oose 'ac1 t*i,e to return to t-e initial s,reen o) t-e Re+ository
0n)ormation System. 39+an& t-e Fields no&e. Sele,t Table fields. %-oose
All selections an& enter SJ=1AM3 in )iel& Data element. Eou ,an ,reate t-e
&esire& list *it- 9xecute.
3A %-oose 'ac1 t*i,e to return to t-e initial s,reen o) t-e Re+ository
0n)ormation System. 1ote 'asic ob6ects are still e9+an&e&. Sele,t Database
tables. 3nter &evelo+ment ,lass 7%JDA"AM2D35 an& @a)ter ,-oosin6 All
selectionsA &elivery ,lass A in t-e sele,tion s,reen. Eou ,an ,reate t-e
&esire& list *it- 9xecute.
SA A! "A#12 6$11
1$3 !o to t-e initial s,reen o) t-e A7A Di,tionary. %-oose Database table an& enter
S=50!>" in t-e ,orres+on&in6 )iel&. %-oose :here)used list. "-e usa6e in
+ro6rams is alrea&y in&i,ate& @aloneA in t-e ne9t &ialo6 bo9. Eou ,an ,reate t-e
&esire& list *it- 9xecute.
1$4 Eou ,an ,reate t-e &esire& list a6ain in t-e Re+ository 0n)ormation System A7A
Di,tionary. 39+an& t-e no&e 'asic ob6ects an& sele,t Data elements. Eou ,an &e)ine
your nei6-borWs &ata elements *it- eit-er a +attern sear,- )or t-e name @i) your
nei6-bors a&-ere& to t-e 6iven namin6 ,onventionA or *it- Last chaned by @a)ter
,-oosin6 All selectionsA. 0) you -ave t*o 6rou+s o) nei6-bors/ you -ave to use
4ultiple selection. Eou ,an restri,t t-e sele,tion *it- t-e &ate o) t-e last ,-an6e
@t-e last ,-an6e s-oul& be no earlier t-an t-e be6innin6 o) t-e ,ourseA at least in t-e
)irst ,ase @namin6 ,onventionA.
SA A! "A#12 6$12
SAP AG $%%%
Ch$nges to "$t$b$se t$bes
5%%ect o% ch$nges to the t$be str&ct&re
T$be con!ersion
Possibe probe's "&ring con!ersions
Appen" str&ct&res
Ch$nges to *$t$b$se T$bes
SA A! "A#12 B$1
SAP AG 2002
At the en" o% this &nit; yo& (i be $be to-
4$ke ch$nges to t$bes
5sti'$te the e%%ect o% these ch$nges on the "$t$b$se
Con!ert t$bes
Contin&e ter'in$te" con!ersions
A"" c&sto'er %ie"s to SAP st$n"$r" t$bes by
'e$ns o% $ppen" str&ct&res (itho&t 'o"i%ic$tions
Co&rse 3b0ecti!es
SA A! "A#12 B$2
SAP AG $%%%
ABAP *iction$ry
Ch$nges to T$bes
Acti6e 6ersion
inacti6e 6ersion
/ie" 1 /ie" 2 /ie" 3
/ie" 2 /ie" 3 /ie" 1 /ie" <
/ie" 2 /ie" 3 /ie" 1
*$t$b$se
%orre,t a,,ess by A7A +ro6rams to a &atabase table is only +ossible i) t-e runtime obDe,t o) t-e
table is ,onsistent *it- t-e stru,ture o) t-e table in t-e &atabase. 3a,- time t-e table is ,-an6e& in t-e
A7A Di,tionary/ you must ,-e,' i) t-e &atabase stru,ture o) t-e table must be a&Duste& to t-e
,-an6e& A7A Di,tionary &e)inition o) t-e table *-en it is a,tivate& @*-en t-e runtime obDe,t is
re*rittenA.
"-e &atabase stru,ture &oes not -ave to be altere& )or ,ertain ,-an6es to t-e A7A Di,tionary. =or
e9am+le/ you &o not -ave to ,-an6e t-e &atabase stru,ture *-en t-e or&er o) t-e )iel&s in t-e A7A
Di,tionary is ,-an6e& @ot-er t-an )or 'ey )iel&sA. 0n t-is ,ase t-e ,-an6e& stru,ture is sim+ly
a,tivate& in t-e A7A Di,tionary an& t-e &atabase stru,ture remains un,-an6e&.
SA A! "A#12 B$3
SAP AG $%%%
9o( is the Str&ct&re A"0&ste"H
/ie" 1 /ie" 2 /ie" 3
Acti6e 6ersion
3nacti6e 6ersion
*eete; cre$te $g$in
or
Ch$nge c$t$og %or
the *B (A6T5: TAB65)
or
Con!ert the t$be
/ie" 2 /ie" 3 /ie" 1
/ie" 2 /ie" 3 /ie" 1 /ie" <
*oes the t$be cont$in "$t$H
Wh$t "$t$b$se
syste' is &se"H
Wh$t ch$nge ($s '$"eH
"-e &atabase table ,an be a&Duste& to t-e ,-an6e& &e)inition in t-e A7A Di,tionary in t-ree
&i))erent *ays(
7y &eletin6 t-e &atabase table an& ,reatin6 it a6ain. "-e table on t-e &atabase is &elete&/ t-e
ina,tive table is a,tivate& in t-e A7A Di,tionary/ an& t-e table is ,reate& a6ain on t-e &atabase.
Data e9istin6 in t-e table is lost.
7y ,-an6in6 t-e &atabase ,atalo6 @A5"3R "A753A. "-e &e)inition o) t-e table on t-e &atabase is
sim+ly ,-an6e&. 39istin6 &ata is retaine&. >o*ever/ in&e9es on t-e table mi6-t -ave to be built
a6ain.
7y ,onvertin6 t-e table. "-is is t-e most time$,onsumin6 *ay to a&Dust a stru,ture.
0) t-e table &oes not ,ontain any &ata/ it is &elete& in t-e &atabase an& ,reate& a6ain *it- its ne*
stru,ture. 0) &ata e9ists in t-e table/ t-ere is an attem+t to a&Dust t-e stru,ture *it- A5"3R "A753. 0)
t-e &atabase system use& is not able to &o so/ t-e stru,ture is a&Duste& by ,onvertin6 t-e table.
SA A! "A#12 B$4
SAP AG $%%%
Con!ersion Process 1
5AB > 0
5AB > A$$
/ie" 1
/#MC, ?
/ie" 2
C+A8, @
/ie" 3
C+A8, ?0
000$00
00$200
003000
$$$$A00
0222B$0
0030B20
5e"t$!!!
5e"t2 !!!
5e"t3 !!!
5AB
Acti6e 6ersion of 5AB
/ie" 2
C+A8, @
/ie" 3
C+A8, ?0
/ie" 1
/#MC,?
3nacti6e 6ersion of 5AB
/ie" 2
C+A8, @
/ie" 1
/#MC,?
/ie" 3
C+A8, 30
"-e )ollo*in6 e9am+le s-o*s t-e ste+s ne,essary &urin6 ,onversion.
Startn" stuaton: "able "A7 *as ,-an6e& in t-e A7A Di,tionary. "-e len6t- o) )iel& 3 *as
re&u,e& )rom 60 to 30 +la,es.
"-e A7A Di,tionary t-ere)ore -as an a,tive @)iel& 3 -as a len6t- o) 60 +la,esA an& an ina,tive @)iel&
3 still -as 30 +la,esA version o) t-e table.
"-e a,tive version o) t-e table *as ,reate& in t-e &atabase/ *-i,- means t-at )iel& 3 ,urrently -as 60
+la,es in t-e &atabase. A se,on&ary in&e9 *it- t-e 0D A11/ *-i,- *as also ,reate& in t-e &atabase/ is
&e)ine& )or t-e table in t-e A7A Di,tionary.
"-e table alrea&y ,ontains &ata.
SA A! "A#12 B$5
SAP AG 2002
Con!ersion Process 2
ACM5AB
8ename 5AB to
ACM5AB
1elete
inde"es
&ield $
/#MC, ?
&ield 2
C+A8, @
&ield 3
C+A8, ?0
$$$$A00
0222B$0
0030B20
5e"t$!!!
5e"t2 !!!
5e"t3 !!!
5AB is locked
5AB > A$$
5AB > 0
&ield $
/#MC, ?
&ield 2
C+A8, @
&ield 3
C+A8, ?0
000$00
00$200
003000
$$$$A00
0222B$0
0030B20
5e"t$!!!
5e"t2 !!!
5e"t3 !!!
2
2
Acti6e 6ersion of 5AB
/ie" 2
C+A8, @
/ie" 3
C+A8, ?0
/ie" 1
/#MC,?
3nacti6e 6ersion of 5AB
/ie" 2
C+A8, @
/ie" 1
/#MC,?
TAB ocke"
1
1
5AB
/ie" 3
C+A8, 30
000$00
00$200
003000
Step <: "-e table is lo,'e& a6ainst )urt-er stru,ture ,-an6es. 0) t-e ,onversion terminates &ue to an
error/ t-e table remains lo,'e&. "-is lo,' me,-anism +revents )urt-er stru,ture ,-an6es )rom bein6
ma&e be)ore t-e ,onversion -as been ,om+lete& ,orre,tly. Data ,oul& be lost in su,- a ,ase.
Step 2: "-e table in t-e &atabase is rename&. All t-e in&e9es on t-e table are &elete&. "-e name o) t-e
ne* @tem+oraryA table is &e)ine& by t-e +re)i9 Q%M an& t-e table name. "-e name o) t-e tem+orary
table )or table "A7 is t-ere)ore Q%M"A7.
SA A! "A#12 B$6
SAP AG 2002
Con!ersion Process 3
Acti6ate in t(e
ABAP 1ictionary
&ield 2
C+A8, @
&ield $
/#MC, ?
&ield 2
C+A8, @
&ield 3
C+A8, ?0
000$00
00$200
003000
$$$$A00
0222B$0
0030B20
5e"t$!!!
5e"t2 !!!
5e"t3 !!!
ACM5AB
ACM@5AB
&ield $
/#MC, ?
&ield 3
C+A8, 30
3
3
Acti6e 6ersion of 5AB
/ie" 2
C+A8, @
/ie" 3
C+A8, ?0
/ie" 1
/#MC,?
3nacti6e 6ersion of 5AB
3
3
5AB is created in t(e 1B wit(
t(e name ACM@5AB
/ie" 2
C+A8, @
/ie" 1
/#MC,?
/ie" 3
C+A8, 30
TAB ocke"
5AB > 0
Step 3: "-e ina,tive version o) table "A7 is a,tivate& in t-e A7A Di,tionary. "-e table is ,reate& in
t-e &atabase *it- its ne* stru,ture an& *it- t-e name Q%MC"A7. "-e +rimary in&e9 on t-e table is
also ,reate& in t-e &atabase. "-e stru,ture o) &atabase table Q%MC"A7 is t-e same as t-e stru,ture o)
t-e a,tive table in t-e A7A Di,tionary a)ter t-is ste+. "-e &atabase table/ -o*ever/ still &oes not
,ontain any &ata.
"-e table t-ere)ore &oes not e9ist in t-e &atabase *it- its ori6inal name &urin6 ,onversion. ro6rams
t-at a,,ess t-is table ,annot be e9e,ute&. 5ou s&ould al.ays ma%e sure t&at no applcatons access
t&e table to be con/erted durn" con/erson.
SA A! "A#12 B$B
SAP AG 2002
Con!ersion Process <
1ata is loaded )ack into ACM@5AB
<
<
ACM5AB
&ield $
/#MC, ?
&ield 2
C+A8, @
&ield 3
C+A8, ?0
000$00
00$200
003000
$$$$A00
0222B$0
0030B20
5e"t$!!!
5e"t2 !!!
5e"t3 !!!
&ield $
/#MC, ?
&ield 2
C+A8, @
&ield 3
C+A8, 30
000$00
00$200
003000
$$$$A00
0222B$0
0030B20
5e"t$!!!
5e"t2 !!!
5e"t3 !!!
ACM@5AB
Acti6e 6ersion of 5AB
/ie" 2
C+A8, @
/ie" 3
C+A8, 30
/ie" 1
/#MC,?
TAB ocke"
5AB > 0
Step 4: "-e &ata is loa&e& ba,' )rom table Q%M"A7 to table Q%MC"A7 @*it- M2:3$
%2RR3S21D01!A. "-e &ata is in bot- tables a)ter t-is ste+. #-en you re&u,e t-e si<e o) )iel&s/
)or e9am+le/ t-e e9tra +la,es are trun,ate& *-en you reloa& t-e &ata.
Sin,e t-e &ata is in bot- tables Q%MC"A7 an& Q%M"A7 &urin6 t-e ,onversion/ t-ere are
6reater stora6e reHuirements &urin6 ,onversion. Eou s-oul& t-ere)ore ,-e,' *-et-er t-ere is
su))i,ient s+a,e available in t-e ,orres+on&in6 tables+a,e be)ore ,onvertin6 lar6e tables.
"-ere is a &atabase ,ommit a)ter 16 M7 *-en you ,o+y t-e &ata )rom table Q%M"A7 to table
Q%MC"A7. A ,onversion +ro,ess t-ere)ore nee&s 16 M7 resour,es in t-e rollba,' se6ment.
"-e e9istin6 &atabase lo,' is release& *it- t-e %ommit an& t-en reHueste& a6ain be)ore t-e ne9t
&ata area to be ,onverte& is e&ite&.
#-en you re&u,e t-e si<e o) 'eys/ only one re,or& ,an be reloa&e& i) t-ere are several re,or&s
*-ose 'ey ,annot be &istin6uis-e&. 0t is not +ossible to say *-i,- re,or& t-is *ill be. 0n su,- a
,ase/ you s-oul& ,lean u+ t-e &ata o) t-e table be)ore ,onvertin6.
SA A! "A#12 B$C
SAP AG 2002
Con!ersion Process 1
1elete lock
D
D
1elete ta)le ACM5AB
&ield $
/#MC, ?
&ield 2
C+A8, @
&ield 3
C+A8, ?0
000$00
00$200
003000
$$$$A00
0222B$0
0030B20
5e"t$!!!
5e"t2 !!!
5e"t3 !!!
ACM5AB
1
1
&ield $
/#MC, ?
&ield 2
C+A8, @
&ield 3
C+A8, 30
000$00
00$200
003000
$$$$A00
0222B$0
0030B20
5e"t$!!!
5e"t2 !!!
5e"t3 !!!
5AB > 0
5AB > A$$
ACM@ 5AB
8ename ta)le and
create inde"es
B
B
Acti6e 6ersion of 5AB
/ie" 2
C+A8, @
/ie" 1
/#MC,?
/ie" 3
C+A8, 30
TAB ocke"
Step 5: "able Q%M"A7 is &elete&.
Step 6: "able Q%MC"A7 is rename& to "A7. "-e se,on&ary in&e9es &e)ine& in t-e A7A Di,tionary
)or t-e table are ,reate& a6ain. "-e vie*s on t-e table &elete& in t-e )irst ste+ o) t-e ,onversion are also
,reate& a6ain in t-e &atabase.
Step 7: "-e lo,' set at t-e be6innin6 o) t-e ,onversion is &elete&.
0) t-e ,onversion terminates/ t-e table remains lo,'e& an& a restart lo6 is *ritten.
%aution( "-e table &oes not e9ist in t-e &atabase *it- its ori6inal name &urin6 ,onversion.
ro6rams may not a,,ess t-e table &urin6 ,onversion. 9on/ersons s&ould not run durn"
productonF Eou must at least &ea,tivate all t-e a++li,ations t-at use t-e tables to be ,onverte&.
5ou must clean up termnated con/ersons. ro6rams t-at a,,ess t-e table *ill ot-er*ise not
run ,orre,tly. 0n t-is ,ase/ you must )in& out *-y t-e ,onversion terminate& @)or e9am+le/
over)lo* o) t-e ,orres+on&in6 tables+a,eA an& ,orre,t it. "-en ,ontinue t-e terminate&
,onversion.
SA A! "A#12 B$;
SAP AG 2002
Possibe Probe's "&ring Con!ersions
T$besp$ce o!er%o(
*$t$ oss i% key is re"&ce" in siAe
7n!$i" ch$nge o% type
Sin,e t-e &ata e9ists in bot- t-e ori6inal table an& tem+orary table &urin6 ,onversion/ t-e stora6e
reHuirements in,rease &urin6 ,onversion. 0) t-e tables+a,e over)lo*s *-en you reloa& t-e &ata )rom
t-e tem+orary table/ t-e ,onversion *ill terminate. 0n t-is ,ase/ you must e9ten& t-e tables+a,e an&
start t-e ,onversion in t-e &atabase utility a6ain.
0) you s-orten t-e 'ey o) a table @)or e9am+le/ *-en you remove or s-orten t-e )iel& len6t- o) 'ey
)iel&sA/ you ,annot &istin6uis- bet*een t-e ne* 'eys o) e9istin6 re,or&s o) t-e table. #-en you
reloa& t-e &ata )rom t-e tem+orary table/ only one o) t-ese re,or&s ,an be loa&e& ba,' into t-e table.
0t is not +ossible to say *-i,- re,or& t-is *ill be. 0) you *ant to ,o+y ,ertain re,or&s/ you -ave to
,lean u+ t-e table be-ore t-e ,onversion.
Durin6 a ,onversion/ t-e &ata is ,o+ie& ba,' to t-e &atabase table )rom t-e tem+orary table *it- t-e
A7A statement M2:3$%2RR3S21D01!. "-ere)ore/ only t-ose ty+e ,-an6es t-at ,an be
e9e,ute& *it- M2:3$%2RR3S21D01! are allo*e&. All ot-er ty+e ,-an6es ,ause t-e ,onversion
to be terminate& *-en t-e &ata is loa&e& ba,' into t-e ori6inal table. 0n t-is ,ase/ you -ave to
re,reate t-e ol& state +rior to ,onversion. 8sin6 &atabase tools/ you -ave to &elete t-e table/ rename
t-e Q%M table to its ol& name/ re,onstru,t t-e runtime obDe,t @in t-e &atabase utilityA/ set t-e table
stru,ture in t-e Di,tionary ba,' to its ol& state/ an& t-en a,tivate t-e table.
SA A! "A#12 B$10
SAP AG 2002
:es&'ing Ter'in$te" Con!ersions
Wh$t yo& sho&" "o
Sysog
3b0ect og
*&'ps
Wh$t yo& sho&" not "o
0) a ,onversion terminates/ t-e lo,' entry )or t-e table set in t-e )irst ste+ is retaine&. "-e table ,an
no lon6er be e&ite& *it- t-e maintenan,e tools o) t-e A7A Di,tionary @"ransa,tion S311A.
A terminate& ,onversion ,an be analy<e& *it- t-e &atabase utility @"ransa,tion S314A an& t-en
resume&. "-e &atabase utility +rovi&es an analysis tool *it- *-i,- you ,an )in& t-e ,ause o) t-e
error an& t-e ,urrent state o) all t-e tables involve& in t-e ,onversion.
Eou ,an usually )in& t-e +re,ise reason )or termination in t-e ob6ect lo. 0) t-e obDe,t lo6 &oes not
+rovi&e any in)ormation about t-e ,ause o) t-e error/ you -ave to analy<e t-e syslo or t-e short
dumps.
0) t-ere is a terminate& ,onversion/ t*o o+tions are &is+laye& as +us-buttons in t-e &atabase utility(
A)ter ,orre,tin6 t-e error/ you ,an resume t-e ,onversion *-ere it terminate& *it- t-e Continue
ad6ustment o+tion.
"-ere is also t-e ;nloc1 table o+tion. "-is o+tion only &eletes t-e e9istin6 lo,' entry )or t-e
table . Eou s-oul& ne/er ,-oose ;nloc1 table )or a terminate& ,onversion i) t-e &ata only e9ists in
t-e tem+orary table/ )or e9am+le/ i) t-e ,onversion terminate& in ste+s 3 or 4.
SA A! "A#12 B$11
SAP AG 2002
Appen" Str&ct&res 1
&ield $ &ield 2 &ield 3 &ield A &ield B
5a)le
/ie" 2 /ie" 3 /ie" 1
Append structure
/ie" A /ie"
B
A++en& stru,tures +ermit you to a++en& ,ustomer )iel&s to a SA stan&ar& table *it-out -avin6 to
mo&i)y t-e table &e)inition.
An a++en& stru,ture is a stru,ture t-at is assi6ne& to e9a,tly one table. "-ere ,an be several a++en&
stru,tures )or a table.
#-en a table is a,tivate&/ all t-e a,tive a++en& stru,tures )or t-e table are )oun& an& t-eir )iel&s are
a++en&e& to t-e table. 0) an a++en& stru,ture is ,reate& or ,-an6e&/ t-e table to *-i,- it is assi6ne& is
also a,tivate& an& t-e ,-an6es also ta'e e))e,t t-ere *-en it is a,tivate&.
5i'e all stru,tures/ an a++en& stru,ture &e)ines a ty+e t-at ,an be use& in A7A +ro6rams.
#it- Release 4.6%/ you ,an &e)ine )orei6n 'eys )or )iel&s t-at alrea&y e9ist in t-e table usin6 an
a++en& stru,ture. Sear,- -el+s ,an also be atta,-e& to )iel&s t-at alrea&y e9ist in t-e table.
SA A! "A#12 B$12
SAP AG 2002
Appen" Str&ct&res 2
/ew SAP 6ersion is
imported
&ield $ &ield 2 &ield 3 &ield A &ield B
Append structure
/ie" A/ie" B
5a)le
/ie" 2 /ie" 3 /ie" 1
/ie" 2 /ie" 3 /ie" 1 /ie" <
%ustomers ,reate a++en& stru,tures in t-eir names+a,e. "-e a++en& stru,tures are t-us +rote,te&
a6ainst over*ritin6 &urin6 an u+6ra&e.
"-e ne* versions o) t-e stan&ar& tables are im+orte& &urin6 t-e u+6ra&e. #-en t-e stan&ar& tables
are a,tivate&/ t-e )iel&s ,ontaine& in t-e a,tive a++en& stru,tures are a++en&e& to t-e ne* stan&ar&
tables. #-en a++en& stru,tures are a&&e& to a table/ you &o not -ave to manually a&Dust t-e ,ustomer
mo&i)i,ations to t-e ne* SA version o) t-e table @"ransa,tion SDDA &urin6 t-e u+6ra&e.
"-e or&er o) t-e )iel&s in t-e A7A Di,tionary ,an &i))er )rom t-e or&er o) t-e )iel&s in t-e &atabase.
Eou &o not -ave to ,onvert t-e table *-en you a&& an a++en& stru,ture or insert )iel&s in an e9istin6
a++en& stru,ture. "-e ne* )iel&s are sim+ly a++en&e& to t-e table in t-e &atabase. Eou ,an al*ays
a&Dust t-e stru,ture by a&Dustin6 t-e &atabase ,atalo6 @A5"3R "A753A.
SA A! "A#12 B$13
SAP AG 2002
Appen" Str&ct&res 3
Append t(e field
on t(e data)ase
5a)le
Acti6ate
&ield $ &ield 2 &ield 3 &ield A &ield B &ield
-
Append structure
/ie" A /ie" B
/ie" 2 /ie" 3 /ie" 1 /ie" <
"-e ne* version o) t-e SA stan&ar& table is a,tivate& an& t-e ne* )iel& is a++en&e& to t-e &atabase
table.
lease note t-e )ollo*in6 +oints about a++en& stru,tures(
1o a++en& stru,tures may be ,reate& )or +oole& an& ,luster tables.
0) a lon6 )iel& @&ata ty+e 5%>R or 5RA#A o,,urs in a table/ it ,annot be e9ten&e& *it- a++en&
stru,tures be,ause su,- lon6 )iel&s must al*ays be in t-e last +osition o) t-e )iel& list @)or
e9am+le/ t-ey must be t-e last )iel& o) t-e tableA.
0) you as a ,ustomer a&& an a++en& stru,ture to an SA table/ t-e )iel&s in t-is a++en& stru,ture
s-oul& be in t-e ,ustomer names+a,e )or )iel&s/ t-at is t-ey s-oul& be6in *it- EE or PP. "-is
+revents name ,ollisions *it- ne* )iel&s inserte& in t-e stan&ar& table by SA.
0) you as a +artner -ave your o*n reserve& names+a,e )or your &evelo+ments/ t-e )iel&s you sele,t
in a++en& stru,tures s-oul& al*ays lie in t-is names+a,e.
SA A! "A#12 B$14
SAP AG 2002
S&''$ry
The r&nti'e ob0ect $n" "$t$b$se "e%inition o% $ t$be '&st
$($ys be consistent. /or this re$son; the correspon"ing
"$t$b$se t$be '&st be $"0&ste" (hen yo& ch$nge $ t$be
in the ABAP *iction$ry.
The syste' $($ys tries to '$ke str&ct&re ch$nges to
t$bes by ch$nging the "$t$b$se c$t$og (A6T5: TAB65). 7%
this is not possibe; $ con!ersion t$kes p$ce.
7n $ con!ersion; the "$t$ is store" in $ te'por$ry t$be $n"
then copie" b$ck to the t$be (ith its ne( str&ct&re.
C&sto'er %ie"s sho&" $($ys be $""e" to SAP st$n"$r"
t$bes &sing $ppen" str&ct&res.
SA A! "A#12 B$15
9&an"es to Database Tables Exercses
1nt: 9&an"es to Database Tables
At t-e ,on,lusion o) t-ese e9er,ises/ you *ill be able to(
Ma'e ,-an6es to e9istin6 obDe,ts
%onvert tables
3n-an,e stan&ar& tables *it- a++en& stru,tures *it-out
mo&i)yin6 t-em
"-e ori6inal &esi6n o) em+loyee mana6ement is no lon6er a++ro+riate
a)ter some or6ani<ational ,-an6es at t-e airlines. 0t is t-ere)ore ne,essary
to ma'e small ,-an6es to obDe,ts alrea&y ,reate& in +revious e9er,ises.
"-ese ,-an6es *ill be ma&e in t-is e9er,ise.
1$1 "-e &esi6n o) table P=5%R3#SS is no lon6er a++ro+riate. "-e )iel& )or t-e role o)
t-e em+loyee &urin6 t-e )li6-t is too lon6. %orre,t t-is error by re&u,in6 t-e )iel&
len6t- to 15 +la,es.
%reate a ne* &ata element PR253SS an& re+la,e t-e e9istin6 &ata element *it- t-e
ne* one. #-en you &e)ine &ata element PR253SS/ &o not use a &omainG instea&/
enter t-e &ata ty+e an& len6t- &ire,tly *-en you &e)ine t-e &ata element. A,tivate
t-e table.
1$2 "-e em+loyees *it- mana6ement or maintenan,e )un,tions -ave t-eir *or'+la,e at
an air+ort. Re,or& in)ormation about -o* to rea,- t-ese em+loyees in table
P3M52ESS( a tele+-one number )or rea,-in6 maintenan,e em+loyees at t-e
air+ort an& an o))i,e lo,ation or *-ere t-e a&ministrative em+loyees *or'.
%reate an a++en& stru,ture )or table P3M52ESS ,ontainin6 t-e )ollo*in6
in)ormation(
Field Data element
<<Airport S7(;:*4:T
<<7ffice S7)1:E(184
<<Telephone S7TE$84
1ote( t-e )iel& names in an a++en& stru,ture must lie in t-e
,ustomer names+a,e )or )iel&s. "-e )iel& names s-oul& t-ere)ore
be6in *it- PP or EE.
SA A! "A#12 B$16
1$3 %reate a suitable )orei6n 'ey )or )iel& <<Airport o) t-e a++en& stru,ture.
"-e table o) all air+orts is ,alle& SA0R2R".
=or a complete de-nton o- t&e -ore"n %ey, you must also /er-y
a -eld o- t&e appendn" table ?2E3*$4566@.
Start ro6ram 7%430J%>3%I *it- "ransa,tion S33C a)ter t-is
e9er,ise. "-e +ro6ram ,-e,'s *-et-er your solutions are ,orre,t.
SA A! "A#12 B$1B
9&an"es to Database Tables Solutons
1nt: 9&an"es to Database Tables
1$1 !o to ,-an6e mo&e in t-e maintenan,e s,reen )or table P=5%R3#SS. "a'e t-e
)ollo*in6 ste+s.
1A 2ver*rite &ata element S3MJR253 in ,olumn Field type *it- t-e name
o) your &ata element PR253SS. Save t-e ,-an6e.
2A Sele,t t-e name PR253SS. 0n t-e ne9t &ialo6 bo9/ ,on)irm t-at you *ant to
,reate t-e &ata element.
3A "-e maintenan,e s,reen )or &ata elements a++ears. 3nter a s-ort te9t.
4A Sele,t tab +a6e Definition. %-oose 'uilt)in type. Eou ,an no* enter values
)or )iel&s Datatype/ Lenth" an& Decplaces. 3nter %>AR as &ata ty+e an&
15 as len6t-.
5A 2n tab +a6e Field label/ maintain t-e te9t )or t-e &ata element.
6A A,tivate t-e &ata element.
BA !oto t-e a,tivation lo6. Eou are remin&e& t-at s-ortenin6 t-e )iel& reHuires
a ,onversion o) table P=5%R3#SS.
CA !o ba,' to t-e table maintenan,e s,reen.
;A 1avi6ate to t-e &atabase utility *it- ,tilities Database utility.
10A %-oose Acti8ate and ad6ust database. %on)irm t-e ne9t se,urity Huery. "-e
system ,onverts t-e table.
1$2 "o &e)ine t-e a++en& stru,ture )or table P3M52ESS(
1A !o to &is+lay mo&e in t-e maintenan,e s,reen )or table P3M52ESS.
2A %-oose +oto Append structure.
3A 0n t-e ne9t &ialo6 bo9/ enter t-e reHuire& name )or t-e a++en& stru,ture. 0t
must satis)y t-e usual namin6 ,onventions. %-oose Continue.
4A "-e maintenan,e s,reen )or t-e a++en& stru,ture is &is+laye&. Maintenan,e
o) t-e a++en& stru,ture is analo6ous to t-at )or a stru,ture.
5A 3nter a s-ort te9t an& insert )iel&s PPAirport/ PP7ffice" an& PPTelephone
*it- t-e s+e,i)ie& &ata elements.
6A 1ote( all t-e )iel&s o) an a++en& stru,ture must lie in t-e ,ustomer
names+a,e. "-e )iel& names t-ere)ore must be6in *it- PP or EE.
BA A,tivate t-e a++en& stru,ture. Dis+lay t-e a,tivation lo6 *it- ,tilities
Activation log.
SA A! "A#12 B$1C
"able P3M52ESS automati,ally a&Duste& *-en you a,tivate t-e a++en& stru,ture.
"-e ne* )iel&s are a++en&e& to t-e e9istin6 )iel&s in t-e &atabase.
1$3 "-e )orei6n 'ey must be &e)ine& in t-e a++en& stru,ture maintenan,e routine. Eou
,an 6o t-ere eit-er by enterin6 its name as &ata ty+e in t-e initial s,reen o) t-e
A7A Di,tionary an& ,-oosin6 Chane or *it- +oto Append structure in t-e
maintenan,e s,reen )or table P3M52ESS. "a'e t-e )ollo*in6 ste+s(
1A la,e t-e ,ursor on )iel& Airport. %-oose t-e 'ey i,on. %o+y t-e system
+ro+osal.
2A "-e maintenan,e s,reen )or t-e )orei6n 'ey a++ears. "-e ,-e,' table an& t-e
)iel& assi6nments are alrea&y )ille& &ue to t-e system +ro+osal. 3nter a
suitable Short description.
3A "-e )orei6n 'ey ,annot be )ully s+e,i)ie& usin6 Dust t-e a++en& stru,ture
sin,e t-e 'ey o) ,-e,' table SA0R2R" ,ontains bot- a ,lient )iel& an& an
air+ort ,o&e/ *-ile t-e a++en& stru,ture -as no ,lient )iel&. Eou s-oul&
veri)y t-at t-e ,lient )iel& is su++lie& )rom t-e a++en& table P3M52ESS.
4A %-oose ,on)1ey)fields / candidates as t-e ty+e o) )orei6n 'ey )iel&s @sin,e
t-e Air+ort )iel& is not a 'ey )iel& o) table P3M52ESSA an& as ,ar&inality
C @sin,e not every em+loyee is assi6ne& to an air+ortA to C, @sin,e several
em+loyees ,an be assi6ne& to t-e same air+ortA.
5A %-oose Copy an& a,tivate t-e a++en& stru,ture.
SA A! "A#12 B$1;
SAP AG 2002
Why "o yo& nee" !ie(sH
Cre$ting $ !ie( by 0oin; pro0ection; $n" seection
Goin con"itions $n" %oreign keys
Seection o% "$t$ (ith !ie(s
*$t$b$se !ie(s
4$inten$nce !ie(s
7nner $n" o&ter 0oins
8ie(s
SA A! "A#12 C$1
SAP AG 2002
Co&rse 3b0ecti!es
At the en" o% this &nit; yo& (i be $be to-
G&"ge ho( $ !ie( is cre$te" %ro' t$bes (ith 0oin;
pro0ection; $n" seection
Cre$te "$t$b$se !ie(s
Set &p $ ink bet(een %oreign keys $n" 0oin con"itions
2se !ie(s in progr$'s %or "$t$ seection
G&"ge (hen to &se '$inten$nce !ie(s
:ecogniAe the "i%%erence bet(een $n inner 0oin $n" $n
o&ter 0oin
SA A! "A#12 C$2
SAP AG $%%%
&3 &2 &$
&- &B
&? &C &@
5a)le 3
5a)le 2
5a)le $
8ie( on the t$bes
8ie( on "$t$
th$t is
"istrib&te" on
'ore th$n one
t$be
Why "o yo& #ee" 8ie(sH
/1 /2 /3 /1 /E
Data )or an a++li,ation obDe,t is o)ten &istribute& on several &atabase tables. Database systems
t-ere)ore +rovi&e you *it- a *ay o) &e)inin6 a++li,ation$s+e,i)i, vie*s on &ata in several tables.
"-ese are ,alle& vie*s.
Data )rom several tables ,an be ,ombine& in a meanin6)ul *ay usin6 a vie* @DoinA. Eou ,an also -i&e
in)ormation t-at is o) no interest to you @+roDe,tionA or only &is+lay t-ose &ata re,or&s t-at satis)y
,ertain ,on&itions @sele,tionA.
"-e &ata o) a vie* ,an be &is+laye& e9a,tly li'e t-e &ata o) a table in t-e e9ten&e& table
maintenan,e.
SA A! "A#12 C$3
SAP AG 2002
T$be
TABA
T$be
TABB
$ $
$ 2
2
2
5e"t $ 5e"t 3
5e"t -
5e"t B
5e"t 2
5e"t ?
A
A
B
B
&ield $ &ield 2 &ield 3 &ield - &ield B
&ield $ &ield 2 &ield 3 &ield - &ield B
$ 5e"t $
$ 5e"t $
$ 5e"t $
$ 5e"t $
2 5e"t 2
2 5e"t 2
2 5e"t 2
2 5e"t 2
$
$
2
2
5e"t 3
5e"t -
5e"t B
5e"t ?
A
A
B
B
$
$
2
2
5e"t 3
5e"t -
5e"t B
5e"t ?
A
A
B
B
Cross.pro"&ct o%
t$bes TABA $n"
TABB
Str&ct&re o% $ 8ie( . St$rting Sit&$tion
"-e stru,ture o) a vie* an& sele,tion o) t-e &ata usin6 t-is vie* *ill be s-o*n *it- an e9am+le.
!iven t*o tables "A7A an& "A77. "able "A7A ,ontains t*o entries an& table "A77 4 entries.
"-e tables are )irst a++en&e& to one anot-er. "-is results in t-e ,ross$+ro&u,t o) t-e t*o tables/ in
*-i,- ea,- re,or& o) "A7A is ,ombine& *it- ea,- re,or& o) "A77.
SA A! "A#12 C$4
SAP AG $%%%
Doin condition: 5ABA . &ield $ E 5ABB . &ield 3
&ield $ &ield 2 &ield 3 &ield - &ield B
$ 5e"t $
$ 5e"t $
$ 5e"t $
$ 5e"t $
2 5e"t 2
2 5e"t 2
2 5e"t 2
2 5e"t 2
$
$
2
2
5e"t 3
5e"t -
5e"t B
5e"t ?
A
A
B
B
$
$
2
2
5e"t 3
5e"t -
5e"t B
5e"t ?
A
A
B
B
:e"&ction o%
the cross.
pro"&ct
Str&ct&re o% $ 8ie( . Goin Con"ition
8sually t-e entire ,ross$+ro&u,t is not a meanin6)ul sele,tion. Eou s-oul& t-ere)ore limit t-e ,ross$
+ro&u,t *it- a Doin ,on&ition. "-e Doin ,on&ition &es,ribes -o* t-e re,or&s o) t-e t*o tables are
relate&.
0n our e9am+le/ =iel& 3 o) "A77 i&enti)ies =iel& 1 o) "A7A. "-e Doin ,on&ition is t-en(
"A7A $ =iel& 1 K "A77 $ =iel& 3
#it- t-is Doin ,on&ition/ all t-e re,or&s *-ose entry in =iel& 1 is not i&enti,al to t-e entry in =iel& 3
are remove& )rom t-e ,ross +ro&u,t. "-e ,olumn )or =iel& 3 in t-e vie* is t-ere)ore unne,essary.
SA A! "A#12 C$5
SAP AG $%%%
&ield $ &ield 2 &ield - &ield B
$ 5e"t $
$ 5e"t $
2 5e"t 2
2 5e"t 2
5e"t 3
5e"t -
A
B
5e"t B
5e"t ?
A
B
&ield $ &ield 2 &ield B
$ 5e"t $
$ 5e"t $
2 5e"t 2
2 5e"t 2
5e"t 3
5e"t -
5e"t B
5e"t ?
Projection
Str&ct&re o% $ 8ie( . /ie" Seection (Pro0ection)
2)ten some o) t-e )iel&s o) t-e tables involve& in a vie* are o) no interest. Eou ,an e9+li,itly &e)ine
t-e set o) )iel&s to be in,lu&e& in t-e vie* @+roDe,tionA.
0n our e9am+le/ =iel& 4 is o) no interest an& ,an t-ere)ore be -i&&en.
SA A! "A#12 C$6
SAP AG 2002
Selection condition: 5ABB . &ield - E FAG!
&ield $ &ield 2 &ield B
$ 5e"t $
$ 5e"t $
2 5e"t 2
2 5e"t 2
5e"t 3
5e"t -
5e"t B
5e"t ?
&ield $ &ield 2 &ield B
$ 5e"t $
$ 5e"t $
2 5e"t 2
2 5e"t 2
5e"t 3
5e"t -
5e"t B
5e"t ?
Str&ct&re o% $ 8ie( . Seection Con"ition
&ield -
A
B
A
B
"-e set o) re,or&s t-at ,an be &is+laye& *it- t-e vie* ,an be )urt-er restri,te& *it- a sele,tion
,on&ition.
0n our e9am+le/ only t-ose re,or&s *it- value ( in =iel& 4 s-oul& be &is+laye& *it- t-e vie*.
A sele,tion ,on&ition t-ere)ore ,an also be )ormulate& *it- a )iel& t-at is not ,ontaine& in t-e vie*.
SA A! "A#12 C$B
SAP AG 2002
MA/15 CA8831 C//31 &*1A5E BH31 C#S5M31
!!!
SB33?
MA/15 CA8831 C//31 C350&8M C3505
SP/67
!!! !!! !!!
00$
00$
SC2ST34 MA/15 31 C350 /AME
!!!
$223B? Smit( /ew 0ork 00$
!!!
$223B?
$223B?
!!!
!!!
00$
00$
/ew 0ork
5okyo Berlin
Berlin AA
AA
*+
*+
-@
32-
32-
-@
!!!
!!!
!!!
!!!
3?@%
3?%0
!!!
!!!
!!!
!!!
9o( $re T$bes 6inke" to 8ie(sH
Example: "ravel a6en,ies sometimes -ave to ,-e,' *-i,- ,ustomer is boo'e& on *-i,- )li6-ts.
"-e ,orres+on&in6 &ata is &istribute& on several tables(
( %ustomer &ata/ su,- as t-e ,ustomer number/ name an& a&&ress
S722I( 7oo'in6 &ata/ su,- as t-e ,arrier/ )li6-t number an& +assen6er @,ustomer numberA
S=50( =li6-t &ata/ su,- as t-e ,ity o) &e+arture an& ,ity o) arrival
Eou -ave to ,reate a vie* on tables S%8S"2M/ S722I an& S=50 to obtain t-e boo'in6 &ata.
0n t-is ,ase/ t-e Doin ,on&itions are(
S722I$MA1D" K S%8S"2M$MA1D"
S722I$%8S"2M0D K S%8S"2M$0D
S=50$MA1D" K S722I$MA1D"
S=50$%ARR0D K S722I$%ARR0D
S=50$%2110D K S722I$%2110D
SA A! "A#12 C$C
SAP AG 2002
MA/15 31 /AME C350 CA8831 C//31 &*1A5E BH31 C350&8M C3505
00$
00$
$223B? Smit( /ew 0ork AA -@ 3?@% /ew 0ork Berlin
$223B? Smit( /ew 0ork *+ 32- 3?%0 Berlin 5okyo
<iew SC#S;BH for customer )ookin's
Str&ct&re o% the 8ie(
-!%!$%%%
%!%!$%%%
Eou ,an 6et t-e boo'in6s )or a +arti,ular ,ustomer by sele,tin6 t-e ,orres+on&in6 re,or&s )or 'eys
MA1D" an& %8S"2M0D in table S722I.
Eou ,an 6et t-e )li6-t &ata )rom table S=50 )or ea,- boo'in6 in table S722I by sele,tin6 t-e
,orres+on&in6 re,or& )or t-e 'eys MA1D"/ %ARR0D an& %2110D )rom table S=50.
Eou ,an &is+lay only t-e ,ustomer boo'in6s t-at *ere not ,an,ele& usin6 t-e vie* *it- t-e
)ollo*in6 sele,tion ,on&ition(
S722I$%A1%353D QR 4
"-e Doin ,on&itions ,an also be &erive& )rom t-e e9istin6 )orei6n 'ey relations-i+s. %o+yin6 t-e Doin
,on&itions )rom t-e e9istin6 )orei6n 'eys is su++orte& in t-e maintenan,e transa,tion.
"-e )iel& names o) t-e un&erlyin6 table )iel&s are normally use& as )iel& names in t-e vie*.
>o*ever/ you ,an also ,-oose a &i))erent )iel& name. "-is is ne,essary )or instan,e i) t*o )iel&s *it-
t-e same name are to be ,o+ie& to t-e vie* )rom &i))erent tables. 0n t-is ,ase/ you must ,-oose a
&i))erent name )or one o) t-e t*o )iel&s in t-e vie*.
SA A! "A#12 C$;
SAP AG 2002
REPORT SAPBC430_FLIGHTS.
DATA: WA_FLIGHTS TYPE LINE_TYPE_FLIGHTS,
ITAB_FLIGHTS TYPE TABLE OF LINE_TYPE_FLIGHTS.
SELECT CARRID CARRNAME CONNID CITYFROM CITYTO FLDATE
SEATSMAX SEATSOCC INTO TABLE ITAB_FLIGHTS
FROM SV_FLIGHTS
WHERE CITYFROM IN SO_CITYF
AND CITYTO IN SO_CITYT
AND SEATSOCC SV_FLIGHTS!SEATSMAX
ORDER BY CARRID CONNID FLDATE.
IF SY"S#BRC $ 0.
WRITE: % &N' ('')*+,- ./*-01.
ENDIF.
*$t$ Seection (ith 8ie(s
Eou ,an also )ormulate t-e Doin ,on&ition &ire,tly in 231 SQ5.
Eou *oul& 6et t-e same result usin6 an 0nner ?oin(
SELECT C~CARRID C~CARRNAME P~CONNID P~CITYFROM P~CITYTO
F~FLDATE F~SEATSMAX F~SEATSOCC
INTO TABLE ITAB_FLIGHTS
FROM ( SCARR AS C INNER JOIN SPFLI AS P
ON C~CARRID = P~CARRID )
INNER JOIN SFLIGHT AS F
ON F~CARRID = P~CARRID AND F~CONNID = P~CONNID
WHERE CITYFROM IN SO_CITYF
AND CITYTO IN SO_CITYT
AND SEATSOCC < F~SEATSMAX
ORDER BY C~CARRID P~CONNID F~FLDATE.
A vie* -as ty+e ,-ara,ter an& ,an be a,,esse& in +ro6rams li'e all ot-er ty+es an& ,an be use& to
&e)ine &ata obDe,ts.
SA A! "A#12 C$10
SAP AG $%%%
Wh$t is "isp$ye" (ith the !ie(H
3nner join uter join
5a)le 5ABA 5a)le 5ABB
Doin condition
&ield $ &ield 2 &ield -
A 5e"t $
B 5e"t 2
5e"t 3
5e"t -
&ield $ &ield 2 &ield -
A 5e"t $
B 5e"t 2
5e"t 3
5e"t -
C Te)t 1
A
B
5e"t $
5e"t 2
&ield $ &ield 2
C Te)t 1
A
B
5e"t 3
5e"t -
&ield 3 &ield -
7nner $n" 3&ter Goins
"-e set o) &ata t-at ,an be sele,te& *it- a vie* 6reatly &e+en&s on *-et-er t-e vie* im+lements an
inner Doin or an outer Doin.
#it- an inner Doin/ you only 6et t-ose re,or&s *-i,- -ave an entry in all t-e tables in,lu&e& in t-e
vie*. #it- an outer Doin/ on t-e ot-er -an&/ t-ose re,or&s t-at &o not -ave a ,orres+on&in6 entry in
some o) t-e tables in,lu&e& in t-e vie* are also sele,te&.
"-e -it list )oun& *it- an inner Doin ,an t-ere)ore be a subset o) t-e -it list )oun& *it- an outer Doin.
Database vie*s im+lement an inner Doin. Eou only 6et t-ose re,or&s *-i,- -ave an entry in all t-e
tables in,lu&e& in t-e vie*.
Maintenan,e vie*s im+lement an outer Doin.
SA A! "A#12 C$11
SAP AG $%%%
&? &C &@
5a)le 3
&- &B
5a)le 2
&3 &2 &$
5a)le $
<iew definition in t(e ABAP 1ictionary
<iew definition in
t(e data)ase
3s created in t(e 1B
durin' acti6ation
ABAP pro'ram
/1 /2 /3 /1 /E
&$ &2 &3 &B &@
*$t$b$se 8ie(s
1ata)ase interface
A &atabase vie* is &e)ine& in t-e A7A Di,tionary an& automati,ally ,reate& on t-e &atabase &urin6
a,tivation. A,,esses to a &atabase vie* are +asse& &ire,tly to t-e &atabase )rom t-e &atabase
inter)a,e. "-e &atabase so)t*are +er)orms t-e &ata sele,tion.
0) t-e &e)inition o) a &atabase vie* is ,-an6e& in t-e A7A Di,tionary/ t-e vie* ,reate& on t-e
&atabase must be a&Duste& to t-is ,-an6e. Sin,e a vie* &oes not ,ontain any &ata/ t-is a&Dustment is
ma&e by &eletin6 t-e ol& vie* &e)inition an& ,reatin6 t-e vie* a6ain in t-e A7A Di,tionary *it- its
ne* &e)inition.
"-e maintenan,e status &e)ines *-et-er you ,an only rea& *it- t-e vie* or *-et-er you ,an also
*rite *it- it. 0) a &atabase vie* *as &e)ine& *it- more t-an one table/ t-is vie* must be rea& only.
"-e &ata rea& *it- a &atabase vie* ,an be bu))ere&. :ie* &ata is bu))ere& analo6ously to tables. "-e
te,-ni,al settin6s o) a &atabase vie* ,ontrol *-et-er t-e vie* &ata may be bu))ere& an& -o* t-is
s-oul& be &one. "-e same settin6s @bu))erin6 ty+esA ,an be use& -ere as )or table bu))erin6. "-e
bu))ere& vie* &ata is invali&ate& *-en t-e &ata in one o) t-e base tables o) t-e vie* ,-an6es.
SA A! "A#12 C$12
SAP AG 2002
7nc&"es in *$t$b$se 8ie(s
/ E / D
TABB TABB
inc&"e" in inc&"e" in
!ie( !ie(
*$t$b$se !ie( on TABA; TABB $n" TABC
TABB TABA TABC
/ 1 / 3 / < / 1 / B / < / 1 / B / E
/ 2 / 3 / 1 / 1 / B / <
Eou ,an in,lu&e entire tables in &atabase vie*s. 0n t-is ,ase/ all t-e )iel&s o) t-e in,lu&e& table
be,ome )iel&s o) t-e vie* @*-ereby you ,an e9+li,itly e9,lu&e ,ertain )iel&sA. 0) ne* )iel&s are
in,lu&e& in t-e table or e9istin6 )iel&s are &elete&/ t-e vie* is automati,ally a&Duste& to t-is ,-an6e.
A ne* or &elete& )iel& is t-ere)ore automati,ally in,lu&e& in t-e vie* or &elete& )rom it.
0) an a++en& stru,ture is a&&e& to a table in,lu&e& in a vie*/ t-e )iel&s a&&e& *it- t-e a++en&
stru,ture are automati,ally in,lu&e& in t-e vie*.
"o in,lu&e a table in a vie*/ you must enter an asteris' @VA in )iel& 2ie! field in t-e vie*
maintenan,e/ enter t-e name o) t-e table to be in,lu&e& in t-e )iel& Table" an& enter V a6ain in t-e
)iel& Field name.
0) you &o not *ant to insert a )iel& o) t-e in,lu&e& table in t-e vie*/ you must enter a -y+-en @$A in
)iel& 2ie! field/ t-e name o) t-e in,lu&e& table in )iel& Table" an& t-e name o) t-e )iel& to be
e9,lu&e& in )iel& Field name.
As o) Release 4.6%/ )iel&s o) t-e base tables o) a &atabase vie* ,an be in,lu&e& in t-e vie* *it-out
mo&i)i,ations usin6 an a++en& vie*. "-is is analo6ous to en-an,in6 a table usin6 an a++en&
stru,ture. An a++en& vie* is assi6ne& to exactly one &atabase vie*. 7ut more t-an one a++en& vie*
,an be ,reate& )or a &atabase vie*.
SA A! "A#12 C$13
SAP AG $%%%
&? &C &@
5a)le 3
&3 &2 &$
5a)le $
5a)le 2
&- &B
Maintenance
6iew on t(e
ta)les
1ata e"c(an'e wit(
t(e maintenance 6iew
&orei'n key &orei'n key
/1 /2 /3 /1 /E
4$inten$nce 8ie(s
Appic$tion ob0ect
Data t-at is &istribute& on more t-an one table o)ten )orms a lo6i,al unit/ ,alle& an a++li,ation obDe,t.
Eou s-oul& be able to &is+lay/ ,-an6e an& ,reate t-e &ata o) su,- an a++li,ation obDe,t to6et-er.
8sers usually are not intereste& in t-e te,-ni,al im+lementation o) t-e a++li,ation obDe,t/ su,- as t-e
&istribution o) t-e &ata on several tables.
Eou ,an maintain ,om+le9 a++li,ation obDe,ts in a sim+le *ay usin6 a maintenan,e vie*. "-e &ata is
automati,ally &istribute& on t-e un&erlyin6 &atabase tables.
All t-e tables use& in a maintenan,e vie* must be lin'e& *it- a )orei6n 'ey. "-is means t-at t-e Doin
,on&itions are al*ays &erive& )rom t-e )orei6n 'ey in t-e maintenan,e vie*. Eou ,annot enter t-e
Doin ,on&itions &ire,tly as in a &atabase vie*.
A maintenan,e inter)a,e *it- *-i,- t-e &ata o) t-e vie* ,an be &is+laye&/ ,-an6e& an& ,reate& must
be 6enerate& )rom t-e &e)inition o) a maintenan,e vie* in t-e A7A Di,tionary.
#-en t-e maintenan,e inter)a,e is ,reate&/ )un,tion mo&ules t-at &istribute t-e &ata maintaine& *it-
t-e vie* on t-e un&erlyin6 tables are automati,ally 6enerate&.
"-e maintenan,e inter)a,e is 6enerate& *it- t-e "ransa,tion Generate Table 2ie! @"ransa,tion
S354A or )rom t-e vie* maintenan,e s,reen *it- ;tilities 23 Tab+maint+enerator.
SA A! "A#12 C$14
SAP AG 2002
2nit S&''$ry
*$t$ recor"s th$t $re "istrib&te" on "i%%erent t$bes c$n be
co'bine" &sing $ !ie(.
A !ie( is "eri!e" %ro' the t$bes in!o!e" &sing the
re$tion$ oper$tors 0oin; pro0ection; $n" seection.
ABAP progr$'s c$n seect "$t$ &sing $ !ie(. Seection
(ith $ "$t$b$se !ie( is &s&$y %$ster th$n "irect t$be
seection (ith $ neste" S565CT st$te'ent.
>o& c$n '$int$in "$t$ recor"s %ro' se!er$ t$bes
together &sing $ '$inten$nce !ie(.
SA A! "A#12 C$15
Exercses
1nt: Ge.s
At t-e ,on,lusion o) t-ese e9er,ises/ you *ill be able to(
%reate vie*s
De)ine Doin ,on&itions
7u))er &atabase vie*s
"-e &ata e9istin6 )or an em+loyee is &istribute& on several tables
@,orres+on&in6 to t-e relational &ata mo&elA. =or some e9er,ises/
-o*ever/ a ,om+lete vie* on t-is &ata is nee&e&. 0n t-is e9er,ise/ t-e
,orres+on&in6 vie*s are im+lemente& by ,reatin6 vie*s.
1$1 "-e )li6-t +ersonnel @all +ilots an& ste*ar&sA must be sele,te& *-en a )li6-t ,re* is
set u+. 1ot all t-e &ata in table P3M52ESS may be &is+laye& *-en t-is &ata is
a,,esse&G )or e9am+le/ t-e em+loyee settin6 u+ t-e teams may not see t-e salary o)
t-e ,re* members. "-e tele+-one number o) t-e em+loyeeWs &e+artment s-oul& be
out+ut in ,ase o) Huestions.
1$1$1 %reate a suitable &atabase vie* P3M=5ESS t-at satis)ies t-ese
reHuirements. "-e )ollo*in6 in)ormation about an em+loyee s-oul& be
&is+laye&(
Client
Carrier
Personnel number
First name
Last name
Telephone number of the department
Department code
1$1$2 Ma'e sure t-at only )li6-t +ersonnel ,an be sele,te& *it- t-e vie*.
1$1$3 Eou +robably *ill -ave to @)reHuentlyA a,,ess t-e &ata usin6 t-e vie*. "-e
sele,te& &ata s-oul& t-ere)ore be bu))ere& in or&er to in,rease +er)orman,e.
%-oose full bufferin as bu))erin6 ty+e.
SA A! "A#12 C$16
1$2 Supplementary Exercse: %reate a maintenan,e vie* *it- t-e name
PAR"13RSS/ *it- *-i,- you ,an easily maintain ne* business +artners. "-e
business +artners are entere& in table S78SAR". A business +artner ,an be eit-er a
)li6-t ,ustomer or a travel a6en,y. 0) it is a travel a6en,y/ t-ere *ill be a
,orres+on&in6 entry in table S"RA:35A!.
"-e vie* s-oul& also +ermit you to maintain tables S78SAR" an& S"RA:35A!
at one time. 0n,lu&e all t-e ne,essary )iel&s o) t-e tables in t-e vie*.
!enerate t-e maintenan,e inter)a,e. 8se t-e )ollo*in6 +arameters(
Function roup$ 22)943066
Authori&ation roup$ S18;
4aintenance type$ one!step
78er8ie! screen$ <00
Maintain t-e &ata o) a ne* travel a6en,y usin6 t-e en-an,e& table maintenan,e
@System Services Table maintenance !-t/ table maint+.+
SA A! "A#12 C$1B
Solutons
1nt: Ge.s
1$1 "-e vie* s-oul& +ermit a vie* on &ata in tables P3M52ESS an& PD3M31"SS.
"o ,reate t-e vie*(
1A 0n t-e initial s,reen o) t-e A7A Di,tionary/ mar' obDe,t ty+e 2ie!/ enter t-e
obDe,t name 2E3*=$566 an& ,-oose Create.
2A A &ialo6 bo9 a++ears in *-i,- you s-oul& sele,t t-e vie* ty+e. Mar' Database
8ie! an& ,-oose Copy.
3A 3nter a s-ort te9t in t-e ne9t s,reen.
"-e vie* s-oul& &is+lay &ata about em+loyees @)rom table P3M52ESSA an&
&e+artments @)rom table PD3M31"SSA.
4A =irst enter table 2E3*$4566 in )iel& Tables.
5A %-oose #elationships. All t-e )orei6n 'ey relations-i+s o) table P3M52ESS
to ot-er tables are liste&. Mar' t-e relations-i+ to table PD3M31"SS an&
,-oose Copy.
6A "-e Doin ,on&itions are ,o+ie& )rom t-e )orei6n 'ey. 0n a &i))erent mo&e/ &is+lay
t-e )orei6n 'ey bet*een t-e t*o tables an& noti,e t-e relations-i+ bet*een t-e
)orei6n 'ey an& t-e Doin ,on&itions.
BA Eou no* -ave to ,o+y )iel&s )rom t-e tables to t-e vie*. Sele,t 2ie! fields.
CA %-oose Table fields. 0n t-e ne9t &ialo6 bo9/ mar' table P3M52ESS an& sele,t
Choose.
;A All t-e )iel&s o) table P3M52ESS are liste&. Mar' )iel&s Client/ Carrier/
Personnel number/ First name/ an& Last name. %-oose Copy. "-e )iel&s are
no* inserte& in t-e vie*.
10A A6ain ,-oose Table fields. 0n t-e &ialo6 bo9/ ,-oose table PD3M31"SS an&
insert )iel&s Department telephone an& Department code in t-e vie* as
&es,ribe& above.
2nly )li6-t +ersonnel s-oul& be sele,te& *it- t-e vie*. Eou ,an &e)ine t-is
restri,tion *it- a sele,tion ,on&ition.
11A %-oose Selection conditions.
12A "-e restri,tion *-et-er an em+loyee belon6s to t-e )li6-t +ersonnel is ,ontaine&
in )iel& P3M52ESS$Area. 3nter it in ,olumns "able an& =iel& name.
13A =li6-t +ersonnel are i&enti)ie& by t-e value = in )iel& Area. 3nter EC in t-e
,olumn 7perator an& J=J @in,lu&in6 t-e sin6le HuotesAin ,olumn Compar+
8alue.
Eou no* -ave to bu))er t-e vie*.
SA A! "A#12 C$1C
14A %-oose Goto Technical settins. "-e maintenan,e s,reen )or t-e te,-ni,al
settin6s o) t-e vie* a++ears. #it- t-e e9,e+tion o) some attributes t-at are
meanin6less )or vie*s an& *-i,- are t-ere)ore not &is+laye&/ t-e s,reen is
analo6ous to t-e ,orres+on&in6 maintenan,e s,reen )or tables.
15A Mar' 'ufferin s!itched on an& Fully buffered.
16A Save t-e te,-ni,al settin6s an& return to t-e vie* maintenan,e s,reen.
1BA A,tivate t-e vie*.
1$2 ro,ee& as )ollo*s(
1A 0n t-e initial s,reen o) t-e A7A Di,tionary/ mar' obDe,t ty+e 2ie!/ enter t-e
obDe,t name 2*(:T8E:66 an& ,-oose Create.
2A A &ialo6 bo9 a++ears in *-i,- you s-oul& sele,t t-e vie* ty+e. Mar'
4aintenance 8ie! an& ,-oose Copy.
3A 3nter a s-ort te9t in t-e ne9t s,reen.
Eou *ant to maintain t-e &ata in tables S78SAR" an& S"RA:35A! to6et-er
in t-e maintenan,e vie*. 0) you *ante& to enter a ne* +artner &ire,tly/ you
*oul& )irst -ave to enter it in table S78SAR". 2nly t-en ,oul& you enter t-e
,orres+on&in6 &ata in table S"RA:35A! @be,ause o) t-e e9istin6 )orei6n 'ey
,-e,' bet*een S78SAR" an& S"RA:35A!A. Eou t-ere)ore )irst -ave to
in,lu&e table S78SAR" in t-e &e)inition o) t-e maintenan,e vie*.
4A 3nter table S)1S*(:T in t-e )iel& Tables. "-e 'ey )iel&s o) t-is table are
automati,ally in,lu&e& in t-e vie* as )iel&s.
5A la,e t-e ,ursor in )iel& Tables on entry S78SAR". %-oose #elationships.
6A A &ialo6 bo9 a++ears listin6 all e9istin6 )orei6n 'ey relations-i+s o) table
S78SAR" to ot-er tables. Mar' t-e )orei6n 'ey relations-i+ to table
S"RA:35A! an& ,-oose Copy.
BA "-e Doin ,on&itions are ,reate& )rom t-e )orei6n 'ey. "-e Doin ,on&itions -ave
t-e )ollo*in6 )orm(
S78SAR"$MA1DA1" K S"RA:35A!$MA1D"
S78SAR"$78SAR"18M K S"RA:35A!$A!31%E18M
CA Eou no* -ave to in,lu&e t-e )iel&s o) bot- tables in t-e vie*. !o to tab +a6e
2ie! fields. osition t-e ,ursor on table S78SAR" an& ,-oose Table fields. A
list o) all t-e )iel&s o) t-e table a++ears. %-oose Select all an& t-en Copy.
;A 0n,lu&e all t-e )iel&s o) table S"RA:35A! *it- t-e e9,e+tion o) )iel&s
MA1D" an& A!31%E18M in t-e vie* in t-e same *ay. "-ese )iel&s are
lin'e& to t-e ,orres+on&in6 )iel&s o) table S78SAR" *it- t-e Doin ,on&itions
an& t-ere)ore s-oul& not a++ear in t-e vie*.
10A A,tivate t-e vie*.
1o* 6enerate a maintenan,e inter)a,e )or t-e vie*.
11A %-oose ,tilities Table maintenance generator.
12A 3nter aut-ori<ation 6rou+ S18; an& )un,tion 6rou+ PP7%430SS in t-e ne9t
s,reen.
SA A! "A#12 C$1;
13A Mar' maintenan,e ty+e one$ste+. Sele,t number 0100 as maintenan,e s,reen
number o) t-e overvie* s,reen.
14A %-oose Create. "-e &evelo+ment ,lass o) t-e )un,tion 6rou+ an& t-e 6enerate&
maintenan,e obDe,ts are +rom+te&. 0n bot- ,ases/ ,-oose 5o,al obDe,t.
15A %all t-e e9ten&e& table maintenan,e *it- t-e 6iven menu +at- an& enter t-e
&ata o) a ne* travel a6en,y. #it- t-e Data 7ro*ser @in t-e menu environment
o) t-e initial s,reen o) t-e A7A Di,tionaryA/ veri)y t-at t-e &ata o) t-e ne*
travel a6en,y *as *ritten in tables S78SAR" an& S"RA:35A!.
SA A! "A#12 C$20
<
SAP AG $%%%
7np&t hep in the :/3 Syste'
ABAP *iction$ry ob0ect se$rch hep
Selection met(od of a searc( (elp
1ialo' )e(a6ior of a searc( (elp
3nterface of a searc( (elp
Att$ching se$rch heps to %ie"s
Coecti!e se$rch heps $n" ee'ent$ry se$rch heps
Appen" se$rch heps
Se$rch 9eps
SA A! "A#12 ;$1
<.2
SAP AG 2002
Co&rse 3b0ecti!es
At the en" o% this &nit; yo& (i be $be to-
*e%ine $n inp&t hep process (ith $ se$rch hep
*e%ine $ se$rch hep (ith se!er$ $tern$ti!e se$rch
p$ths
2se the "i%%erent 'ech$nis's %or the se$rch hep
$tt$ch'ent to $ssign $ se$rch hep to $ screen %ie"
*eter'ine (hether $ screen %ie" h$s $n inp&t hep $n"
"eter'ine its %or'
5nh$nce $ coecti!e se$rch hep &sing $n $ppen" se$rch
hep (itho&t 'o"i%ic$tions
SA A! "A#12 ;$2
<.3
SAP AG 2002
SAP :/3 St$n"$r" /&nction- 7np&t 9ep
Carrier
&li'(t num)er
. . .
Maintenance of fli'(ts
*+
#o
.
*ep$rt. city Arri!$ city
Carrier
0<00 /r$nk%&rt #e( >ork
0<02 /r$nk%&rt #e( >ork
69
2<02 /r$nk%&rt Berin
... !!! !!!
/<
"-e in+ut -el+ @=4 -el+A is a stan&ar& )un,tion o) t-e R/3 System t-at +ermits t-e user to &is+lay a
list o) +ossible values )or a s,reen )iel&. A value ,an be &ire,tly ,o+ie& to an in+ut )iel& by list
sele,tion.
"-e )iel&s -avin6 an in+ut -el+ are s-o*n in t-e R/3 System by t-e in+ut -el+ 'ey to t-e ri6-t o) t-e
)iel&. "-is 'ey a++ears as soon as t-e ,ursor is +ositione& on t-e ,orres+on&in6 s,reen )iel&. "-e -el+
,an be starte& eit-er by sele,tin6 on t-is s,reen element or *it- )un,tion 'ey =4.
0) t-e number o) +ossible entries )or a )iel& is very lar6e/ you ,an limit t-e set o) &is+laye& values by
enterin6 )urt-er restri,tions.
"-e &is+lay o) t-e +ossible entries is en-an,e& *it- )urt-er use)ul in)ormation about t-e &is+laye&
values. "-is )eature is es+e,ially use)ul i) t-e )iel& reHuires t-e entry o) a )ormal 'ey.
Sin,e t-e in+ut -el+ is a stan&ar& )un,tion/ it s-oul& loo' an& be-ave t-e same t-rou6-out t-e entire
R/3 System. "-e &evelo+ment environment t-ere)ore +rovi&es tools )or assi6nin6 a stan&ar&i<e&
in+ut -el+ to a s,reen )iel&.
"-e +re,ise &es,ri+tion o) t-e in+ut -el+ )or a )iel& is usually &e)ine& by its semanti,s. =or t-is
reason/ t-e in+ut -el+ )or a )iel& is normally &e)ine& in t-e A7A Di,tionary.
SA A! "A#12 ;$3
<.4
SAP AG 2002
:e,&ire'ents o% the 7np&t 9ep
*eter'ine
the !$&es
*i$og (ith
the &ser
T$ke conte)t into consi"er$tion
:et&rn !$&es
A number o) reHuirements must be met )or t-e in+ut -el+ o) a s,reen )iel& @searc& -eldA(
0n)ormation @about t-e ,onte9tA 'no*n to t-e system must be ta'en into ,onsi&eration in t-e in+ut
-el+. "-is in,lu&es entries t-e user alrea&y ma&e in t-e ,urrent in+ut tem+late as *ell as
in)ormation obtaine& in +revious &ialo6 ste+s. 1ormally t-e in+ut -el+ uses t-e ,onte9t to limit t-e
set o) +ossible values.
"-e in+ut -el+ must &etermine t-e values t-at ,an be o))ere& to t-e user )or sele,tion. "-e &ata to
be &is+laye& as su++lementary in)ormation in t-e list o) +ossible values must also be &etermine&.
#-en t-e +ossible values are &etermine&/ t-e restri,tions resultin6 )rom t-e ,onte9t an& )rom
)urt-er sear,- ,on&itions s+e,i)ie& by t-e user must also be ta'en into ,onsi&eration.
"-e in+ut -el+ must -ol& a &ialo6 *it- t-e user. "-is &ialo6 al*ays ,ontains t-e +resentation o)
t-e +ossible values @*it- su++lementary in)ormationA in list )orm an& t-e +ossibility to sele,t a
value )rom t-is list. A sear,- tem+late in *-i,- t-e user ,an &e)ine ,on&itions )or t-e values to be
&is+laye& is also sometimes reHuire& .
0) t-e user sele,ts a value/ t-e in+ut -el+ must return t-e value to t-e sear,- )iel&. "-e in+ut
tem+late o)ten ,ontains more )iel&s @o)ten only &is+lay )iel&sA ,ontainin6 )urt-er e9+lanatory
in)ormation about t-e sear,- )iel&. "-e in+ut -el+ s-oul& also u+&ate t-e ,ontents o) t-ese )iel&s in
t-is ,ase.
SA A! "A#12 ;$4
<.5
SAP AG 2002
ABAP *iction$ry 3b0ect Se$rch 9ep
Search help
Seection
'etho"
*i$og beh$!ior
7nter%$ce
"-e A7A Di,tionary obDe,t searc& &elp is use& to &es,ribe an in+ut -el+. "-e &e)inition o) a sear,-
-el+ ,ontains t-e in)ormation t-e system nee&s to satis)y t-e &es,ribe& reHuirements.
"-e nter-ace o) t-e sear,- -el+ ,ontrols t-e &ata trans)er )rom t-e in+ut tem+late to t-e =4 -el+ an&
ba,'. "-e inter)a,e &e)ines t-e ,onte9t &ata to be use& an& t-e &ata to be returne& to t-e in+ut
tem+late *-en a value is sele,te&.
"-e nternal be&a/or o) t-e sear,- -el+ &es,ribes t-e =4 +ro,ess itsel). "-is in,lu&es t-e selecton
met&od *it- *-i,- t-e values to be &is+laye& s-oul& be &etermine& as *ell as t-e dalo" be&a/or
&es,ribin6 t-e intera,tion *it- t-e user.
As *it- a )un,tion mo&ule/ sear,- -el+s &istin6uis- bet*een t-e inter)a,e *it- *-i,- it e9,-an6es
&ata *it- ot-er so)t*are ,om+onents an& t-e internal be-avior @)or )un,tion mo&ules/ t-e latter is
&e)ine& by t-e sour,e te9tA.
0t only ma'es sense to &e)ine a sear,- -el+ i) t-ere is a me,-anism available *it- *-i,- t-e sear,-
-el+ ,an be a,,esse& )rom a s,reen. "-is me,-anism/ ,alle& t-e searc& &elp attac&ment, *ill be
&es,ribe& later.
5i'e t-e e&itor )or )un,tion mo&ules/ t-e e&itor )or sear,- -el+s also enables you to test an obDe,t.
Eou ,an t-us test t-e be-avior o) a sear,- -el+ *it-out assi6nin6 it to a s,reen )iel&.
SA A! "A#12 ;$5
<.6
SAP AG 2002
SP/67
SELECT * FROM SPFLI
WHERE CARRIER = 'LH '.
Seection 4etho" o% $ Se$rch 9ep
Carrier
&li'(t num)er
. . .
Maintenance of fli'(ts
*+
/<
"-e +ossible values &is+laye& )or a )iel& by t-e in+ut -el+ are &etermine& at runtime by a sele,tion
)rom t-e &atabase. #-en a sear,- -el+ is &e)ine&/ you must &e)ine t-e &atabase obDe,t )rom *-i,-
t-e &ata s-oul& be sele,te& by s+e,i)yin6 a table or a vie* as t-e selecton met&od.
0t ma'es sense to use a vie* as sele,tion met-o& i) t-e &ata about t-e +ossible values t-at is relevant
)or t-e in+ut -el+ is &istribute& on several tables. 0) t-is &ata is all in one table or in t-e
,orres+on&in6 te9t table/ you ,an use t-e table as a sele,tion met-o&. "-e system automati,ally
ensures t-at t-e te9t o) t-e te9t table is use& in t-e userWs lo6on lan6ua6e.
0) t-ere is not yet a vie* t-at ,ombines t-e &ata t-at is relevant )or an in+ut -el+/ you must )irst
,reate it in t-e A7A Di,tionary.
Maintenan,e vie*s may not be use& as t-e sele,tion met-o& )or sear,- -el+s. 1ormally a &atabase
vie* is use&. >o*ever/ you s-oul& note t-at &atabase vie*s @in t-e R/3 SystemA are al*ays ,reate&
*it- an inner Doin. As a result/ only t-ose values -avin6 an entry in ea,- o) t-e tables involve& are
o))ere& in t-e in+ut -el+. Sometimes t-e values s-oul& be &etermine& *it- an outer Doin. 0n t-is ,ase
you s-oul& ,-oose a -el+ vie* as t-e sele,tion met-o&. Eou ,an )in& more in)ormation about -el+
vie*s in t-e a++en&i9.
0) t-e sele,tion met-o& o) a sear,- -el+ is ,lient$&e+en&ent/ t-e +ossible values are only sele,te& in
t-e userWs lo6on ,lient.
SA A! "A#12 ;$6
<.7
SAP AG $%%%
Carrier
Connection num)er
1eparture city
Arri6al city
*imit display to B00
0I
*+
/o limit
*escription o% the *i$og Beh$!ior
#o
.
*ep$rt. city Arri!$ city
Carrier
0<00 /r$nk%&rt #e( >ork
0<02 /r$nk%&rt #e( >ork
69
2<02 /r$nk%&rt Berin
... !!! !!!
/<
F
LMN
"-e +ossible values are +resente& in t-e dalo" box -or dsplayn" t&e &t lst an& t-e user ,an sele,t
values )rom -ere. 0) t-e +ossible values are )ormal 'eys/ )urt-er in)ormation s-oul& also be
&is+laye&.
0) t-e -it list is very lar6e/ t-e user s-oul& be able to &e)ine )urt-er restri,tions )or t-e attributes o)
t-e entry. Restri,tin6 t-e set o) &ata in t-is *ay bot- in,reases t-e ,larity o) t-e list an& re&u,es t-e
system loa&. A&&itional ,on&itions ,an be entere& in a )urt-er &ialo6 *in&o*/ t-e dalo" box -or
restrctn" /alues.
"-e &ialo6 ty+e o) a sear,- -el+ &e)ines *-et-er t-e &ialo6 bo9 )or restri,tin6 values s-oul& be
&is+laye& be)ore &eterminin6 t-e -it list.
Eou must &e)ine t-e ,-ara,teristi,s to a++ear on eit-er @or bot-A o) t-e &ialo6 bo9es as parameters
in t-e sear,- -el+. Eou ,an use all t-e )iel&s o) t-e sele,tion met-o& @*it- t-e e9,e+tion o) t-e ,lient
)iel&A an& t-e non$'ey )iel&s o) your te9t table as +arameters.
Eou &e)ine *-i,- +arameter s-oul& a++ear in *-i,- &ialo6 bo9 @in *-at or&erA by assi6nin6 t-e
+arameters +ositions in t-e t*o &ialo6 bo9es. Eou ,an t-us use &i))erent +arameters @or &i))erent
or&ersA in t-e t*o &ialo6 bo9es.
"y+es must be &e)ine& )or sear,- -el+ +arameters *it- &ata elements. "-ese &e)ine t-e &is+lay in t-e
t*o &ialo6 bo9es. 0) not-in6 else is &e)ine&/ a +arameter uses t-e &ata element o) t-e ,orres+on&in6
)iel& o) t-e sele,tion met-o&.
SA A! "A#12 ;$B
<.8
SAP AG 2002
7nter%$ce o% $ Se$rch 9ep
#o
.
*ep$rt. city Arri!$ city
Carrier
0<00 /r$nk%&rt #e( >ork
0<02 /r$nk%&rt #e( >ork
69
Carrier
&li'(t num)er
. . .
0I
*+
Import
and export
Export
/<
/<
#-en you &e)ine a +arameter o) a sear,- -el+/ you must also &e)ine *-et-er it s-oul& be use& to
,o+y &ata to t-e in+ut -el+ @0M2R" +arameterA or *-et-er to return &ata )rom t-e in+ut -el+
@342R" +arameterA.
"-e 0M2R" an& 342R" +arameters o) a sear,- -el+ to6et-er ma'e u+ your inter)a,e. @"-is is
also analo6ous to )un,tion mo&ules.A
Eou ,an also &e)ine inter)a,e +arameters t-at &o not a++ear in eit-er t-e &ialo6 bo9 )or &is+layin6 t-e
-it list or t-e &ialo6 bo9 )or restri,tin6 values. "-is is use)ul )or e9am+le *-en s,reen )iel&s t-at &o
not a++ear on eit-er o) t-e t*o &ialo6 bo9es are to be u+&ate& *-en you sele,t a value.
"-e lo,ation )rom *-i,- t-e 0M2R" +arameters o) a sear,- -el+ 6et t-eir values an& t-e s,reen
)iel&s in *-i,- t-e ,ontents o) t-e 342R" +arameters o) t-e sear,- -el+ are returne& are &e)ine& in
t-e sear,- -el+ atta,-ment.
"-e sear,- )iel& is a s+e,ial ,ase. 0ts ,ontents are only use& in t-e in+ut -el+ i) it is a sear,- strin6
@t-at is/ i) it ,ontains a V or a XA an& t-e +arameter lin'e& *it- t-e sear,- )iel& is an 0M2R"
+arameter.
arameters t-at only ,ontain a&&itional in)ormation about t-e sear,- )iel& s-oul& not be &e)ine& as
0M2R" +arameters sin,e t-e user must ot-er*ise em+ty t-e ,orres+on&in6 s,reen )iel&s ea,- time
be)ore -e ,an &e)ine a ne* value *it- t-e in+ut -el+.
SA A! "A#12 ;$C
<.B
SAP AG 2002
9o( "o yo& 2se Se$rch 9epsH
Searc( field
&ield $
Input template
&ield 3
T$be/str&ct&re
&ield $ &ield 3
Se$rch %ie"
...
1efinitions in t(e
Screen Painter
*ink
in 113C
7ntern$ beh$!ior
7nter%$ce
/<
Search help
A sear,- -el+ &es,ribes t-e )lo* o) an in+ut -el+. "-e sear,- -el+ ,an only ta'e e))e,t usin6 a
me,-anism t-at assi6ns t-e sear,- -el+ to t-is )iel&. "-is me,-anism is ,alle& t-e searc& &elp
attac&ment to t-e )iel&.
Atta,-in6 a sear,- -el+ to a )iel& -as an e))e,t on t-e )iel&Ws be-avior. 0t is t-ere)ore ,onsi&ere& to be
+art o) t-e )iel& &e)inition.
"-e semanti, an& te,-ni,al attributes o) a s,reen )iel& @ty+e/ len6t-/ =1 -el+/ ...A are not normally
&e)ine& &ire,tly *-en t-e in+ut tem+late is &e)ine&. 2n t-e ,ontrary/ only a re)eren,e to an A7A
Di,tionary )iel& @usually *it- t-e same nameA is s+e,i)ie& in t-e S,reen ainter. "-e s,reen )iel&
ta'es on t-e attributes o) t-is )iel& )rom t-e A7A Di,tionary.
"-e same +rin,i+le is also use& to &e)ine t-e in+ut -el+ o) a s,reen )iel&. "-e sear,- -el+ is t-us
atta,-e& to t-e A7A Di,tionary sear,- )iel& an& not to t-e s,reen )iel&.
0n t-e sear,- -el+ atta,-ment/ t-e inter)a,e +arameters o) t-e sear,- -el+ an& t-e s,reen )iel&s
+rovi&in6 &ata )or t-e in+ut -el+ or 6ettin6 &ata )rom t-e in+ut -el+ are assi6ne& to one anot-er. "-e
sear,- )iel& must be assi6ne& to an 342R" +arameter o) t-e sear,- -el+ at t-is time. "-is
+arameter s-oul& also be an 0M2R" +arameter so t-at t-e user ,an ta'e a&vanta6e o) sear,-
+atterns t-at are alrea&y entere&.
=iel&s t-at &o not -ave a sear,- -el+ atta,-ment ,an also -ave an in+ut -el+ sin,e )urt-er
me,-anisms @)or e9am+le/ &omain )i9e& valuesA are also use& )or t-e =4 -el+.
SA A! "A#12 ;$;
<.<0
SAP AG 2002
Se$rch 9ep Att$ch'ent in the ABAP *iction$ry
T$be/str&ct&re
MA/15 &ield $ &ield 3 Se$rch %ie"
!!!
Search help
Check t$be
MA/15 Hey$ Hey 2
1ata part
7ntern$ beh$!ior
7nter%$ce
*$t$ ee'ent
"-ere are t-ree me,-anisms )or atta,-in6 a sear,- -el+ to a )iel& o) t-e A7A Di,tionary(
1. A sear,- -el+ ,an be atta,-e& &ire,tly to a )iel& o) a stru,ture or table. "-e &e)inition o) t-is
atta,-ment is analo6ous to t-at o) a )orei6n 'ey. Eou -ave to &e)ine an assi6nment @bet*een t-e
inter)a,e +arameters o) t-e sear,- -el+ an& t-e )iel&s o) t-e stru,tureA )or *-i,- t-e system ma'es
a +ro+osal.
2. 0) a )iel& -as a ,-e,' table/ its ,ontents are automati,ally o))ere& as +ossible values in t-e in+ut
-el+. "-e 'ey )iel&s o) t-e ,-e,' table are &is+laye&. 0) a ,-e,' table -as a te9t table/ its )irst
,-ara,ter$li'e non$'ey )iel& is &is+laye&.
0) you are not satis)ie& *it- t-e &es,ribe& stan&ar& &is+lay o) t-e &ata o) t-e ,-e,' table/ you ,an
atta,- a sear,- -el+ to t-e ,-e,' table. "-is sear,- -el+ is use& )or all t-e )iel&s t-at -ave t-is table
as ,-e,' table. Eou -ave to &e)ine an assi6nment bet*een t-e inter)a,e o) t-e sear,- -el+ an& t-e
'ey o) t-e ,-e,' table *-en you &e)ine t-e atta,-ment.
3. "-e semanti,s o) a )iel& an& its +ossible values are &e)ine& by its &ata element. Eou ,an t-ere)ore
atta,- a sear,- -el+ to a &ata element. "-e sear,- -el+ is t-en available )or all t-e )iel&s t-at re)er
to t-is &ata element. 0n t-e atta,-ment you must &e)ine an 342R" +arameter o) t-e sear,- -el+
)or t-e &ata trans)er.
Atta,-in6 a sear,- -el+ to a ,-e,' table @or a &ata elementA ,an result in a -i6- &e6ree o) reusability.
>o*ever/ t-ere are restri,tions on +assin6 )urt-er values via t-e inter)a,e o) t-e sear,- -el+.
SA A! "A#12 ;$10
<.<<
SAP AG 2002
3!er!ie(- 4ech$nis's %or the 7np&t 9ep
does not e"ist
e"ists
PROCESS ON
VAL#E"RE2#EST
3nput (elp from screen
C(eck of t(e
flow lo'ic
Searc( (elp for
screen field
Searc( (elp for field
Searc( (elp for
data element
Searc( (elp
for c(eck ta)le
&i"ed 6alues
5ime or
calendar (elp
C(eck ta)le wit(
te"t ta)le
Hey 6alues of
c(eck ta)le
C(eck ta)le (elp
0n or&er to o))er a meanin6)ul in+ut -el+ )or as many s,reen )iel&s as +ossible/ t-e R/3 System uses a
number o) me,-anisms. 0) t-ere is more t-an one su,- me,-anism available )or a )iel&/ t-e one t-at
is )urt-est le)t or at t-e to+ o) t-e above -ierar,-y is use&.
0n a&&ition to t-e o+tions &es,ribe& above )or &e)inin6 t-e in+ut -el+ o) a )iel& in t-e A7A
Di,tionary/ you ,an also &e)ine it in t-e s,reen )iel&. "-e &isa&vanta6e/ -o*ever/ is t-at t-ere is no
automati, reuse.
#it- t-e s,reen event 2:/ you ,an +ro6ram t-e in+ut -el+ o) a )iel& by yoursel). Eou ,an a&Dust t-e
&esi6n o) t-e -el+ to t-e stan&ar& -el+ usin6 t-e )un,tion mo&ules
=40=J=035DJ:A583JR3Q83S" or =40=J01"J"A753J:A583JR3Q83S".
>o*ever/ you s-oul& ,-e,' to see i) t-e +art o) t-e in+ut -el+ t-at you +ro6ramme& yoursel) s-oul&
be im+lemente& as a sear,- -el+ e9it instea& @see A++en&i9A.
Eou ,an also atta,- a sear,- -el+ to a s,reen )iel& in t-e S,reen ainter. "-ere are some )un,tional
restri,tions on t-is 'in& o) atta,-ment as ,om+are& *it- atta,-ment in t-e Di,tionary.
Eou s-oul& no lon6er use t-e in+ut ,-e,'s &e)ine& &ire,tly in t-e )lo* lo6i, o) t-e s,reen/ )rom
*-i,- it is also +ossible to &erive in+ut -el+s.
"-e )un,tion Technical info is o))ere& in t-e -it list in t-e menu o) t-e ri6-t mouse 'ey. 0t ,an be use&
to )in& out *-i,- o) t-e s+e,i)ie& me,-anisms is bein6 use&.
SA A! "A#12 ;$11
<.<2
SAP AG $%%%
Per%or'$nce o% the 7np&t 9ep
Carrier
&li'(t num)er
. . .
Maintenance of fli'(ts
*+
/<
Eou sometimes -ave to sear,- a lar6e amount o) &ata *it- an in+ut -el+. "-is means t-at you mi6-t
-ave to *ait a lon6 time )or t-e +ossible entries to be &is+laye&/ an& ,an also result in a si6ni)i,ant
in,rease in t-e loa& on t-e system.
#-en you &e)ine a sear,- -el+/ you s-oul& t-ere)ore ,-e,' *-et-er you s-oul& ta'e measures to
o+timi<e t-e a,,essin6 be-avior )or t-e sele,tion met-o&. "-is is es+e,ially true i) t-e sele,tion uses
a vie* an& t-us more t-an one +-ysi,al table.
0) t-e number o) entries in t-e sele,tion met-o& is very lar6e/ you s-oul& restri,t t-e -it list *it-
)urt-er ,on&itions. "-is also in,reases t-e ,larity o) t-e -it list. "-e a&&itional ,on&itions ,an &ire,tly
result )rom t-e ,onte9t/ or ,an be entere& in t-e &ialo6 bo9 )or restri,tin6 values by t-e user. "-e
+er)orman,e o) t-e in+ut -el+ ,an )reHuently be si6ni)i,antly im+rove& by ,reatin6 an in&e9 on t-e
)iel&s use& to )ormulate t-e restri,tions.
0) t-e number o) entries in t-e sele,tion met-o& is relatively small/ you s-oul& al*ays ,-e,' *-et-er
t-e sele,tion met-o& ,an be bu))ere&.
SA A! "A#12 ;$12
<.<3
SAP AG 2002
Atern$ti!e Se$rch P$ths
Wh$t ($s the
booking n&'ber
%or 'y %ight
to #e( >orkH
Wh$t bookings (ere
'$"e in o&r tr$!e
$gencyH
0n t-e relational &ata mo&el/ entities are usually re+resente& by )ormal 'eys. 0n real li)e/ -o*ever/
t-ese entities are o)ten i&enti)ie& by one or more o) t-eir attributes. =or e9am+le/ t-e 'ey )or a +erson
is t-e +ersonnel number. A +erson *ill 6enerally &es,ribe anot-er *it- -is name an& +ossibly -is
a&&ress.
"-e attributes use& to i&enti)y an entity ,an &i))er )rom one user to t-e ne9t an& )rom situation to
situation. A user *ants to use t-ese attributes in an in+ut -el+ to &e)ine a value )or a )iel& t-at
reHuires t-at a )ormal 'ey be entere&.
Eou t-ere)ore nee& searc& pat&s +ermittin6 a,,ess to t-e &ata usin6 non$'ey )iel&s. Several &i))erent
sear,- +at-s s-oul& be +ossible )or one )iel&.
A sear,- +at- )or a )iel& ,an be im+lemente& *it- a sear,- -el+ -avin6 t-e )orm &es,ribe& above. "o
&es,ribe an in+ut -el+ *it- more t-an one alternative sear,- +at-/ a set o) sear,- -el+s ,an be
,ombine& into a ne* obDe,t in t-e R/3 System. Sin,e t-is obDe,t is t-e &es,ri+tion o) t-e in+ut -el+
)or a )iel&/ it is also ,alle& a sear,- -el+.
0n ,ontrast to t-e elementary searc& &elps &es,ribe& above/ t-e sear,- -el+s t-at ,ombine several
sear,- +at-s are ,alle& collect/e searc& &elps.
%olle,tive sear,- -el+s are sometimes use& to ma+ t-e &istribution o) t-e +ossible entries )or a )iel&
into several @&isDun,tA &atasets.
SA A! "A#12 ;$13
<.<4
SAP AG 2002
Coecti!e Se$rch 9eps $n" 5e'ent$ry Se$rch
9eps
7nc&"e" se$rch heps
Collective search help
7ntern$ beh$!ior
7nter%$ce
7nter%$ce 7nter%$ce
7ntern$ beh$!ior
5i'e an elementary sear,- -el+/ a ,olle,tive sear,- -el+ -as an inter)a,e o) 0M2R" an& 342R"
+arameters *it- *-i,- it e9,-an6es &ata. 8sin6 t-is inter)a,e/ t-e ,olle,tive sear,- -el+ ,an be
atta,-e& to )iel&s/ tables an& &ata elements e9a,tly li'e an elementary sear,- -el+.
2nly one sear,- -el+ ,an be atta,-e& to a )iel&/ table or &ata element. Several sear,- +at-s are
t-ere)ore atta,-e& *it- a ,olle,tive sear,- -el+.
Eou ,an omit t-e ,om+onents )or &es,ribin6 t-e &ialo6 be-avior an& &ata sele,tion *-en you &e)ine
a ,olle,tive sear,- -el+. "-e in,lu&e& sear,- -el+s are liste& -ere. Eou must assi6n t-e +arameters o)
t-e ,olle,tive sear,- -el+ to t-e inter)a,e +arameters o) t-e in,lu&e& sear,- -el+ )or ea,- in,lusion.
A sear,- -el+ ,an also be in,lu&e& in several ,olle,tive sear,- -el+s an& at t-e same time itsel) be
atta,-e& to )iel&s/ tables an& &ata elements. A ,olle,tive sear,- -el+ ,an also be in,lu&e& in anot-er
,olle,tive sear,- -el+.
#-en you use a ,olle,tive sear,- -el+/ you are o))ere& t-e elementary sear,- -el+s ,ontaine& in t-e
,olle,tive sear,- -el+ as +arallel tab +a6es. 0) you re+eate&ly use a ,olle,tive sear,- -el+/ t-e tab
+a6e t-at *as last use& is automati,ally a,tive. "-is is be,ause most users al*ays use t-e same
sear,- +at-.
SA A! "A#12 ;$14
<.<5
SAP AG 2002
Appen" Se$rch 9eps
7nc&"e" se$rch heps
. . .
(c&sto'er) $ppen"
se$rch hep
7nc&"e" se$rch heps
. . .
(SAP collective search help
appends
"-e set o) sear,- +at-s t-at are meanin6)ul )or an obDe,t 6reatly &e+en&s on t-e +arti,ular
,ir,umstan,es o) t-e SA ,ustomer. "-e ,ustomer o)ten *oul& li'e to en-an,e t-e stan&ar& SA
,olle,tive sear,- -el+s *it- -is o*n elementary sear,- -el+s. Release 4.6 +rovi&es an a++en&
te,-niHue t-at +ermits t-e en-an,ement o) ,olle,tive sear,- -el+s *it-out mo&i)i,ations.
An append searc& &elp is a ,olle,tive sear,- -el+ t-at is assi6ne& to anot-er ,olle,tive sear,- -el+
@its a++en&in6 obDe,tA an& t-at en-an,es it *it- t-e sear,- -el+s it in,lu&es. "-e a++en& sear,- -el+
uses t-e inter)a,e o) its a++en&in6 obDe,ts.
"-e a++en& sear,- -el+ lies in t-e ,ustomer names+a,e. 1ormally t-e sear,- -el+s in,lu&e& in t-e
a++en& sear,- -el+ are also ,reate& by t-e ,ustomer an& lie in t-e ,ustomerWs names+a,e. >o*ever/
t-e reHuire& elementary sear,- -el+ mi6-t alrea&y be +rovi&e& by SA/ in *-i,- ,ase/ t-e ,ustomer
only -as to a&& it to -is o*n a++en& sear,- -el+.
A++en& sear,- -el+s are use& *it- SA to im+rove ,om+onent se+aration. Some SA ,olle,tive
sear,- -el+s t-ere)ore alrea&y -ave one or more a++en& sear,- -el+s in t-e stan&ar& sear,- -el+.
%ustomer en-an,ements s-oul& al*ays be ma&e by ,reatin6 a se+arate a++en& sear,- -el+.
SA ,olle,tive sear,- -el+s o)ten ,ontain elementary sear,- -el+s t-at are not reHuire& by all
,ustomers. "-e sear,- -el+s you &o not nee& ,an be -i&&en usin6 an a++en& sear,- -el+. "o &o t-is/
t-e ,orres+on&in6 sear,- -el+ must be in,lu&e& in t-e a++en& sear,- -el+ an& t-e hidden )la6 must
be set.
SA A! "A#12 ;$15
<.<6
SAP AG $%%%
The inp&t hep (/< hep) is $ st$n"$r" %&nction o%
the :/3 Syste'
Se$rch heps per'it $n e$sy $n" %e)ibe
"escription o% inp&t heps
T$bes $n" !ie(s c$n be &se" $s the seection
'etho" o% $ se$rch hep
The $ppe$r$nce o% the inp&t hep is controe" by
the p$r$'eters o% the se$rch hep
Se$rch heps c$n be $tt$che" to %ie"s; t$bes $n"
"$t$ ee'ents
7np&t heps (ith $tern$ti!e se$rch p$ths $re
i'pe'ente" (ith coecti!e se$rch heps
With $ppen" se$rch heps; se$rch heps %or
st$n"$r" coecti!e se$rch heps c$n be $""e" or
hi""en (itho&t 'o"i%ic$tions
2nit S&''$ry
SA A! "A#12 ;$16
<.<7Searc& >elps
Exercses
1nt: Searc& >elps
At t-e ,on,lusion o) t-ese e9er,ises/ you *ill be able to(
0m+lement in+ut -el+s *it- elementary sear,- -el+s
De)ine in+ut -el+s *it- more t-an one sear,- +at- usin6
,olle,tive sear,- -el+s
A&& or remove sear,- +at-s )or ,olle,tive sear,- -el+s *it-out
mo&i)i,ations
Many mana6ement tas's reHuire t-at you sear,- )or em+loyee &ata.
Suitable sear,- o+tions are nee&e& to &o t-is. Su,- sear,- o+tions *ill be
im+lemente& in t-is e9er,ise.
1$1 !o to t-e &is+lay s,reen )or table PD3M31"SS an& ,all !tilities Table
contents Create entries. An in+ut tem+late a++ears in *-i,- you ,an ,reate ne*
entries )or table PD3M31"SS @)or e9am+le/ ne* &e+artmentsA. "-e -ea& o) t-e
ne* &e+artment s-oul& also be &e)ine& -ere. Ma'e t-is entry in )iel& Department
head. Maintenan,e o) t-is )iel& s-oul& be su++orte& *it- an in+ut -el+ t-at &is+lays
t-e @+ersonnel number o) t-eA em+loyee.
:eri)y t-at t-e )iel& alrea&y -as an in+ut -el+. =in& out *-i,- in+ut -el+ me,-anism
is use& -ere.
"-e obDe,tive is to ma'e t-e in+ut -el+ )or ,-e,' table P3M52ESS more user$
)rien&ly. Eou *ill ,-e,' your su,,ess later by ,allin6 t-e in+ut -el+ a6ain.
"o &o t-is/ ,reate an elementary sear,- -el+ P3M52ESSJ3S>1.
"-e )ollo*in6 attributes s-oul& a++ear in t-e s+e,i)ie& or&er in t-e -it list(
Carrier
First name
Last name
Personnel number
7e,ause o) t-e lar6e number o) em+loyees/ you s-oul& restri,t t-e &is+laye& values
by s+e,i)yin6 t-e )irst an&/or last names o) t-e +erson *ante& be)ore &is+layin6 t-e
-it list.
SA A! "A#12 ;$1B
Iee+ in min& t-at t-e last name is use& more )reHuently as a restri,tion t-an t-e
)irst name.
0) a ,arrier *as alrea&y s+e,i)ie& be)ore t-e in+ut -el+ *as ,alle&/ only its
em+loyees are o))ere&. 2t-er*ise an in+ut )iel& on t-e in+ut tem+late )or t-e ,arrier
*ill be )ille& *-en you sele,t t-e em+loyee.
Ma'e sure t-at t-e sear,- -el+ &e)ine& )or t-e ,-e,' table -el+ o) table
P3M52ESS is use& %-e,' your su,,ess as &es,ribe& above.
1$2 Eou mi6-t *ant to o))er )urt-er sear,- +at-s )or )in&in6 em+loyees. "o &o t-is/ ta'e
t-e )ollo*in6 ste+s(
%o+y sear,- -el+ SAR3A to your ne* sear,- -el+ P3M52ESSJAR3A. %-an6e
t-e +arameters/ sele,tion met-o& table/ an& &ata elements in your ,o+y so t-at it
re)eren,es t-e names use& in your table instea& o) t-e ori6inal table. %-e,' an&
a,tivate t-e sear,- -el+.
%o+y sear,- -el+ SD3" to your ne* sear,- -el+ P3M52ESSJD3". %-an6e as
a++ro+riate an& a,tivate @same as aboveA.
%o+y sear,- -el+ P3M52ESSJD3" to P3M52ESSJ%S> an& ,onvert t-e ne*
,o+y to a ,olle,tive sear,- -el+. A&& an im+ortin6 +arameter )or AR3A usin6 t-e
&ata element )or t-at you ,reate& )or P3M52ESS$Area. 0n,lu&e sear,- -el+s
P3M52ESSJ3S>1/ P3M52ESSJAR3A/ an& P3M52ESSJD3" as
,om+onents o) t-e ne* ,olle,tive sear,- -el+.
%-an6e t-e sear,- -el+ &e)ine& )or t-e ,-e,' table -el+ )or table P3M52ESS an&
,-e,' your su,,ess.
1$3 Eour business reHuirements -ave ,-an6e& an& it im+a,ts t-e +ro,ess o) sear,-in6
)or em+loyees. "-e sear,- +at- *it- *-i,- em+loyees ,an be )oun& by t-eir
&e+artment is not ,urrently reHuire&.
%-an6e t-e in+ut -el+ use& )or )iel& PD3M31"SS$De+artment -ea& a,,or&in6ly
*it-out a,tually mo&i)yin6 sear,- -el+ P3M52ESSJ%S> @or a table t-at is
involve&A. Do t-is by ,reatin6 an a++en& sear,- -el+ )or P3M52ESSJ%S>. "-e
append s-oul& in,lu&e sear,- -el+ P3M52ESSJD3" as a -i&&en sear,- -el+.
%-e,' your su,,ess.
SA A! "A#12 ;$1C
<.<8Searc& >elps
Solutons
1nt: Searc& >elps
1$1 Startin6 *it- t-e maintenan,e transa,tion )or table PD3M31"SS/ ,all t-e =4 -el+
as &es,ribe&. !o to t-e table maintenan,e s,reen )or table PD3M31"SS/ sele,t
t-e )iel& )or &e+artment -ea&/ an& ,all "oto Search help For 0ield to veri)y
t-at no sear,- -el+ -as been assi6ne&. Sele,t t-e ,-e,' table name )or t-e )iel& an&
you *ill be ta'en to t-e table maintenan,e s,reen )or table P3M52ESS. Call
"oto Search help For table to veri)y t-at no sear,- -el+ -as been assi6ne&.
Eou )in& out t-at t-e in+ut -el+ is t-e ,-e,' table -el+ )or table P3M52ESS an&
t-at it is a +ure ,-e,' table -el+ @*it-out a sear,- -el+ an& *it-out a te9t tableA.
"o ,reate sear,- -el+ P3M52ESSJ3S>1(
1A %-oose Search help in t-e initial s,reen o) t-e A7A Di,tionary an& enter
P3M52ESSJ3S>1 in t-e ,orres+on&in6 )iel&.
2A %-oose Create. 0n t-e ne9t &ialo6 bo9/ ,on)irm t-at you *ant to ,reate an
elementary sear,- -el+.
3A 3nter a s-ort te9t )or your sear,- -el+.
4A "-e sear,- -el+ s-oul& su++ort t-e sear,- )or em+loyees. "-ese are mana6e& in
table P3M52ESS. Eou t-ere)ore -ave to sele,t t-is table @or a vie* on t-is
tableA as sele,tion met-o&. "-e table is su))i,ient )or t-is e9er,ise. 3nter it in
)iel& Selection method.
5A "o obtain t-e reHuire& be-avior/ ,-oose &ialo6 ty+e Dialo !ith 8alue
restriction.
6A %-oose t-e sear,- -el+ +arameters usin6 t-e =4 -el+. Eou s-oul& retain t-e -it
list *it- t-e +ossible sear,- -el+ +arameters by sele,tin6 %eep/ sin,e you &o not
-ave to ,all t-e -el+ a6ain in t-is ,ase. Sele,t )iel&s Carrier/ First name/ Last
name/ an& Personnel number as +arameters.
BA Mar' all +arameters as 342R" +arameters @,olumn 9=PA. Mar' t-e attribute
to be sear,-e& )or @)or e9am+le Personnel numberA an& t-e -ierar,-i,ally -i6-er
Carrier as 0M2R" +arameters @%olumn 04PA. "-is ensures t-at a
,orres+on&in6 entry in t-e in+ut tem+late is ta'en into ,onsi&eration @as
&es,ribe& in t-e e9er,iseA.
CA Eou ,an &e)ine t-e -it list by assi6nin6 t-e ,orres+on&in6 +osition numbers @)or
e9am+le 1/ 2/ 3/ 4/ 5A in ,olumn LPos.
;A Eou ,an &e)ine t-e &ialo6 bo9 )or restri,tin6 values by assi6nin6 +osition
numbers in ,olumn SPos. Eou s-oul& t-ere)ore enter +ositive numbers in t-ese
,olumns )or +arameters First name an& Last name/ *-ere t-e value o) Last
name s-oul& be smaller t-an t-at o) First name.
SA A! "A#12 ;$1;
10A A,tivate your sear,- -el+. "-e sear,- -el+ is not yet e))e,tive )or )iel&
PD3M31"SS$De+artment -ea&. >o*ever/ you ,an try out t-e sear,- -el+
imme&iately *it- t-e Test )un,tion.
"-e sear,- -el+ you Dust ,reate& ,an only im+rove t-e ,-e,' table -el+ o) table
P3M52ESS @an& t-us t-e in+ut -el+ o) )iel& PD3M31"SS$De+artment -ea&A i)
it *as atta,-e& to table P3M52ESS. Eou ,an &o t-is as )ollo*s(
1A !o to ,-an6e mo&e in t-e maintenan,e s,reen )or t-is table. %-oose +oto
.earch help For table. 0n t-e ne9t &ialo6 bo9/ enter t-e name o) sear,- -el+
P3M52ESSJ3S>1. %-oose Continue.
2A "-e +ro+osal ,reate& by t-e system )or assi6nin6 t-e sear,- -el+ +arameters to
t-e 'ey )iel&s o) t-e table is +robably ,orre,t. %-e,' t-is an& ,o+y t-e
&e)inition.
A,tivate table P3M52ESS.
3A %all t-e Create entries )un,tion )or table PD3M31"SS a6ain. "-e in+ut -el+
o) )iel& Department head s-oul& no* be-ave as &esire&.
1$2 ro,ee& as )ollo*s(
1A At t-e Di,tionary( 0nitial S,reen/ enter SAR3A in t-e sear,- -el+ name )iel&
an& -it t-e ,o+y button. %-an6e t-e to sear,- -el+ name to
P3M52ESSJAR3A an& ,-oose Continue. %-oose chane )or t-e ne*
sear,- -el+.
2A %-an6e t-e sele,tion met-o& table to P3M52ESS. %-an6e +arameter
names to mat,- t-e )iel&s o) t-e table by sele,tin6 t-e +arameter an& in+ut
-el+. "-is also ,orre,ts t-e &ata element re)eren,e. %orre,t ot-er
s+e,i)i,ations as nee&e&/ synta9 ,-e,' t-e &e)inition/ an& a,tivate t-e sear,-
-el+.
Re+eat ste+s 1 an& 2 )or ,reation o) sear,- -el+ P3M52ESSJD3" usin6 SD3"
as t-e tem+late.
3A %o+y sear,- -el+ P3M52ESSJD3" to P3M52ESSJ%S>. At t-e maintain
sear,- -el+ s,reen/ ,-oose Edit Change search help type and confirm the
change.
4A A&& an im+ortin6 +arameter )or AR3A t-at uses t-e &ata element t-at you
,reate& )or P3M52ESS$Area.
5A Sele,t tab +a6e 0ncluded search helps. 3nter sear,- -el+ P3M52ESSJ3S>1.
6A osition t-e ,ursor on t-e sear,- -el+ Dust entere&. %-oose Parameter
assinment. >ave t-e system ma'e a +ro+osal )or t-e assi6nment.
BA "-e +ro+osal is +robably ,orre,t. "o be on t-e sa)e si&e/ ,-e,' an& t-en ,o+y
t-e +ro+osal.
CA Re+eat ste+s 4 Y 6 )or in,lu&e& sear,- -el+s P3M52ESSJAR3A an&
P3M52ESSJD3".
;A A,tivate sear,- -el+ P3M52ESSJ%S>.
10A !o to t-e table maintenan,e s,reen )or table P3M52ESS to ,-an6e t-e sear,-
-el+ )or t-e table. %-oose Goto Search help For table an& ,-an6e t-e
sear,- -el+ name to P3M52ESSJ%S>. >ave t-e system ma'e a +ro+osal/
,-e,' it/ an& ,o+y it. A,tivate table P3M52ESS.
SA A! "A#12 ;$20
7y ,allin6 t-e in+ut -el+ )or )iel& PD3M31"SS$De+artment -ea&/ you ,an
see t-at t-e in+ut -el+ is still )un,tionin6 an& t-at a ,olle,tive sear,- -el+ is
no* in e))e,t.
1$3 Sin,e you *ant to ma'e t-e ,-an6es *it-out mo&i)yin6 e9istin6 obDe,ts/ you -ave
to ,reate an a++en& sear,- -el+ )or ,olle,tive sear,- -el+ P3M52ESSJ%S>.
ro,ee& as )ollo*s(
1A 0n &is+lay mo&e/ 6o to t-e maintenan,e s,reen )or sear,- -el+
P3M52ESSJ%S>. %-oose Goto Append search helps.
2A A name )or t-e a++en& sear,- -el+ is +ro+ose& in t-e ne9t &ialo6 bo9. Eou ,an
,o+y t-is name.
3A 3nter a s-ort &es,ri+tion )or t-e a++en& sear,- -el+.
4A Sele,t tab +a6e 0ncluded search helps.
5A 3nter P3M52ESSJD3" in t-e list o) in,lu&e& sear,- -el+s. Mar' ,olumn
Hidden )or t-e entry.
6A osition t-e ,ursor on t-e name o) sear,- -el+ P3M52ESSJD3". %-oose
Parameter assinment. 0n t-e ne9t &ialo6 bo9/ ,on)irm t-at you *ant to ,reate a
+ro+osal )or t-e +arameter assi6nment.
BA "-e +arameter assi6nment +ro+ose& by t-e system is +robably ,orre,t. %-e,'
t-is an& ,o+y t-e assi6nment.
CA A,tivate your a++en& sear,- -el+.
Eou ,an ,-e,' your su,,ess by ,allin6 t-e in+ut -el+ )or )iel& PD3M31"SS$
De+artment -ea&.
SA A! "A#12 ;$21
2
SAP AG $%%%
Appen"i)
/ight 'o"e
*ecision tree %or b&%%ering
/&rther in%or'$tion $bo&t se$rch heps
7'port$nt 'en& p$ths
7n"e)
SA A! "A#12 10$1
2.2
SAP AG 2002
*ep$rt. $irport
Arri!$ $irport
*estin$tion
St$rting point
T$sks o% the tr$!e $gency-
J Possibe $irports
J Possibe c$rriers $t the re,&este" ti'e
J Possibe %ights $t the re,&este" ti'e
J /&rther in%or'$tion $bo&t the %ights-
price; bookings; ...
/ight *$t$ 4o"e %or ABAP Tr$ining Co&rses
2ne ,ommon )li6-t &ata mo&el is use& in t-e A7A trainin6 ,ourses. 2nly a sim+le overvie* o) t-is
&ata mo&el is s-o*n -ereG &etails ,an be 6iven i) reHuire&.
0) you as a ,ustomer *ant to 6et )rom one +la,e to anot-er/ you *ant to )in& out t-e )ollo*in6 )rom
your travel a6en,y(
#-i,- are t-e best air+orts )or t-e 6iven tri+
At *-at times are t-ere )li6-ts on t-e 6iven &ay
De+en&in6 on your in&ivi&ual o+timi<ation ,on&itions/ *-at is t-e o+timal solution/ t-at is/ t-e
best )li6-t/ t-e )astest ,onne,tion/ t-e ,onne,tion t-at is nearest to t-e reHuire& arrival time.
"-is vie* is &i))erent )rom t-at o) a travel a6en,y( "-e &ata is store& in t-e &ata mo&el in tables in a
,entral &atabase a,,or&in6 to te,-ni,al ,riteria. "-e ,ustomer is not normally intereste& in all t-e
reHuire& &ata @)or e9am+le/ you -ave to enter *-i,- ,ustomer boo'e& *-i,- )li6-ts/ *-en t-e
boo'in6s *ere ma&e/ -o* mu,- t-e ,ustomer +ai& an& so onA . "-e &ata must be entere& &e+en&in6
on t-e user reHuirements usin6 +ro6rams.
SA A! "A#12 10$2
2.3
SAP AG 2002
Airport
BC;A38P85 5
/ight
c&sto'er
BC;C#S5M 5
Airine
c$rrier
BC;CA883E8 5
/ight
BC;S&*3G+5 5
City.$irport
$ssign'ent
BC;C35A38P 5
City
BC;GEC350 5
/ight
sche"&e
BC;P*A/&*3 5
Agency
BC;58A<*AG 5
Bookings
BC;BH3/G 5
S$es
co&nter
BC;C#/5E8 5
Ti'e
9
A
A
C:
C:
9
:
:
9
9
*$t$ 4o"e
3ntities ,an be &e)ine& )or all lo6i,ally relate& in)ormation( "-e )li6-t &ata mo&el t-ere)ore ,ontains
an entity ea,- )or(
all ,ities
all air+orts
all ,arriers
all air+orts
all )li6-ts
"-e entities -ave a ,ertain relations-i+ to one anot-er(
=li6-ts start an& en& at an air+ort.
A )li6-t is uniHuely ,-ara,teri<e& by its ,arrier/ &e+arture air+ort/ arrival air+ort/ an& )li6-t time.
=li6-ts ,an be o))ere& on more t-an one &ay )or ea,- ,onne,tion/ but a )li6-t ,an only be )or a
,ertain ,onne,tion.
All nearby air+orts must be assi6ne& to t-e ,ities.
"-is &ata mo&el mana6es all t-e reHuire& &ata *it-out unne,essary re&un&an,ies an& 6ives t-e
a6en,y t-e &ata it reHuires.
SA A! "A#12 10$3
2.4
SAP AG 2002
SP/67
&li'(t sc(edule
!!!!!
SB33?
&li'(t )ookin'
!!!!!
MA/15
CA8831
C//31
&*1A5E
BH31
C#S5M31
C#/5E8
AGE/C0/#M
S/67G9T
&li'(t
!!!!!
MA/15
CA8831
C//31
&*1A5E
SEA5SMA=
SEA5SCC
SCA::
Carrier
MA/15
CA8831
CA88/AME
!!!!!
Airine
c$rrier
$$00$
/ight
$$00$
/ight
sche"&e
$$00$
Bookings
$$00$
Ti'e
9 9 9
9
MA/15
CA8831
C//31
A38P&8M
A38P5
1EP53ME
7'pe'ent$tion in the ABAP *iction$ry
"-e e9am+les an& e9er,ises in t-e A7A trainin6 ,ourses an& t-e A7A &o,umentation re)er to t-e
SA )li6-t &ata mo&el. "-e Re+ository obDe,ts )or t-e )li6-t &ata mo&el ,an be )oun& in &evelo+ment
,lass SA7%JDA"AM2D35.
"-e )ollo*in6 tables o) t-e )li6-t &ata mo&el are mainly use& in t-e A7A trainin6 ,ourses(
S=50( "able o) )li6-t ,onne,tions
S=50!>"( "able o) )li6-ts
S722I( "able o) )li6-t boo'in6s
S%ARR( "able o) airlines
S78SAR"( "able o) airline +artners
S"RA:35A!( "able o) travel a6en,ies
S%8S"2M( "able o) )li6-t ,ustomers
S%281"3R( "able o) sales &es's
SA A! "A#12 10$4
2.5
SAP AG 2002
/o
0es
0es
0es
0es
/o
0es
/o
/o
/o
*ecision Tree %or B&%%ering
T$be '$y not be b&%%ere".
Start
&ull )ufferin'
Sin'le.record )ufferin'
Bufferin' depends on installation!
&urt(er considerations must )e made:
&ull or 'eneric )ufferin' possi)le4
Secondary inde"es or )ufferin'4
T$be '$y be b&%%ere".
Generic )ufferin' wit( suita)le
num)er of 'eneric key fields
Are temp! inconsistencies in t(e
read data accepta)le4 Are most
accesses read only4
3s t(e e"pected ta)le si2e
smaller t(an @HB4
3s t(e ta)le mostly accessed wit(
SE*EC5 S3/G*E4
3s t(e e"pected ta)le si2e lar'er
t(an $MB KLL $000 recordsM4
3s a left.justified part of t(e
key usually specified w(en
t(e ta)le is accessed4
&ull )ufferin'
SA A! "A#12 10$5
2.6
SAP AG 2002
Base ta)le $ Base ta)le 2
*B !ie(
Secondary ta)le
9ep !ie(
Primary ta)le
8ie( $s Seection 4etho" o% $ Se$rch 9ep
0) t-e sele,tion met-o& )or a sear,- -el+ is a &atabase vie*/ t-e in+ut -el+ &is+lays only t-e re,or&s
)or *-i,- t-ere are entries in all t-e tables involve& in t-e vie* @inner DoinA. "-e set o) +ossible
entries is sometimes &es,ribe& by t-e entries in a +rimary table )or *-i,- a&&itional o+tional
in)ormation ,an be a&&e& )rom )urt-er se,on&ary tables. "-is vie* on t-e &ata ,an be im+lemente&
*it- a -el+ vie*. "-e same outer Doin lo6i, is use& )or -el+ vie*s as )or maintenan,e vie*s.
A -el+ vie* is &e)ine& analo6ously to a maintenan,e vie*. >el+ vie*s ,an only be use& as sele,tion
met-o&s in sear,- -el+s. Sin,e t-e R/3 System ,annot +ass t-e sele,tion &ire,tly to t-e &atabase
usin6 a -el+ vie*/ it must 6enerate its o*n a,,ess routines. "-e &atabase vie* s-oul& t-ere)ore be
use& as sele,tion met-o& in +re)eren,e to t-e -el+ vie*.
Sele,tion usin6 a table an& te9t table ,orres+on&s to sele,tion usin6 a virtual -el+ vie*. =or t-is
reason/ a virtual -el+ vie* s-oul& not be ,reate& in t-is ,ase.
39,e+tion( "-e table ,ontains a )iel& -avin6 t-e same name as a non$'ey )iel& o) t-e te9t table. 0) t-is
)iel& o) t-e te9t table is nee&e& in t-e sear,- -el+/ you -ave to ,reate a -el+ vie* on t-e t*o tables
be,ause t-e )iel& in t-e sear,- -el+ ,annot be a,,esse& &ire,tly.
0t is ,ustomary to start t-e name o) -el+ vie*s *it- t-e +re)i9 >J. :ie*s be6innin6 *it- t-e +re)i9es
>JE or >JP t-ere)ore lie in t-e ,ustomer names+a,e.
SA A! "A#12 10$6
2.7
SAP AG 2002
Search help
/&rther 3ptions %or Se$rch 9eps
*e%$&t !$&es 9ot keys
9i"e inc&"e"
se$rch heps
*isp$y %ie"s in the "isp$y
bo) %or restricting !$&es
A +arameter ,an be +re$assi6ne& a value by allo,atin6 a &e)ault value. "-e +arameter is al*ays 6iven
t-is value unless it is an 0M2R" +arameter t-at is lin'e& *it- a )iel& o) t-e s,reen/ its mo&ule +ool
or *it- a +arameter o) t-e in,lu&in6 ,olle,tive sear,- -el+.
"-e )ollo*in6 ,an be &e)ault values( literals/ system )iel&s an& !3" +arameters.
Eou ,an use a &e)ault value to )ormulate a sim+le sele,tion ,on&ition )or a )iel& o) t-e sele,tion
met-o&.
A sin6le letter or a &i6it ,an be assi6ne& as -ot 'ey to an elementary sear,- -el+. 0) t-is elementary
sear,- -el+ is use& in a s,reen )iel& )or t-e in+ut -el+/ an& i) t-is )iel& -as t-e s-ort ,ut KQ-ot
'eyR.QS351R.QS352R/ *-en t-e in+ut -el+ is ,alle&/ t-is elementary sear,- -el+ is +ro,esse&.
QS351R/ QS352R is use& as t-e )iel& ,ontents )or t-e &ialo6 bo9 )or restri,tin6 values @*it- an V
a&&e& at t-e en&A an& t-e -it list is t-en &is+laye& imme&iately.
0n&ivi&ual sear,- -el+ in,lusions ,an be -i&&en in a ,olle,tive sear,- -el+. Eou ,an t-us &ea,tivate
in&ivi&ual sear,- +at-s t-at are not *ante& in a system. "-ey s-oul& normally be -i&&en in an
a++en& sear,- -el+ as t-is ,an be &one *it-out mo&i)i,ation.
arameters o) an elementary sear,- -el+ ,an be mar'e& as +ure &is+lay )iel&s in t-e &ialo6 bo9 )or
restri,tin6 values. 0n 6eneral/ 0M2R" +arameters t-at are assi6ne& un,-an6eable )iel&s o) t-e
s,reen are &is+laye& in t-is &ialo6 bo9 as un,-an6eable.
SA A! "A#12 10$B
2.8
SAP AG 2002
1ate of fli'(t
/< /<
Carrier
. . .
Maintenance of Bookin's
&li'(t num)er
1epart! city
Arri6al city
. . .
SELECT * FROM
SFLIGHT...
Searc( (elp e"it Searc( (elp e"it
SAPBC;G*BA*;&-;S&*3G+5 SAPBC;G*BA*;&-;S&*3G+5
/o! /o! 1epart! city 1epart! city &ree &ree
Carrier Carrier
0111 8ome $-C
0111 8ome $%@
Alitalia
! ! ! ! ! !
8ome
AN
! ! ! ! ! !
! ! ! ! ! !
! ! ! ! ! !
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
#on.St$n"$r"- Se$rch 9ep 5)it
A sear,- -el+ is an obDe,t t-at &es,ribes an in+ut -el+ *it-in t-e system$*i&e stan&ar&. 0n some
,ases/ t-e s+e,ial semanti,s o) a )iel& reHuires t-at you &eviate )rom t-is stan&ar& in some &etails.
"-is ,an be im+lemente& *it- a sear,- -el+ e9it.
A sear,- -el+ e9it is a )un,tion mo&ule -avin6 a stan&ar&i<e& inter)a,e. "-e )un,tion mo&ule
=40=JS>5J340"J34AM53 ,an be use& as tem+late. 0) t-e sear,- -el+ -as an e9it/ it is ,alle&
be)ore ea,- sin6le ste+ o) t-e +ro,ess. "-e a&ministrative &ata o) t-e -el+ +ro,essor is +asse& via t-e
inter)a,e. "-e sear,- -el+ e9it ,an mani+ulate t-is &ata.
"-e a&ministration &ata also in,lu&es t-e in)ormation about t-e ne9t ste+ to be e9e,ute&. "-e sear,-
-el+ e9it ,an no* e9e,ute eit-er +re+aratory a,tions )or t-is ste+ or t-e ste+ itsel) @)or e9am+le/ a
&ata sele,tion t-at ,annot be im+lemente& *it- a S353%" on a table or vie*A. 0n t-e se,on& ,ase/
t-e sear,- -el+ e9it also ,-an6es t-e in)ormation about t-e ne9t ste+ to be e9e,ute&.
Some )un,tion mo&ules t-at ,an be use& as sear,- -el+ e9its or t-at ,an be use& to mani+ulate t-e
a&ministration &ata in sear,- -el+ e9its are alrea&y &e)ine& *it- t-e +re)i9 =48"J.
Sear,- -el+ e9its s-oul& only be use& )or e9,e+tions. 8sin6 sear,- -el+ e9its en,oura6es non$
stan&ar& solutions an& ma'e it more &i))i,ult to maintain t-e in+ut -el+.
SA A! "A#12 10$C
2.B
SAP AG 2002
4igr$tion o% 5)isting 7np&t 9eps
El! src! (lp!
9@#A45
Selection
met(od
5a)le
T
Searc( (elp
attac(ment
+elp 6iew
9@#A45
Primary ta)le 5
Second! ta)! $
!!!
or
+elp 6iew
9@#A45
Primary ta)le 5
Second! ta)! $
!!!
Coll! src! (lp!
ABC*
Searc( (elp
inclusions
El! src! (lp!
ABC*A
Selection
met(od
1B 6iew
4@ABC*A
El! src! (lp!
=ABC*1
Selection
met(od
1B 6iew
4@ABC*1
1B 6iew
4@ABC*A
MC o)ject
ABC*
MC 31
A
'enerates
1B 6iew
4@ABC*1
MC 31
1
'enerates
8elease 3!"
8elease -!"
)elon's to
)elon's to
Sear,- -el+s *ere intro&u,e& in Release 4.0. reviously/ in+ut -el+s *ere im+lemente& by ,reatin6
mat,-,o&es an& -el+ vie*s/ *-i,-/ -o*ever/ -a& less )un,tionality. #-en you u+6ra&e to 4.9/ sear,-
-el+s *it- t-e same name are ,reate& )rom t-ese obDe,ts @i) ne,essary/ t-e name is +re,e&e& *it- a E
or PA. "-e ori6inal obDe,ts *ill initially remain in t-e system/ but be meanin6less.
rior to Release 4.0/ a -el+ vie* *as a ,om+lete &es,ri+tion o) an in+ut -el+ t-at *as automati,ally
atta,-e& to its +rimary table @an& only to itA. An elementary sear,- -el+ is ,reate& )rom ea,- -el+
vie*. "-e +rimary table o) t-e -el+ vie* ,an be entere& as t-e sele,tion met-o& )or many ,ases/ an&
t-e -el+ vie* *ill be use& )or t-e ot-ers. "-e sear,- -el+ t-at is ,reate& is atta,-e& to t-e +rimary
table o) t-e -el+ vie*.
An elementary sear,- -el+ is ,reate& )rom a mat,-,o&e 0D. "-e sele,tion met-o& assi6ne& is t-e
6enerate& &atabase vie* @)or a trans+arent 0DA or t-e 6enerate& +oole& table @)or a non$trans+arent
0DA o) t-e mat,-,o&e 0D. 0n t-e )irst ,ase/ t-e 6enerate& vie* is a&ministere& as an in&e+en&ent
obDe,t in t-e A7A Di,tionary. 0n t-e se,on& ,ase/ t-e +oole& table is still a++en&e& to its mat,-,o&e
0D sin,e t-e mat,-,o&e te,-niHue is use& to u+&ate t-e &ata in t-is table.
A ,olle,tive sear,- -el+ is ,reate& )rom a mat,-,o&e obDe,t. Mat,-,o&es *ere atta,-e& to in+ut
)iel&s in t-e s,reen. "-ese atta,-ments are ,onverte& to atta,-ments o) t-e ,reate& ,olle,tive sear,-
-el+s to t-e ,orres+on&in6 s,reen )iel&s.
"-e above 6ra+-i, illustrates t-e mi6ration )or -el+ vie*s an& )or trans+arent mat,-,o&es.
SA A! "A#12 10$;
2.<0
SAP AG 2002
Atern$ti!e *isp$ys o% the 7np&t 9ep
7np&t 9ep Contro
6ist bo)
"-e R/3 System re,o6ni<es t-ree +resentation )orms )or t-e in+ut -el+(
$ 5ist bo9
$ %ontrol @mo&elessA
$ R/3 &ialo6 @mo&alA
"-e list bo9 &oes not +rovi&e )or any )urt-er sele,tion ,on&itions an& no )urt-er ,olumns are
&is+laye& in t-e -it list. >o*ever/ t-e list bo9 is t-e user$)rien&ly in+ut -el+ )or ,lear one$,olumn
lists. "-e a++li,ation &evelo+er &e,i&es *-et-er to o))er a )iel& as list bo9 an& stores t-is in)ormation
in t-e S,reen ainter )or t-e ,orres+on&in6 )iel&. #-en t-e user ,alls t-e list bo9/ t-e &ata to be
&is+laye& is obtaine& *it- t-e in+ut -el+ me,-anism store& in t-e A7A Di,tionary or S,reen
ainter )or t-e )iel&. Eou ,an obtain more in)ormation on usin6 t-e list bo9 in t-e ,ourse 7%410 Y
Prorammin ;ser Dialos.
Alternatively/ you ,an &is+lay )iel&s t-at are not o))ere& as a list bo9 *it- a mo&eless ,ontrol or *it-
a mo&al &ialo6 im+lemente& *it- R/3 s,reen te,-nolo6y. #it- Help > Settins" ea,- user ,an &e)ine
t-e variant t-ey +re)er. "-is +resentation )orm is t-en use& )or all in+ut -el+s )or t-is user. "-e
system a&ministrator ,an &e)ine t-e &e)ault value.
"-e ,ontrol is +arti,ularly use)ul i) more t-an one )iel& is to be )ille& seHuentially *it- t-e same
in+ut -el+ @)or e9am+le in a table ,ontrolA. "-e Hold list )un,tion starts t-e ,ontrol )rom t-e mo&al
-el+.
SA A! "A#12 10$10
2.<<;mportant 3enu *at&s and Transactons
()(* Dctonary 3antenanceHDsplay
Tools A'AP :or1bench De8elopment Dictionary
$ Di,tionary maintenan,e @S311A $ Di,tionary &is+lay @S312A
:H3 :epostory ;n-ormaton System ()(* Dctonary
5+ Tools A'AP :or1bench De8elopment Dictionary ?Dictionary ob6ect@ 9nter ob6ect name
and choose operation.
9n8ironment #/A #epository 0nformation System or
B+ Tools A'AP :or1bench 78er8ie! #/A 0nformation System
$ R/3 Re+ository 0n)ormation System @S3C4A / Re+ository 0n)ormation System A7A Di,tionary
@S315A
Data DsplayH3antenance ?Data )ro.ser@
5+ Tools A'AP :or1bench De8elopment Dictionary ?Dictionary ob6ect$Table"
9nter table name and choose operation.
;tilities Table contents Display or Table contents Create entries
or
2. Tools A'AP :or1bench 78er8ie! Data 'ro!ser
Data &is+lay/maintenan,e @Data 7ro*serA @S316A
;ndex
Tools A'AP :or1bench De8elopment A'AP Dictionary ?Dictionary ob6ect$ table@
9nter table name and choose operation.
Goto 0ndexes or Sele,t 0ndexes+++
Tec&ncal Settn"s
Tools A'AP :or1bench De8elopment A'AP Dictionary ?Dictionary ob6ect$ Table" enter table
name and choose operation.
Goto Technical settins or Sele,t Technical settins ?S95A.
Database 1tlty
Tools ABAP Workbench Development ABAP Dictionary 4Dictionary ob5ect6 !nter ob5ect
name and choose operation7
,tilities Database utility
2 Database utlty ?SE<4@
Stora"e *arameters
Tools ABAP Workbench Development ABAP Dictionary 4Dictionary ob5ect6 !nter ob5ect
name and select operation7
,tilities Database utility
+oto .torage parameters or Select .torage parameters
2 Database utlty ?SE<4@ +oto .torage parameters
=xed Galues
Tools ABAP Workbench Development ABAP Dictionary 4Dictionary ob5ect6 domain8
!nter domain name and choose operation7
Tab page 9alue range
3antenance Ge.
Tools ABAP Workbench Development #ther tools Table maint/ vie:
2 Table /e. "eneraton ?SE54@
En&anced Data Dsplay
System ;tilities Table maintenance 9xt+ table maint+
) 39ten&e& table maintenan,e @SM30A
SA A! "A#12 10$11
2.<2;ndex
De+en&ent obDe,t 5$5
A,tivation 5$3
A5"3R "A753 6$4/ 6$13
Analysis tool 6$11
%ontinue a&Dustment 6$11
A++en& stru,ture 6$12/ 6$13/ 6$14/ B$12
A++en& sear,- -el+ C$15
Restart lo6 6$;
%luster table 6$14
Data ,lass 2$C/ 2$;
,ustomer 2$;
Database 1$4/ 2$3/ 3$4
Database obDe,t 1$3/ 1$B
Database system 3$4/ 6$4/ B$11
Database table 1$3/ 2$6
Database inter)a,e 1$B/ 3$5
Database vie* 1$3/ 1$4/ B$11/ B$14
Data element 1$3/ 1$5/ 2$4
Do,umentation 1$6
Domain 2$10/ 4$3/ 4$4
eHuality 4$;
Domain ,on,e+t
t*o$level 2$5
S,reen 1$3
0n+ut -el+ 1$3/ 1$6/ C$3/ C$4/ 11$10
0n+ut ,-e,' 1$6
Develo+ment environment 1$B
39tent 2$10
=iel& -el+ 1$3/ 1$6
=iel& assi6nment 4$B
=i9e& value 4$3
=orei6n 'ey 1$6/ 4$6/ 4$B/ 4$C/ 4$10/ B$;/ B$13
=orei6n 'ey )iel&
ty+e o) 4$11
=orei6n 'ey relations-i+ 4$11
=orei6n 'ey table 4$B/ 4$C
!eneration o) table vie* B$13
Si<e ,ate6ory 2$C/ 2$10
>el+ vie* 11$6/ 11$;
0n,lu&e
stru,ture 2$B/ 5$5
SA A! "A#12 10$12
in &atabase vie*s B$12
0n&e9 1$4/ 3$3/ 3$4/ C$12
0n&e9 entry 3$3
0n&e9 0D 3$4
0n)ormation system 5$B
?oin B$3
inner Doin B$14
outer Doin B$14
?oin ,on&ition B$5/ B$;/ B$10/ B$13
%atalo6 ,-an6e 6$4
%ar&inality 4$11
%om+onent 1$5
%ross$+ro&u,t B$4/ B$5
%ustomer )iel& 6$12
%ustomer mo&i)i,ation 6$13/ C$15
Runtime obDe,t 5$4/ 6$3
Runtime environment 1$B
Mat,-,o&e 11$;
2bDe,t lo6 6$11
2+timi<er 3$4
oole& table 6$14
er)orman,e 1$6/ 3$5/ 3$C/ C$12
Maintenan,e status B$11
>el+ vie* B$13/ B$14
rimary in&e9 3$4
rimary 'ey 2$3/ 3$C/ 4$C
roDe,tion B$3/ B$6
5o6 1$6/ 2$C/ 2$11
%-e,' )iel& 4$B/ 4$C/ 4$;
%-e,' table 4$4/ 4$B/ 4$C
7u))er 3$5/ 3$6/ 3$B/ 3$C/ 3$;
7u))erin6 1$6/ 2$C
)ull 3$6/ 3$B/ 3$C/ 3$;
6eneri, 3$6/ 3$C
sin6le$re,or& 3$6/ 3$;
o) &atabase vie* B$11
7u))erin6 ty+e 3$6/ 3$C/ B$11
7u))er syn,-roni<ation 3$10/ 3$11/ 3$12/ 3$13/ 3$14/ 3$15
Release u+6ra&e 6$13
r&is+/bu)re)time 3$10
Semanti, attribute 4$11
Iey 3$B
6eneri, 3$C
re&u,e len6t- o) 6$C
SA A! "A#12 10$13
Iey )iel& 3$4/ 4$C
6eneri, 3$C
Se,on&ary in&e9 3$4/ 3$B
Sele,tion B$3/ B$4
Sele,tion ,on&ition B$B/ B$;
S354 B$13
SDD 6$13
Stora6e area 2$10
5o,' obDe,t 1$6
Stru,ture 1$3/ 1$5/ 2$3
Stru,ture a&Dustment 6$4
Sear,- )iel& C$4/ C$;
Sear,- -el+ 1$6/ C$5/ 11$B
sear,- -el+ atta,-ment C$;/ C$10/ C$11/ C$14
elementary C$14
,olle,tive sear,- -el+ C$14/ C$15
a++en& sear,- -el+ C$15
&ialo6 be-avior o) a sear,- -el+ C$5/ C$B
sear,- -el+ +arameter C$B/ C$C
inter)a,e o) a sear,- -el+ C$5/ C$C/ C$;/ C$10/ C$14
sele,tion met-o& o) a sear,- -el+ C$5/ C$6
sear,- -el+ e9it 11$C
Syn,-roni<ation table 3$10/ 3$11/ 3$12/ 3$13/ 3$14/ 3$15
Syn,-roni<ation time 3$14/ 3$15
"able 1$3/ 1$6/ 2$3
trans+arent 2$6
te9t table 4$12
unlo,' 6$11
"able bu))er 3$5/ 3$6
"able ty+e 1$3/ 1$5
"able maintenan,e 6enerator B$13
"able$s+a,e 6$;/ 6$10
"e,-ni,al settin6s 2$C
"y+e
stru,ture& 2$6
user$&e)ine& 1$3/ 1$5
"y+e &e)inition 1$3/ 1$5/ 1$B
%onversion 6$4
terminate& 6$;/ 6$10
%onversion +ro,ess 6$5/ 6$6/ 6$B/ 6$C/ 6$;
8niHue in&e9 3$4
8+6ra&e 6$13
Dis+la,ement 3$5
:ersion
SA A! "A#12 10$14
a,tive 5$3/ 6$3/ 6$5/ 6$6/ 6$B/ 6$C/ 6$;
ina,tive 6$3/ 6$3/ 6$5/ 6$6/ 6$B
#-ere$use& list 5$6
:ie* 1$4/ 1$6/ B$3/ B$4/ B$5/ B$6/ B$B/ B$C/ B$;/ B$10/ B$11/ B$12/ B$13/ B$14/ 11$6
:alue table 4$4/ 4$;/ 4$10
U"A7 3$5
SA A! "A#12 10$15

Anda mungkin juga menyukai