You are on page 1of 173

BC430 - ABAP Dictionary

BC430
R/3 System
Release 46A
20.11.2000
0
BC430 - ABAP Dictionary.........................................................................................................................................1
Copyright.................................................................................................................................................................2
ABAP Workbench...............................................................................................................................................4
Course Content....................................................................................................................................................5
ntro!uction.............................................................................................................................................................1
Course "b#ecti$es...............................................................................................................................................2
%unction o& the ABAP Dictionary.......................................................................................................................3
Database "b#ects in the ABAP Dictionary.........................................................................................................4
'ype De&initions in the ABAP Dictionary..........................................................................................................5
(er$ices o& the ABAP Dictionary.......................................................................................................................)
*inking to the De$e+op,ent an! -unti,e .n$iron,ent..................................................................................../
0nit (u,,ary.....................................................................................................................................................1
'ab+es in the ABAP Dictionary..............................................................................................................................1
Course "b#ecti$es...............................................................................................................................................2
'ab+es an! %ie+!s.................................................................................................................................................3
Basic "b#ects o& the ABAP Dictionary...............................................................................................................4
'2o-*e$e+ Do,ain Concept3 .4a,p+e...............................................................................................................5
'ransparent 'ab+es an! (tructures......................................................................................................................)
nc+u!e (tructures................................................................................................................................................/
'echnica+ (ettings...............................................................................................................................................1
Data C+ass............................................................................................................................................................5
(i6e Category....................................................................................................................................................10
*ogging.............................................................................................................................................................11
0nit (u,,ary...................................................................................................................................................12
.4ercise Data.....................................................................................................................................................13
.4ercises3 'ab+es in the ABAP Dictionary.......................................................................................................14
(o+utions3 'ab+es in the ABAP Dictionary.......................................................................................................1/
Per&or,ance !uring 'ab+e Access...........................................................................................................................1
Course "b#ecti$es...............................................................................................................................................2
(tructure o& an n!e4...........................................................................................................................................3
Access 2ith n!e4es............................................................................................................................................4
Data Access using the Bu&&er..............................................................................................................................5
'ab+e Bu&&ering...................................................................................................................................................)
%u++ Bu&&ering....................................................................................................................................................../
7eneric Bu&&ering................................................................................................................................................1
(ing+e--ecor! Bu&&ering.....................................................................................................................................5
Bu&&er (ynchroni6ation 1..................................................................................................................................10
Bu&&er (ynchroni6ation 2..................................................................................................................................11
Bu&&er (ynchroni6ation 3..................................................................................................................................12
Bu&&er (ynchroni6ation 4..................................................................................................................................13
Bu&&er (ynchroni6ation 5..................................................................................................................................14
Bu&&er (ynchroni6ation )..................................................................................................................................15
0nit (u,,ary...................................................................................................................................................1)
.4ercises3 Per&or,ance !uring 'ab+e Access...................................................................................................1/
(o+utions3 Per&or,ance !uring 'ab+e Access...................................................................................................15
Consistency through nput Checks..........................................................................................................................1
Course "b#ecti$es...............................................................................................................................................2
%i4e! 8a+ues........................................................................................................................................................3
8a+ue 'ab+e.........................................................................................................................................................4
nserting a Data -ecor!.......................................................................................................................................5
8io+ation o& the %oreign 9ey Check...................................................................................................................)
%oreign 9ey %ie+!s : Check %ie+!s....................................................................................................................../
Data Consistency through %oreign 9eys.............................................................................................................1
%oreign 9ey De&initions in the Check %ie+!.......................................................................................................5
Check 'ab+e not .;ua+ to 8a+ue 'ab+e.............................................................................................................10
(e,antic Attributes...........................................................................................................................................11
'e4t 'ab+e.........................................................................................................................................................12
(u,,ary...........................................................................................................................................................13
.4ercises3 Consistency through nput Checks..................................................................................................14
(o+utions3 Consistency through nput Checks..................................................................................................1)
Depen!encies o& ABAP Dictionary "b#ects...........................................................................................................1
Course "b#ecti$es...............................................................................................................................................2
Acti$e an! nacti$e 8ersions.............................................................................................................................3
-unti,e "b#ects..................................................................................................................................................4
<an!+ing o& Depen!ent "b#ects..........................................................................................................................5
Where-0se! *ists................................................................................................................................................)
'he -epository n&or,ation (yste, ABAP Dictionary...................................................................................../
0nit (u,,ary.....................................................................................................................................................1
.4ercises3 Depen!encies o& ABAP Dictionary "b#ects......................................................................................5
(o+utions3 Depen!encies o& ABAP Dictionary "b#ects....................................................................................11
Changes to Database 'ab+es....................................................................................................................................1
Course "b#ecti$es...............................................................................................................................................2
Changes to 'ab+es...............................................................................................................................................3
<o2 is the (tructure A!#uste!=...........................................................................................................................4
Con$ersion Process 1..........................................................................................................................................5
Con$ersion Process 2..........................................................................................................................................)
Con$ersion Process 3........................................................................................................................................../
Con$ersion Process 4..........................................................................................................................................1
Con$ersion Process 5..........................................................................................................................................5
Possib+e Prob+e,s !uring Con$ersions.............................................................................................................10
-esu,ing 'er,inate! Con$ersions..................................................................................................................11
Appen! (tructures 1..........................................................................................................................................12
Appen! (tructures 2..........................................................................................................................................13
Appen! (tructures 3..........................................................................................................................................14
(u,,ary...........................................................................................................................................................15
.4ercises3 Changes to Database 'ab+es............................................................................................................1)
(o+utions3 Changes to Database 'ab+es............................................................................................................11
8ie2s.......................................................................................................................................................................1
Course "b#ecti$es...............................................................................................................................................2
Why !o you >ee! 8ie2s=...................................................................................................................................3
(tructure o& a 8ie2 - (tarting (ituation..............................................................................................................4
(tructure o& a 8ie2 - ?oin Con!ition..................................................................................................................5
(tructure o& a 8ie2 - %ie+! (e+ection @Pro#ectionA..............................................................................................)
(tructure o& a 8ie2 - (e+ection Con!ition........................................................................................................../
<o2 are 'ab+es *inke! to 8ie2s=......................................................................................................................1
(tructure o& the 8ie2..........................................................................................................................................5
Data (e+ection 2ith 8ie2s................................................................................................................................10
Database 8ie2s.................................................................................................................................................11
nc+u!es in Database 8ie2s..............................................................................................................................12
Baintenance 8ie2s...........................................................................................................................................13
nner an! "uter ?oins........................................................................................................................................14
0nit (u,,ary...................................................................................................................................................15
.4ercises3 8ie2s...............................................................................................................................................1)
(o+utions3 8ie2s...............................................................................................................................................15
(earch <e+ps............................................................................................................................................................1
Course "b#ecti$es...............................................................................................................................................2
-:3 (tan!ar! %unction3 nput <e+p.....................................................................................................................3
-e;uire,ents o& the nput <e+p..........................................................................................................................4
ABAP Dictionary "b#ect (earch <e+p................................................................................................................5
(e+ection Betho! o& a (earch <e+p.....................................................................................................................)
Description o& the Dia+og Beha$ior..................................................................................................................../
nter&ace o& a (earch <e+p...................................................................................................................................1
<o2 !o you 0se (earch <e+ps=..........................................................................................................................5
(earch <e+p Attach,ent in the ABAP Dictionary............................................................................................10
"$er$ie23 Bechanis,s &or the nput <e+p.......................................................................................................11
Per&or,ance o& the nput <e+p..........................................................................................................................12
A+ternati$e (earch Paths...................................................................................................................................13
Co++ecti$e (earch <e+ps an! .+e,entary (earch <e+ps....................................................................................14
Appen! (earch <e+ps........................................................................................................................................15
0nit (u,,ary...................................................................................................................................................1)
.4ercises3 (earch <e+ps....................................................................................................................................1/
(o+utions3 (earch <e+ps....................................................................................................................................21
Appen!i4.................................................................................................................................................................1
%+ight Data Bo!e+ &or ABAP 'raining Courses.................................................................................................2
Data Bo!e+..........................................................................................................................................................3
,p+e,entation in the ABAP Dictionary............................................................................................................4
Decision 'ree &or Bu&&ering................................................................................................................................5
8ie2 as (e+ection Betho! o& a (earch <e+p.......................................................................................................)
%urther "ptions &or (earch <e+ps......................................................................................................................../
>on-(tan!ar!3 (earch <e+p .4it.........................................................................................................................1
Bigration o& .4isting nput <e+ps......................................................................................................................5
A+ternati$e Disp+ays o& the nput <e+p.............................................................................................................10
,portant Benu Paths an! 'ransactions...........................................................................................................11
n!e4..................................................................................................................................................................13
0
SAP AG 1999
BC430 - ABAP Dictionary
SAP AG
BC430
BC430
ABAP Dictionary
-:3 (yste,
-e+ease3 4.)A
8ersion3 ?anuary 2000
Bateria+ nu,ber3 5003 3)51
@CA (AP A7 BC430 1
0.2
SAP AG 1999
Copyright 2000 SAP AG. All rights reserved.
Neither this training an!al nor any part thereo" ay
#e copied or reprod!ced in any "or or #y any eans$
or translated into another lang!age$ %itho!t the prior
consent o" SAP AG. &he in"oration contained in this
doc!ent is s!#'ect to change and s!ppleent %itho!t prior
notice.
All rights reserved.
Copyright
Trademarks:
Bicroso&t CD Win!o2s CD >' CD Po2erPoint CD WinWor! CD .4ce+ CD Pro#ect CD (E*-(er$er CD
Bu+ti,e!ia 8ie2er CD 8i!eo &or Win!o2s CD nternet .4p+orer CD >et(ho2 CD an! <'B* <e+p C
are registere! tra!e,arks o& Bicroso&t Corporation.
*otus (creenCa, C is a registere! tra!e,ark o& *otus De$e+op,ent Corporation.
8i$o C an! 8i$oActi$e C are registere! tra!e,arks o& -ea+>et2orksD nc.
A-( 'oo+set C is a registere! 'ra!e,ark o& D( Pro&. (cheer 7,b<D (aarbrFcken
A!obe C an! Acrobat C are registere! tra!e,arks o& A!obe (yste,s nc.
'ouch(en! n!e4 C is a registere! tra!e,ark o& 'ouch(en! Corporation.
8isio C is a registere! tra!e,ark o& 8isio Corporation.
BB CD "(:2 CD DB2:)000 C an! AG C are a registere! tra!e,ark o& BB Corporation.
n!eo C is a registere! tra!e,ark o& nte+ Corporation.
>etscape >a$igator CD an! >etscape Co,,unicator C are registere! tra!e,arks o& >etscape
Co,,unicationsD nc.
"(%:Boti& C is a registere! tra!e,ark o& "pen (o&t2are %oun!ation.
"-AC*. C is a registere! tra!e,ark o& "-AC*. CorporationD Ca+i&orniaD 0(A.
>%"-BG C-"n*ine &or (AP is a registere! tra!e,ark o& n&or,i4 (o&t2are ncorporate!.
0>G C an! G:"pen C are registere! tra!e,arks o& (C" (anta Cru6 "peration.
ADABA( C is a registere! tra!e,ark o& (o&t2are A7
@CA (AP A7 BC430 2
'he &o++o2ing are tra!e,arks or registere! tra!e,arks o& (AP A7H ABAPID nter(APD -8AD -:2D
-:3D -:3 -etai+D (AP @Wor!AD (APaccessD (AP&i+eD (AP&in!D (AP,ai+D (APo&&iceD (APscriptD
(APti,eD (APtronicD (AP-.DD (AP .ar+yWatchD (AP Archi$e*inkD (AP Business Work&+o2D an!
A*.:W.B. 'he (AP +ogo an! a++ other (AP pro!uctsD ser$icesD +ogosD or bran! na,es inc+u!e!
herein are a+so tra!e,arks or registere! tra!e,arks o& (AP A7.
"ther pro!uctsD ser$icesD +ogosD or bran! na,es inc+u!e! herein are tra!e,arks or registere!
tra!e,arks o& their respecti$e o2ners.
@CA (AP A7 BC430 3
0.3
SAP AG 1999
ABAP (or)#ench
ABAP Workbenc!
Conce"ts an# $ools
BC400 % #ays
&ana'(n' ABAP
)e*elo"ment Pro+ects
*BC40 2 #ays
)ata $rans,er
BC420 % #ays
$ecn(-.es o, /(st
Process(n' an# SAP 0.ery
BC40+ 3 #ays
ABAP )(ct(onary
BC430 2 #ays
SAPscr("t! 1orms )es('n
an# $e2t &ana'ement
BC4,0 3 #ays
CA$$!$est Workbenc an#
Com".ter A(#e# $est $ool
CA,-0 2 #ays
ABAP Per,ormance
$.n(n'
BC4.0 3 #ays
ABAP Pro'ramm(n'
$ecn(-.es
BC402 3 #ays
)(alo' Pro'ramm(n'
.s(n' 3n+oySAP Controls
BC4-2 2 #ays
)e*elo"(n'
4nternet A""l(cat(ons
BC440 % #ays
Pro'ramm(n'
5ser )(alo's
BC4-0 % #ays
Comm.n(cat(on
4nter,aces (n ABAP
BC4-+ 2 #ays
Pro'ramm(n'
)atabase 5"#ates
BC4-4 2 #ays
3nancements
an# &o#(,(cat(ons
BC42+ 3 #ays
Recommen#e# s.""lementary
co.rses are!
B.s(ness Process $ecnolo'(es
CA.2+$ CA.2,$ CA.2/
BC0.+ 6B.s(ness 4nte'rat(on
$ecnolo'y7
BC,-. 6A/378 BC,20$ BC,2-
0evel 3 0evel 2
ABAP 9b+ects! 9b+ect:
9r(ente# Pro'ramm(n'
(n R/3
BC404 3 #ays
@CA (AP A7 BC430 4
0.4
SAP AG 1999
5n(t % Dependencies o"
ABAP Dictionary
1#'ects
5n(t 6 Changes to &a#les
5n(t ; 2ie%s
5n(t < Search 3elps
5n(t 1 4ntrod!ction
5n(t 2 &a#les in the
ABAP Dictionary
5n(t 3 Per"orance in
&a#le Accesses
5n(t 4 Consistency thro!gh
4np!t Chec)s
Pre"ace
56ercises
Sol!tions
Appendi6es
Co!rse Content
@CA (AP A7 BC430 5
1
SAP AG 1999
7!nction o" the ABAP Dictionary in the 893 Syste
De"inition o" data#ase o#'ects
:ser-de"ined types
Services in the ABAP Dictionary
0in)ing to the developent and r!ntie
environents
4ntrod!ction
@CA (AP A7 BC430 1
1.2
SAP AG 1999
Co!rse 1#'ectives
At the end o" this !nit yo! %ill )no%;
&he "!nction o" the ABAP Dictionary in the 893 Syste
&he %ays to de"ine data o#'ects and types
&he services provided #y the ABAP Dictionary
3o% the ABAP Dictionary is lin)ed to the developent
and r!ntie environents
@CA (AP A7 BC430 2
1.3
SAP AG 1999
7!nction o" the ABAP Dictionary
DB ta#le
Services
Screen
Poss. val!es
&ype de"initions
Str!ct!re
&a#le type
Data eleents
74
DB o#'ects
&a#le
'he ABAP Dictionary per,its a centra+ ,anage,ent o& a++ the !ata !e&initions use! in the -:3
(yste,.
n the ABAP Dictionary you can create user-!e&ine! types @!ata e+e,entsD structures an! tab+e typesA
&or use in ABAP progra,s or in inter&aces o& &unction ,o!u+es. Database ob#ects such as tab+es an!
!atabase $ie2s can a+so be !e&ine! in the ABAP Dictionary an! create! 2ith this !e&inition in the
!atabase.
'he ABAP Dictionary a+so pro$i!es a nu,ber o& ser$ices that support progra, !e$e+op,ent. %or
e4a,p+eD setting an! re+easing +ocksD !e&ining an input he+p @%4 he+pA an! attaching a &ie+! he+p @%1
he+pA to a screen &ie+! are supporte!.
@CA (AP A7 BC430 3
1.4
SAP AG 1999
Data#ase
Data#ase 1#'ects in the ABAP Dictionary
&a#le -
ABAP Dictionary
&a#le 2
2ie%
1#'ects are a!toatically
created in the DB and
ad'!sted to changes
'ab+es an! !atabase $ie2s can be !e&ine! in the ABAP Dictionary.
'hese ob#ects are create! in the un!er+ying !atabase 2ith this !e&inition. Changes in the !e&inition o&
a tab+e or !atabase $ie2 are a+so auto,atica++y ,a!e in the !atabase.
n!e4es can be !e&ine! in the ABAP Dictionary to spee! up access to !ata in a tab+e. 'hese in!e4es
are a+so create! in the !atabase.
@CA (AP A7 BC430 4
1.5
SAP AG 1999
&ype De"initions in the ABAP Dictionary
<4P &o%n nae Street 3o!se no.
N!#ers
5ployee
Nae Address &elephone
7irst nae 0ast nae &o%n Address
'here are three !i&&erent type categories in the ABAP Dictionary3
Data elements: Describe an e+e,entary type by !e&ining the !ata typeD +ength an! possib+y
!eci,a+ p+aces.
Structures: Consist o& co,ponents that can ha$e any type.
Table types: Describe the structure o& an interna+ tab+e.
Any co,p+e4 user-!e&ine! type can be bui+t &ro, these basic types.
Example: 'he !ata o& an e,p+oyee is store! in a structure .BP*"J.. 2ith the co,ponents
>AB.D ADD-.(( an! '.*.P<">.. Co,ponent >AB. is a+so a structure 2ith co,ponents
%-(' >AB. an! *A(' >AB.. Both o& these co,ponents are e+e,entaryD i.e. their type is !e&ine!
by a !ata e+e,ent. 'he type o& co,ponent ADD-.(( is a+so !e&ine! by a structure 2hose
co,ponents are a+so structures. Co,ponent '.*.P<">. is !e&ine! by a tab+e type @since an
e,p+oyee can ha$e ,ore than one te+ephone nu,berA.
'ypes are use! &or e4a,p+e in ABAP progra,s or to !e&ine the types o& inter&ace para,eters o&
&unction ,o!u+es.
@CA (AP A7 BC430 5
1.6
SAP AG 1999
Services o" the ABAP Dictionary
Carr(er
1l('t n.mber
. . .
&a(ntenance o, ,l('ts
/=
No
.
Depart. city Arrival city
Carr(er
0400 7ran)"!rt Ne% =or)
0402 7ran)"!rt Ne% =or)
03
2402 7ran)"!rt Berlin
... ... ...
Code o" the "light connection
Co#e #e,(n(n' a ,l('t connect(on
bet>een t>o c(t(es8 e.'. 0400
1rank,.rt : ?e> @ork.
7-
74
'he ABAP Dictionary supports progra, !e$e+op,ent 2ith a nu,ber o& ser$ices3
nput he+ps @%4 he+psA &or screen &ie+!s can be !e&ine! 2ith search he+ps.
(creen &ie+!s can easi+y be assigne! a &ie+! he+p @%1 he+pA by creating !ocu,entation &or the !ata
e+e,ent.
An input check that ensures that the $a+ues entere! are consistent can easi+y be !e&ine! &or screen
&ie+!s using &oreign keys.
'he ABAP Dictionary pro$i!es support 2hen you set an! re+ease +ocks. 'o !o soD you ,ust create
+ock ob#ects in the ABAP Dictionary. %unction ,o!u+es &or setting an! re+easing +ocks are
auto,atica++y generate! &ro, these +ock ob#ectsH these can then be +inke! into the app+ication
progra,.
'he per&or,ance 2hen accessing this !ata can be i,pro$e! &or !atabase ob#ects @tab+esD $ie2sA
2ith bu&&ering settings.
By +oggingD you can s2itch on the auto,atic recor!ing o& changes to the tab+e entries.
@CA (AP A7 BC430 )
1.7
SAP AG 1999
0in)ing to the Developent and 8!ntie
5nvironent
ABAP
Dictionary 8ead type
de"initions
8eads str!ct!re o"
data#ase o#'ects
8!ntie environent
Developent
environent
ABAP
4nterpreter
Screen
4nterpreter
ABAP
tools
Screen
Painter
Data#ase
inter"ace
'he ABAP Dictionary is acti$e+y integrate! in the !e$e+op,ent an! runti,e en$iron,ents. .ach
change takes i,,e!iate e&&ect in the re+e$ant ABAP progra,s an! screens.
Examples:
When a progra, or screen is generate!D the ABAP interpreter an! the screen interpreter access the
type !e&initions store! in the ABAP Dictionary.
'he ABAP too+s an! the (creen Painter use the in&or,ation store! in the ABAP Dictionary to
support you !uring progra, !e$e+op,ent. An e4a,p+e o& this is the Get from Dictionary &unction
in the (creen PainterD 2ith 2hich you can p+ace &ie+!s o& a tab+e or structure !e&ine! in the ABAP
Dictionary in a screen.
'he !atabase inter&ace uses the in&or,ation about tab+es or !atabase $ie2s store! in the ABAP
Dictionary to access the !ata o& these ob#ects.
@CA (AP A7 BC430 /
1.
SAP AG 1999
:nit S!ary
&he ABAP Dictionary anages data de"initions.
:ser-de"ined types can #e created in the ABAP Dictionary.
&hey can #e !sed "or e6aple in ABAP progras.
&a#les and data#ase vie%s are de"ined in the ABAP
Dictionary and a!toatically created %ith this de"inition in
the !nderlying data#ase.
&he ABAP Dictionary provides a n!#er o" services that
s!pport progra developent.
&he ABAP Dictionary is actively integrated in the
developent and r!ntie environents.
@CA (AP A7 BC430 1
2
SAP AG 1999
&%o-level doain concept
*apped in the relational data#ase syste
4ncl!de str!ct!res
&echnical settings
)ata class
S(Ae cate'ory
B.,,er(n'
/o''(n'
&a#les in the ABAP Dictionary
@CA (AP A7 BC430 1
2.2
SAP AG 1999
At the end o" this !nit yo! %ill #e a#le to;
Create ta#les
:se the t%o-level doain concept
De"ine the technical settings o" a ta#le
Create and !se incl!de str!ct!res
Co!rse 1#'ectives
@CA (AP A7 BC430 2
2.3
SAP AG 1999
&a#les and 7ields
>ey 7!nction "ields
8o%
&a#le
>ey -
.
.
.
>ey 2
.
.
.
>ey n
.
.
.
7 -
.
.
.
7 2
.
.
.
7 n
.
.
.
'he structure o& the ob#ects o& app+ication !e$e+op,ent are ,appe! in tab+es on the un!er+ying
re+ationa+ !atabase.
'he attributes o& these ob#ects correspon! to &ie+!s o& the tab+e.
A tab+e consists o& co+u,ns @&ie+!sA an! ro2s @entriesA. t has a na,e an! !i&&erent attributesD such as
!e+i$ery c+ass an! ,aintenance authori6ation.
A &ie+! has a uni;ue na,e an! attributesH &or e4a,p+e it can be a key &ie+!.
A tab+e has one or ,ore key &ie+!sD ca++e! the pri,ary key.
'he $a+ues o& these key &ie+!s uni;ue+y i!enti&y a tab+e entry.
Jou ,ust speci&y a reference table &or &ie+!s containing a currency @!ata type C0--A or ;uantity
@!ata type E0A>A. t ,ust contain a &ie+! @reference fieldA 2ith the &or,at &or currency keys @!ata
type C09JA or the &or,at &or units @!ata type 0>'A. 'he &ie+! is on+y assigne! to the re&erence
&ie+! at progra, runti,e.
@CA (AP A7 BC430 3
2.4
SAP AG 1999
Basic 1#'ects o" the ABAP Dictionary
!ses
!ses
&a#le
&a#le
"ield
Data eleent Data eleent
Doain Doain
'he basic ob#ects &or !e&ining !ata in the ABAP Dictionary are tab+esD !ata e+e,ents an! !o,ains.
'he !o,ain is use! &or the technica+ !e&inition o& a tab+e &ie+! @&or e4a,p+e &ie+! type an! +engthA
an! the !ata e+e,ent is use! &or the se,antic !e&inition @&or e4a,p+e short !escriptionA.
A d!ma"n !escribes the $a+ue range o& a &ie+!. t is !e&ine! by its !ata type an! +ength. 'he $a+ue
range can be +i,ite! by speci&ying &i4e! $a+ues.
A data element !escribes the ,eaning o& a !o,ain in a certain business conte4t. t contains
pri,ari+y the &ie+! he+p @%1 !ocu,entationA an! the &ie+! +abe+s in the screen.
A &ie+! is not an in!epen!ent ob#ect. t is tab+e-!epen!ent an! can on+y be ,aintaine! 2ithin a tab+e.
Jou can enter the !ata type an! nu,ber o& p+aces !irect+y &or a &ie+!. >o !ata e+e,ent is re;uire! in
this case. nstea! the !ata type an! nu,ber o& p+aces is !e&ine! by speci&ying a d"rect type.
'he !ata type attributes o& a !ata e+e,ent can a+so be !e&ine! by speci&ying a bu"lt#"n typeD 2here
the !ata type an! nu,ber o& p+aces is entere! !irect+y.
@CA (AP A7 BC430 4
2.5
SAP AG 1999
&%o-0evel Doain Concept; 56aple
&a#le SP704
*AND&
Data eleent S?781*A48P Data eleent S?781*A48P Data eleent S?&1A48P Data eleent S?&1A48P
Doain S?A48P4D Doain S?A48P4D
CA884D
... A48P781* C1NN4D
... A48P&1
'he &+ight sche!u+e is store! in tab+e (P%*. 'ab+e &ie+!s A-P%-"B @!eparture airportA an!
A-P'" @arri$a+ airportA ha$e the sa,e !o,ain (KA-PD. Both &ie+!s use the sa,e !o,ain
because both &ie+!s contain airport Ds an! there&ore ha$e the sa,e technica+ attributes. 'hey ha$e a
!i&&erent se,antic ,eaningD ho2e$erD an! use !i&&erent !ata e+e,ents to !ocu,ent this. %ie+!
A-P%-"B uses !ata e+e,ent (K%-"BA-P an! &ie+! A-P'" uses !ata e+e,ent (K'"A-P.
@CA (AP A7 BC430 5
2.6
SAP AG 1999
&ransparent &a#les and Str!ct!res
&a#le
7ield - 7ield 2 7ield 37ield 4
Str!ct!re
7ield - 7ield 2 7ield 37ield 4
ABAP Dictionary
Physical de"inition o" the ta#le
&a#le
7ield - 7ield 2 7ield 3 7ield 4
Data#ase
A transparent tab+e is auto,atica++y create! on the !atabase 2hen it is acti$ate! in the ABAP
Dictionary. At this ti,e the !atabase-in!epen!ent !escription o& the tab+e in the ABAP Dictionary is
trans+ate! into the +anguage o& the !atabase syste, use!.
'he !atabase tab+e has the sa,e na,e as the tab+e in the ABAP Dictionary. 'he &ie+!s a+so ha$e the
sa,e na,e in both the !atabase an! the ABAP Dictionary. 'he !ata types in the ABAP Dictionary
are con$erte! to the correspon!ing !ata types o& the !atabase syste,.
'he or!er o& the &ie+!s in the ABAP Dictionary can !i&&er &ro, the or!er o& the &ie+!s on the
!atabase. 'his per,its you to insert ne2 &ie+!s 2ithout ha$ing to con$ert the tab+e. When a ne2 &ie+!
is a!!e!D the a!#ust,ent is ,a!e by changing the !atabase cata+og @A*'.- 'AB*.A. 'he ne2 &ie+!
is a!!e! to the !atabase tab+eD 2hate$er the position o& the ne2 &ie+! in the ABAP Dictionary.
ABAP progra,s can access a transparent tab+e in t2o 2ays. "ne 2ay is to access the !ata containe!
in the tab+e 2ith "P.> (E* @or .G.C (E*A. With the other ,etho!D the tab+e !e&ines a structure!
type that is accesse! 2hen $ariab+es @or ,ore co,p+e4 typesA are !e&ine!.
Jou can a+so create a structure! type in the ABAP Dictionary &or 2hich there is no correspon!ing
ob#ect in the !atabase. (uch types are ca++e! structures. (tructures can a+so be use! to !e&ine the
types o& $ariab+es.
@CA (AP A7 BC430 )
2.7
SAP AG 1999
4ncl!de Str!ct!res
&a#le 2 &a#le -
7ield - 7ield 2 7ield A 7ield B 7ield 4 7ield 3 7ield A 7ield B
7ield A 7ield B
Data#ase
7ield - 7ield 2 7ield A 7ield B 7ield A 7ield B 7ield 3 7ield 4
4ncl!de str!ct!re
(tructures can be inc+u!e! in tab+es or other structures to a$oi! re!un!ant structure !e&initions.
A tab+e ,ay on+y be inc+u!e! as an entire tab+e.
A chain o& inc+u!es ,ay on+y contain one !atabase tab+e. 'he tab+e in 2hich you are inc+u!ing
be+ongs to the inc+u!e chain. 'his ,eans that you ,ay not inc+u!e a transparent tab+e in a transparent
tab+e.
nc+u!es ,ay contain &urther inc+u!es.
%oreign key !e&initions are genera++y i,parte! &ro, the inc+u!e to the inc+u!ing tab+e. 'he attributes
o& the &oreign key !e&inition are passe! &ro, the inc+u!e to the inc+u!ing tab+e so that the &oreign key
!epen!s on the !e&inition in the inc+u!e.
@CA (AP A7 BC430 /
2.
SAP AG 1999
&echnical Settings
B!""ering
&a#le #!""er
893
4n >(c "ys(cal
area o, te #atabase
so.l# te table
be store#B
0ogging
So.l# te recor#s
o, te table be
b.,,ere#B
So.l# can'es to
te #ata recor#s be
lo''e#B
=o> many recor#s
>(ll te table
"robably conta(nB
Si@e category
Data class
D
a
t
a
#
a
s
e
D
a
t
a
#
a
s
e
Jou ,ust ,aintain the technica+ settings 2hen you !e&ine a transparent tab+e in the ABAP
Dictionary.
'he technica+ settings are use! to in!i$i!ua++y opti,i6e the storage re;uire,ents an! accessing
beha$ior o& !atabase tab+es.
'he technica+ settings can be use! to !e&ine ho2 the tab+e shou+! be han!+e! 2hen it is create! on the
!atabaseD 2hether the tab+e shou+! be bu&&ere! an! 2hether changes to entries shou+! be +ogge!.
'he tab+e is auto,atica++y create! on the !atabase 2hen it is acti$ate! in the ABAP Dictionary. 'he
storage area to be se+ecte! @tab+espaceA an! space a++ocation settings are !eter,ine! &ro, the settings
&or the !ata c+ass an! si6e category.
'he settings &or bu&&ering !e&ine 2hether an! ho2 the tab+e shou+! be bu&&ere!.
Jou can !e&ine 2hether changes to the tab+e entries shou+! be +ogge!.
@CA (AP A7 BC430 1
2.$
SAP AG 1999
Data Class
&a#les in the ABAP Dictionary
&a#lespace
1rg. data
&a#lespace
*aster data
&a#lespace
&rans. data
&a#lespace
Syste data
Data#ase
1rgani@ational data &ransaction data Syste data *aster data
&a#le -
&a#le 3
&a#le 4
&a#le 2
&a#le ,
&a#le +
&a#le .
&a#le /
&a#le A
&a#le -
&a#le 3
&a#le 4
&a#le 2
&a#le ,
&a#le +
&a#le .
&a#le /
&a#le A
'he !ata c+ass +ogica++y !e&ines the physica+ area o& the !atabase @&or "-AC*. the tab+espaceA in
2hich your tab+e shou+! be store!. & you choose the !ata c+ass correct+yD the tab+e 2i++ auto,atica++y
be create! in the appropriate area on the !atabase 2hen it is acti$ate! in the ABAP Dictionary.
'he ,ost i,portant !ata c+asses are master dataD transact"!n dataD !r%an"&at"!nal data an!
system data.
Baster !ata is !ata that is rare+y ,o!i&ie!. An e4a,p+e o& ,aster !ata is the !ata o& an a!!ress &i+eD
&or e4a,p+e the na,eD a!!ress an! te+ephone nu,ber.
'ransaction !ata is !ata that is &re;uent+y ,o!i&ie!. An e4a,p+e is the ,ateria+ stock o& a 2arehouseD
2hich can change a&ter each purchase or!er.
"rgani6ationa+ !ata is !ata that is !e&ine! !uring custo,i6ing 2hen the syste, is insta++e! an! that is
rare+y ,o!i&ie! therea&ter. 'he country keys are an e4a,p+e.
(yste, !ata is !ata that the -:3 (yste, itse+& nee!s. 'he progra, sources are an e4a,p+e.
%urther !ata c+assesD ca++e! custo,er !ata c+asses @0(-D 0(-1AD are pro$i!e! &or custo,ers. 'hese
shou+! be use! &or custo,er !e$e+op,ents. (pecia+ storage areas ,ust be a++ocate! in the !atabase.
@CA (AP A7 BC430 5
2.10
SAP AG 1999
Si@e Category
4nitial
56tent
7irst
56tent
Second
56tent
&echnical Settings
S(Ae cate'ory
$ABA
$ABB
$ABC
-
3
4
&ABA &ABA
&ABB &ABB
&ABC &ABC
Data#ase
'he si6e category !escribes the e4pecte! storage re;uire,ents &or the tab+e on the !atabase.
An initia+ e4tent is reser$e! 2hen a tab+e is create! on the !atabase. 'he si6e o& the initia+ e4tent is
i!entica+ &or a++ si6e categories. & the tab+e nee!s ,ore space &or !ata at a +ater ti,eD e4tents are
a!!e!. 'hese a!!itiona+ e4tents ha$e a &i4e! si6e that is !eter,ine! by the si6e category speci&ie! in
the ABAP Dictionary.
Jou can choose a si6e category &ro, 0 to 4. A &i4e! e4tent si6eD 2hich !epen!s on the !atabase
syste, use!D is assigne! to each category.
Correct+y assigning a si6e category there&ore ensures that you !o not create a +arge nu,ber o& s,a++
e4tents. t a+so pre$ents storage space &ro, being 2aste! 2hen creating e4tents that are too +arge.
@CA (AP A7 BC430 10
2.11
SAP AG 1999
0ogging
Application
transaction
Change
a record
Syste pro"iles
rec9client BA00
...
...
&AB
7ield 2 7ield 3 7ield +
&AB 0og ta#le
7ield - 7ield 2 7ield 3
Data#ase
ABAP Dictionary
0og &AB 0og &AB
Bo!i&ications to the entries o& a tab+e can be recor!e! an! store! using +ogging.
'o acti$ate +oggingD the correspon!ing &ie+! ,ust be se+ecte! in the technica+ settings. *oggingD
ho2e$erD on+y 2i++ take p+ace i& the -:3 (yste, 2as starte! 2ith a pro&i+e containing para,eter 'rec/
client'. "n+y se+ecting the &+ag in the ABAP Dictionary is not su&&icient to trigger +ogging.
Para,eter 'rec/client' can ha$e the &o++o2ing settings3
rec/client L A** A++ c+ients shou+! be +ogge!.
rec/client L 000M...N "n+y the speci&ie! c+ients shou+! be +ogge!.
rec/client L "%%*ogging is not enab+e! on this syste,.
'he !ata ,o!i&ications are +ogge! in!epen!ent+y o& the up!ate. 'he +ogs can be !isp+aye! 2ith the
'ransaction Table History @(C03A.
'!%%"n% creates a (b!ttleneck( "n t)e system:
A!!itiona+ 2rite access &or each ,o!i&ication to tab+es being +ogge!.
'his can resu+t in +ock situations a+though the users are accessing !i&&erent app+ication tab+esO
@CA (AP A7 BC430 11
2.12
SAP AG 1999
:nit S!ary
All the #!siness-oriented data is adinistered in the "or
o" ta#les %hose de"inition is stored in the ABAP
Dictionary.
A t%o-level doain concept is !sed "or de"ining the
ta#les. &he seantic de"inition is ipleented %ith data
eleents and the technical de"inition %ith doains.
&he "ields o" incl!de str!ct!res can #e incl!ded in ta#les.
&he technical settings o" a ta#le de"ine ho% the ta#le
sho!ld #e stored in the data#ase Cta#lespace$ e6tent si@eD
and %hether changes to the data records sho!ld #e
logged.
@CA (AP A7 BC430 12
2.13Exerc"se Data
.4p+anation o& the (y,bo+s in the .4ercises an! (o+utions
Exerc"ses
S!lut"!ns
Course "b#ecti$es
Business (cenario
'ips P 'ricks
Warning or Caution
Data in the .4ercises
'ype o& !ata Data in the training syste,
Data ,o!e+ BCK'-A8.* yes
A++ ob#ects in !e$e+op,ent c+ass
BCKDA'AB"D.*
yes
A++ ob#ects in !e$e+op,ent c+ass BC430 yes
(hen creating ABAP Dictionary o#'ects in this co!rse$ yo!
sho!ld adhere to the "ollo%ing conventions;
@o.r ob+ect names ,or tables8 #ata elements an# #oma(ns
so.l# be'(n >(t C an# en# >(t yo.r t>o:#('(t 'ro." n.mber
6227.
5se bot yo.r o>n #ata elements or #oma(ns
6CD9b+ectnameE227 an# stan#ar# SAP ob+ects ,or te table
,(el#s.
All ob+ects so.l# be create# as local ob+ects 6#e*elo"ment
class Etp7.
&he appendi6 contains in"oration a#o!t the "light data odel !sed
in the training co!rses.
@CA (AP A7 BC430 13
2.14Exerc"ses: Tables "n t)e *+*, D"ct"!nary
-n"t: Tables "n t)e *+*, D"ct"!nary
At the conc+usion o& these e4ercises you 2i++ be ab+e to3
Create tab+es an! use the t2o-+e$e+ !o,ain concept
De&ine the technica+ settings sensib+y
Docu,ent &ie+!s
Create an! use inc+u!e structures
n these e4ercises the tab+es o& the &+ight ,o!e+ 2i++ be enhance! 2ith
e,p+oyee ,anage,ent. 'his e,p+oyee ,anage,ent 2i++ enab+e the
air+ines to enter an! e$a+uate !ata about their e,p+oyees @e.g. na,eD
personne+ nu,berD sa+aryD !epart,entD etc.A an! about assign,ents 2ithin
the organi6ation @air+ine !epart,entsA.
n this e4erciseD t2o tab+es 2i++ be create! &or the e,p+oyee !ata an! the
air+ine !epart,ents.
'hese tab+es 2i++ be enhance! step by step in the &o++o2ing e4ercises.
2-1 Create t2o transparent tab+es Q.BP*"J44 an! QD.PB.>'44 an! !e&ine their key
&ie+!s. De&ine the technica+ settings 2hen you acti$ate the tab+es.
>ote the &o++o2ing3
Data is ,aintaine! &or three air+ines. An air+ine has 20D000 e,p+oyees an! bet2een 10
an! 30 !epart,ents. Do not bu&&er or +og the !ata. Bu&&ering 2i++ be !iscusse! in the
e4ercises &or the ne4t unit.
2-1-1 Create tab+e Q.BP*"J44. 'he !ata &or the e,p+oyees is ,aintaine! here. 'he
na,es an! a!!resses o& the e,p+oyees an! their sa+aries is store! here.
@CA (AP A7 BC430 14
Table .E/,'01xx
2"eld name Data element D!ma"n Type3 'en%t)
Client
(KBA>D' BA>D'
Carrier
(KCA--KD (KCA--KD
Personnel number
o2n o2n >0BCD 10
First name
(K%>AB. (K%>AB.
Last name
(K*>AB. (K*>AB.
Department code
o2n o2n C<A-D 4
Area
o2n o2n C<A-D 1
Salary
o2n o2n C0--D 10
2 !eci,a+ p+aces
Currency
(KC0--C"D. (KC0--
2-1-2 Create tab+e QD.PB.>'44. 'his tab+e contains the !epart,ents o& the
air+ine. .ach !epart,ent can be reache! 2ith a te+ephone an! &a4 nu,ber.
Table .DE,/E4Txx
2"eld name Data element D!ma"n Type3 'en%t)
Client
(KBA>D' BA>D'
Carrier
(KCA--KD (KCA--KD
Department code
o2n o2n C<A-D 4
Telephone
o2n (KP<">. C<A-D 30
Fa
o2n (KP<">. C<A-D 30
2-2 Docu,ent &ie+!s Personnel number an! Department code!
2-3 Changes to tab+es Q.BP*"J44 an! QD.PB.>'44 are critica+ an! there&ore ,ust be
recor!e!. 'he ,aintenance transaction ,ust note 2ho +ast change! a tab+e entry.
'his can be !one by appen!ing &ie+!s &or the personne+ nu,ber o& the +ast person to
change the entry an! the !ate o& the +ast entry to tab+es Q.BP*"J44 an!
QD.PB.>'44. Bake sure that the sa,e &ie+!s are a$ai+ab+e in both tab+es &or
recor!ing the changes by a!!ing these &ie+!s to both tab+es 2ith a substructure
QC<A>7.44. Create a ne2 !ata e+e,ent &or &ie+! Lastchan"edbyD but use an
e4isting !o,ain. 0se (KC<DA'. as !ata e+e,ent &or the !ate o& the +ast change.
What actions are e4ecute! on acti$ation in the !atabase=
4!te: n a Rrea+R app+icationD the abo$e enhance,ent 2ou+! a+2ays cause the
stan!ar! tab+e ,aintenance &or the t2o tab+es to be !eacti$ate!. Jour o2n
,aintenance transactions 2ou+! instea! be create! &or the tab+e in 2hich the &ie+!s
&or change +ogging 2ou+! be &i++e! interna++y by the progra, an! not !irect+y by the
user.
@CA (AP A7 BC430 15
Creation o& such transactions goes beyon! the scope o& this course. n this course
2e 2i++ there&ore assu,e that a++ users the,se+$es @correct+yA &i++ these &ie+!s in the
stan!ar! tab+e ,aintenance routine.
(tart Progra, BC430KC<.C9 in 'ransaction (.31. 'his progra,
checks 2hether your so+utions are correct an! &i++s the ne2 tab+es
Q.BP*"J44 an! QD.PB.>'44 2ith sa,p+e !ata nee!e! &or +ater
e4ercises.
@CA (AP A7 BC430 1)
2.15S!lut"!ns: Tables "n t)e *+*, D"ct"!nary
-n"t: Tables "n t)e *+*, D"ct"!nary
2-1 'he path
T!!ls *+*, 5!rkbenc) De6el!pment D"ct"!nary or 'ransaction (.11
takes you to the o$er$ie2 screen o& the ABAP Dictionary.
2-1-1 'o create tab+e Q.BP*"J443
1A Bark Database table an! enter tab+e na,e Q.BP*"J44 in the
correspon!ing input &ie+!.
2A Choose Create.
3A .nter a short te4t in the ,aintenance screen &or the tab+e.
4A Choose !e+i$ery c+ass A an! ,ark Table maintenance allo#ed.
5A >o2 c+ick on tab page Fields to go to the ,aintenance screen &or the
&ie+! !e&initions. .nter the &ie+! na,es there @they nee! not +ie in the
custo,er na,espaceA.
)A 0se the gi$en !ata e+e,ents &or &ie+!s Client$ Carrier$ First name$ Last
name an! Currency by entering the na,es o& the !ata e+e,ents in
co+u,n Field type. (a$e your entries.
/A Create your o2n !ata e+e,ents &or &ie+!s Personnel number$
Department code$ Area an! Salary. .nter a na,e @QSob#ectT44A &or
the !ata e+e,ent in co+u,n Field type. Doub+e-c+ick on the na,e o&
the !ata e+e,ent. 'he !ata e+e,ent !e&inition appears.
1A .nter a short te4t @co,ponent o& the %1 he+pA. >o2 c+ick on tab page
Field label an! store the te4ts &or the &ie+! +abe+s there.
5A Jou a+so ha$e to assign the !ata e+e,ent a technica+ !escription
@!o,ainA. C+ick on tab page Definition an! enter a na,e
@QSob#ectT44A &or your !o,ain there. & the !o,ain is pre!e&ine!D
acti$ate the !ata e+e,ent an! return to the ,aintenance screen &or
the tab+e &ie+!s @%3 or A.. "ther2ise !oub+e-c+ick on the !o,ain
na,e. 'he !o,ain !e&inition appears.
10A De&ine the short !escriptionD !ata type @&or e4a,p+e >0BCA an!
nu,ber o& characters @&or e4a,p+e 10A there. Acti$ate the !o,ain.
11A >a$igate back one screen @%3 or A to the !ata e+e,ent !e&inition an!
acti$ate your !ata e+e,ent.
12A >a$igate back one ,ore screen to the &ie+! !e&inition. (tart again there
2ith /A unti+ a++ the tab+e &ie+!s are !e&ine!. (a$e your tab+e.
13A De&ine the reference table an! reference field &or the sa+ary &ie+!.
Doub+e-c+ick on the &ie+! na,e an! enter the &o++o2ing in the ne4t
!ia+og bo43
@CA (AP A7 BC430 1/
-e&erence tab+e3 Q.BP*"J44
-e&erence &ie+!3
Currency
14A De&ine the key &ie+!s &or tab+e Q.BP*"J44. %ie+!s Client, Carrier an!
Personnel number uni;ue+y i!enti&y an entry. 'hey ,ust there&ore
be ,arke! as key &ie+!s. Jou can !o this by ,arking the %ey co+u,n
&o++o2ing the &ie+! na,e. 'he key &ie+!s ,ust be at the beginning o&
the &ie+! +ist in this or!er.
15A Acti$ate the tab+e. 'he ,aintenance screen &or the technica+ settings
appears auto,atica++y3
(ince the contents o& tab+e Q.BP*"J44 !o not change &re;uent+yD
you ,ust choose !ata c+ass APP*0 @,aster !ataA. 'he e4pecte!
nu,ber o& recor!s in tab+e Q.BP*"J44 is )0D000D so you ,ust
choose si6e category 2. 'he tab+e shou+! not be either bu&&ere! or
+ogge!.
Q.BP*"J44
Data c+ass APP*0 @,aster !ataA
(i6e category
&
Bu&&ering >ot a++o2e!
*ogging >o +ogging
(a$e the technica+ settings. 7o back to the ,aintenance screen o& the tab+e
@%3 or A. 'he tab+e is acti$ate!.
2-1-2 'o create tab+e QD.PB.>'443
1A to 12A see (o+ution 2-1-1
13A De&ine the key &ie+!s &or tab+e QD.PB.>'44. %ie+!s Client, Carrier
an! Department code uni;ue+y i!enti&y an entry. 'hey ,ust
there&ore be ,arke! as key &ie+!s. Jou can !o this by ,arking the
%ey co+u,n &o++o2ing the &ie+! na,e.
14A Acti$ate your tab+e an! !e&ine the technica+ settings3
(ince the contents o& tab+e QD.PB.>'44 !o not change &re;uent+yD
you ,ust choose !ata c+ass APP*0 @,aster !ataA. 'he e4pecte!
nu,ber o& recor!s in tab+e QD.PB.>'44 is !e&ine! to be at ,ost
50 entriesD so you ,ust choose si6e category 0. 'he tab+e shou+! not
be either bu&&ere! or +ogge!.
QD.PB.>'44
Data c+ass APP*0 @,aster !ataA
(i6e category
'
Bu&&ering >ot a++o2e!
*ogging >o +ogging
@CA (AP A7 BC430 11
2-2 'o !ocu,ent &ie+!s Personnel number an! Department code3
1A Doub+e-c+ick to go to the !ata e+e,ent in the !ata e+e,ent !e&inition. With
Display ()* Chan"e s2itch to change ,o!e. Press Documentation or
choose Goto Documentation.
2A .nter a te4t &or the &ie+!s an! sa$e your entries.
2-3 Create structure QC<A>7.44 as &o++o2s3
+, -n the initial screen of the A.AP Dictionary$ mar/ Data type and enter
0CHA1G2 in the correspondin" field! Choose Create!
2A Bark Structure in the ne4t !ia+og bo4.
3A .nter the &ie+! na,es in co+u,n Component an! the correspon!ing !ata
e+e,ents in co+u,n Component type. Create one &ie+! &or the personne+
nu,ber an! another one &or the !ate o& change. 0se !ata e+e,ent
(KC<DA'. &or the secon! &ie+!. Create your o2n !ata e+e,ent &or the &irst
&ie+!D as in .4ercise 2-1. 0se the !o,ain you create! &or the personne+
nu,ber in tab+e Q.BP*"J44.
4A Acti$ate structure QC<A>7.44.
>o2 insert QC<A>7.44 as an inc+u!e in tab+es Q.BP*"J44 an!
QD.PB.>'44 as &o++o2s3
1A 7o to the ,aintenance screen &or tab+e Q.BP*"J44.
2A Choose 1e# ro#s an! position the cursor on the &irst ne2 &ie+!.
3A Choose 2dit -nclude -nsert!
3, -n the net dialo" bo$ enter the name 0CHA1G2 and choose Continue!
5A Acti$ate the tab+e.
)A Jou can !isp+ay the actions that 2ere per&or,e! in the !atabase 2ith 4tilities U
Acti5ation lo".
/A (tart 2ith step 1A to insert substructure QC<A>7.44 in tab+e QD.PB.>'44.
@CA (AP A7 BC430 15
3
SAP AG 1999
4nde6es
Pr(mary (n#e2 an# secon#ary (n#e2
Str.ct.re o, an (n#e2
)ata access .s(n' an (n#e2
&a#le #!""ering
A#*anta'es o, b.,,er(n'
/ocal table b.,,ers
B.,,er(n' ty"es
B.,,er syncron(Aat(on
W(c tables so.l# be b.,,ere#B
Per"orance d!ring &a#le Access
@CA (AP A7 BC430 1
3.2
SAP AG 1999
Co!rse 1#'ectives
At the end o" this !nit yo! %ill #e a#le to;
F!dge %hen ta#le accesses can #e speeded !p
#y !sing inde6es
Create inde6es in the ABAP Dictionary
56plain the di""erent #!""ering types
F!dge %hen it a)es sense to #!""er a ta#le and
%hich #!""ering type yo! sho!ld choose
B!""er a ta#le !sing the technical settings
@CA (AP A7 BC430 2
3.3
SAP AG 1999
&a#le SC1:N&58
4nde6 on
A48P18&
*AND& CA884DC1:N&N:* A48P18&
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
/=
BA
5A
/=
BA
/=
AA
/=
BA
/=
/=
BA
/=
/=
0000000+
00000004
0000000-
00000002
00000003
0000000/
0000000-
00000003
0000000-
0000000-
00000004
00000002
0000000,
0000000A
ACA
AC5
B58
0C=
038
B58
D5N
78A
0C=
0G(
038
*:C
8&*
3A*
A48P18& P
ACA
AC5
B58
B58
D5N
78A
3A*
0C=
0C=
0G(
038
038
*:C
8&*
-
2
3
,
/
A
-4
4
.
-0
+
--
-2
-3
Binary
search
Str!ct!re o" an 4nde6
SELECT * FROM
SCOUNTER WHERE
AIRPORT = 'LHR'.
An in!e4 can be use! to spee! up the se+ection o& !ata recor!s &ro, a tab+e.
An in!e4 can be consi!ere! to be a copy o& a !atabase tab+e re!uce! to certain &ie+!s. 'he !ata is
store! in sorte! &or, in this copy. 'his sorting per,its &ast access to the recor!s o& the tab+e @&or
e4a,p+e using a binary searchA. >ot a++ o& the &ie+!s o& the tab+e are containe! in the in!e4. 'he in!e4
a+so contains a pointer &ro, the in!e4 entry to the correspon!ing tab+e entry to per,it a++ the &ie+!
contents to be rea!.
When creating in!e4esD p+ease note that3
An in!e4 can on+y be use! up to the +ast speci&ie! &ie+! in the se+ectionO 'he &ie+!s 2hich are
speci&ie! in the W<.-. c+ause &or a +arge nu,ber o& se+ections shou+! be in the &irst position.
"n+y those &ie+!s 2hose $a+ues signi&icant+y restrict the a,ount o& !ata are ,eaning&u+ in an
in!e4.
When you change a !ata recor! o& a tab+eD you ,ust a!#ust the in!e4 sorting. 'ab+es 2hose
contents are &re;uent+y change! there&ore shou+! not ha$e too ,any in!e4es.
Bake sure that the in!e4es on a tab+e are as !is#unct as possib+e.
@CA (AP A7 BC430 3
3.4
SAP AG 1999
&AB
4nde6 A
72 <
7- 72 73
-0
A3 -0 &e6t
Access %ith 4nde6es
4nde6 0
7- <
1ptii@er
SELECT * FROM TAB
WHERE F2 = `10.
Progra
'he !atabase opti,i6er !eci!es 2hich in!e4 on the tab+e shou+! be use! by the !atabase to access
!ata recor!s.
Jou ,ust !istinguish bet2een the pri,ary in!e4 an! secon!ary in!e4es o& a tab+e. 'he pri,ary
in!e4 contains the key &ie+!s o& the tab+e. 'he pr"mary "ndex is auto,atica++y create! in the !atabase
2hen the tab+e is acti$ate!. & a +arge tab+e is &re;uent+y accesse! such that it is not possib+e to app+y
pri,ary in!e4 sortingD you shou+! create sec!ndary "ndexes &or the tab+e.
'he in!e4es on a tab+e ha$e a three-character in!e4 D. R0R is reser$e! &or the pri,ary in!e4.
Custo,ers can create their o2n in!e4es on (AP tab+esH their Ds ,ust begin 2ith J or Q.
& the in!e4 &ie+!s ha$e key &unctionD i.e. they a+rea!y uni;ue+y i!enti&y each recor! o& the tab+eD an
in!e4 can be ca++e! a uni6ue inde. 'his ensures that there are no !up+icate in!e4 &ie+!s in the
!atabase.
When you !e&ine a secon!ary in!e4 in the ABAP DictionaryD you can speci&y 2hether it shou+! be
create! on the !atabase 2hen it is acti$ate!. (o,e in!e4es on+y resu+t in a gain in per&or,ance &or
certain !atabase syste,s. Jou can there&ore speci&y a +ist o& !atabase syste,s 2hen you !e&ine an
in!e4. 'he in!e4 is then on+y create! on the speci&ie! !atabase syste,s 2hen acti$ate!.
@CA (AP A7 BC430 4
3.5
SAP AG 1999
Comm.n(cat(on system
Data#ase
Data Access !sing the B!""er
)atabase (nter,ace
SELECT * FROM SBOOK
WHERE ...
ABAP progra
R/3 table b.,,er
)atabase
"rocesses
)atabase
b.,,er
'ab+e bu&&ering increases the per&or,ance 2hen the recor!s o& the tab+e are rea!.
'he recor!s o& a bu&&ere! tab+e are rea! !irect+y &ro, the +oca+ bu&&er o& the app+ication ser$er on
2hich the accessing transaction is running 2hen the tab+e is accesse!. 'his e+i,inates ti,e-
consu,ing !atabase accesses. 'he access i,pro$es by a &actor o& 10 to 100. 'he increase in spee!
!epen!s on the structure o& the tab+e an! on the e4act syste, con&iguration. Bu&&ering there&ore can
great+y increase the syste, per&or,ance.
& the storage re;uire,ents in the bu&&er increase !ue to &urther !ataD the !ata that has not been
accesse! &or the +ongest ti,e is !isp+ace!. 'his !isp+ace,ent takes p+ace asynchronous+y at certain
ti,es 2hich are !e&ine! !yna,ica++y base! on the bu&&er accesses. Data is on+y !isp+ace! i& the &ree
space in the bu&&er is +ess than a pre!e&ine! $a+ue or the ;ua+ity o& the access is not satis&actory at
this ti,e.
.ntering V'AB in the co,,an! &ie+! resets the tab+e bu&&ers on the correspon!ing app+ication ser$er.
"n+y use this co,,an! i& there are inconsistencies in the bu&&er. n +arge syste,sD it can take se$era+
hours to &i++ the bu&&ers. 'he per&or,ance is consi!erab+y re!uce! !uring this ti,e.
@CA (AP A7 BC430 5
3.6
SAP AG 1999
Application server 2 Application server -
Progra reads data
"ro a #!""ered ta#le
8ecords are loaded
into the #!""er
$AB
Data#ase
&a#le B!""ering
$able b.,,er $able b.,,er
Pro'ram Pro'ram
'he -:3 (yste, ,anages an! synchroni6es the bu&&ers on the in!i$i!ua+ app+ication ser$ers. & an
app+ication progra, accesses !ata o& a tab+eD the !atabase inter&aces !eter,ines 2hether this !ata +ies
in the bu&&er o& the app+ication ser$er. & this is the caseD the !ata is rea! !irect+y &ro, the bu&&er. &
the !ata is not in the bu&&er o& the app+ication ser$erD it is rea! &ro, the !atabase an! +oa!e! into the
bu&&er. 'he bu&&er can there&ore satis&y the ne4t access to this !ata.
'he bu&&ering type !eter,ines 2hich recor!s o& the tab+e are +oa!e! into the bu&&er o& the app+ication
ser$er 2hen a recor! o& the tab+e is accesse!. 'here are three !i&&erent bu&&ering types.
With 7ull bu77er"n%D a++ the tab+e recor!s are +oa!e! into the bu&&er 2hen one recor! o& the tab+e is
accesse!.
With %ener"c bu77er"n%D a++ the recor!s 2hose +e&t-#usti&ie! part o& the key is the sa,e are +oa!e!
into the bu&&er 2hen a tab+e recor! is accesse!.
With s"n%le#rec!rd bu77er"n%D on+y the recor! that 2as accesse! is +oa!e! into the bu&&er.
@CA (AP A7 BC430 )
3.7
SAP AG 1999
Application server
SELECT * FROM SCOUNTER WHERE
MANDT = '001' AND CARRID = 'LH'
AND COUNTNUM = '00000004'.
B!""er contents
0000000-
0000000-
00000002
00000003
00000004
0000000-
00000002
00000003
00000004
0000000+
0000000,
0000000/
0000000A
0000000-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
ACA
AC5
B58
0C=
038
B58
D5N
78A
0C=
0G(
038
*:C
8&*
3A*
Data#ase ta#le SC1:N&58
A48P18& *AND& CA884D C1:N&N:*
0000000-
0000000-
00000002
00000003
00000004
0000000-
00000002
00000003
00000004
0000000+
0000000,
0000000/
0000000A
0000000-
AA
BA
BA
BA
BA
03
03
03
03
03
03
03
03
:A
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
ACA
AC5
B58
0C=
038
B58
D5N
78A
0C=
0G(
038
*:C
8&*
3A*
7!ll B!""ering
AA
BA
BA
BA
BA
03
03
03
03
03
03
03
03
:A
With &u++ bu&&eringD the tab+e is either co,p+ete+y or not at a++ in the bu&&er. When a recor! o& the
tab+e is accesse!D a++ the recor!s o& the tab+e are +oa!e! into the bu&&er.
When you !eci!e 2hether a tab+e shou+! be &u++y bu&&ere!D you ,ust take the tab+e si6eD the nu,ber
o& rea! accesses an! the nu,ber o& 2rite accesses into consi!eration. 'he s,a++er the tab+e isD the
,ore &re;uent+y it is rea! an! the +ess &re;uent+y it is 2rittenD the better it is to &u++y bu&&er the tab+e.
%u++ bu&&ering is a+so a!$isab+e &or tab+es ha$ing &re;uent accesses to recor!s that !o not e4ist. (ince
a++ the recor!s o& the tab+e resi!e in the bu&&erD it is a+rea!y c+ear in the bu&&er 2hether or not a recor!
e4ists.
'he !ata recor!s are store! in the bu&&er sorte! by tab+e key. When you access the !ata 2ith
(.*.C'D on+y &ie+!s up to the +ast speci&ie! key &ie+! can be use! &or the access. 'he +e&t-#usti&ie!
part o& the key shou+! there&ore be as +arge as possib+e &or such accesses. %or e4a,p+eD i& the &irst key
&ie+! is not !e&ine!D the entire tab+e is scanne! in the bu&&er. 0n!er these circu,stancesD a !irect
access to the !atabase cou+! be ,ore e&&icient i& there is a suitab+e secon!ary in!e4 there.
@CA (AP A7 BC430 /
3.
SAP AG 1999
Application server
B!""er contents
0000000-
00000002
00000003
00000004
0000000+
0000000,
0000000/
0000000A
03
03
03
03
03
03
03
03
00-
00-
00-
00-
00-
00-
00-
00-
B58
D5N
78A
0C=
0G(
038
*:C
8&*
Data#ase ta#le SC1:N&58
*AND& CA884D C1:N&N:*
0000000-
0000000-
00000002
00000003
00000004
0000000-
00000002
00000003
00000004
0000000+
0000000,
0000000/
0000000A
0000000-
AA
BA
BA
BA
BA
03
03
03
03
03
03
03
03
:A
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
ACA
AC5
B58
0C=
038
B58
D5N
78A
0C=
0G(
038
*:C
8&*
3A*
A48P18&
SELECT * FROM SCOUNTER WHERE
MANDT = '001' AND CARRID = 'LH'
AND COUNTNUM = '00000004'.
Generic B!""ering
Generic )ey
With generic bu&&eringD a++ the recor!s 2hose generic key &ie+!s agree 2ith this recor! are +oa!e!
into the bu&&er 2hen one recor! o& the tab+e is accesse!. 'he %ener"c key is a +e&t-#usti&ie! part o& the
pri,ary key o& the tab+e that ,ust be !e&ine! 2hen the bu&&ering type is se+ecte!. 'he generic key
shou+! be se+ecte! so that the generic areas are not too s,a++D 2hich 2ou+! resu+t in too ,any generic
areas. & there are on+y a &e2 recor!s &or each generic areaD &u++ bu&&ering is usua++y pre&erab+e &or the
tab+e. & you choose too +arge a generic keyD too ,uch !ata 2i++ be in$a+i!ate! i& there are changes to
tab+e entriesD 2hich 2ou+! ha$e a negati$e e&&ect on the per&or,ance.
A tab+e shou+! be generica++y bu&&ere! i& on+y certain generic areas o& the tab+e are usua++y nee!e! &or
processing.
C+ient-!epen!entD &u++y bu&&ere! tab+es are auto,atica++y generica++y bu&&ere!. 'he c+ient &ie+! is the
generic key. t is assu,e! that not a++ o& the c+ients are being processe! at the sa,e ti,e on one
app+ication ser$er. *anguage-!epen!ent tab+es are a &urther e4a,p+e o& generic bu&&ering. 'he
generic key inc+u!es a++ the key &ie+!s up to an! inc+u!ing the +anguage &ie+!.
'he generic areas are ,anage! in the bu&&er as in!epen!ent ob#ects. 'he generic areas are ,anage!
ana+ogous+y to &u++y bu&&ere! tab+es. Jou shou+! there&ore a+so rea! the in&or,ation about &u++
bu&&ering.
@CA (AP A7 BC430 1
3.$
SAP AG 1999
B!""er contents
00000004 /= 00- 0C=
Data#ase ta#le SC1:N&58
*AND& CA884D C1:N&N:*
0000000-
0000000-
00000002
00000003
00000004
0000000-
00000002
00000003
00000004
0000000+
0000000,
0000000/
0000000A
0000000-
AA
BA
BA
BA
BA
/=
/=
/=
/=
/=
/=
/=
/=
5A
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
ACA
AC5
B58
0C=
038
B58
D5N
78A
0C=
0G(
038
*:C
8&*
3A*
A48P18&
Application server
SELECT SINGLE * FROM SCOUNTER WHERE
MANDT = '001' AND CARRID = 'LH' AND
COUNTNUM = '00000004'.
Single-8ecord B!""ering
"n+y those recor!s that are actua++y accesse! are +oa!e! into the bu&&er. (ing+e-recor! bu&&ering
sa$es storage space in the bu&&er co,pare! to generic an! &u++ bu&&ering. 'he o$erhea! &or bu&&er
a!,inistrationD ho2e$erD is higher than &or generic or &u++ bu&&ering. Consi!erab+y ,ore !atabase
accesses are necessary to +oa! the recor!s than &or the other bu&&ering types.
(ing+e-recor! bu&&ering is reco,,en!e! particu+ar+y &or +arge tab+es in 2hich on+y a &e2 recor!s are
accesse! repeate!+y 2ith (.*.C' (>7*.. A++ the accesses to the tab+e that !o not use (.*.C'
(>7*. bypass the bu&&er an! !irect+y access the !atabase.
& you access a recor! that 2as not yet bu&&ere! using (.*.C' (>7*.D there is a !atabase access
to +oa! the recor!. & the tab+e !oes not contain a recor! 2ith the speci&ie! keyD this recor! is
recor!e! in the bu&&er as non-e4istent. 'his pre$ents a &urther !atabase access i& you ,ake another
access 2ith the sa,e key.
Jou on+y nee! one !atabase access to +oa! a tab+e 2ith &u++ bu&&eringD but you nee! se$era+ !atabase
accesses 2ith sing+e-recor! bu&&ering. %u++ bu&&ering is there&ore genera++y pre&erab+e &or s,a++ tab+es
that are &re;uent+y accesse!.
@CA (AP A7 BC430 5
3.10
SAP AG 1999
Ser*er 2
B.,,er
$AB
SELECT * FROM TAB
WHERE FIELD = 'X'.
Ser*er 1
B.,,er
Syncron(Aat(on table
-
-
2
2
$AB
B!""er Synchroni@ation -
(ince the bu&&ers resi!e +oca++y on the app+ication ser$ersD they ,ust be synchroni6e! a&ter !ata has
been ,o!i&ie! in a bu&&ere! tab+e. (ynchroni6ation takes p+ace at &i4e! ti,e inter$a+s that can be set
in the syste, pro&i+e. 'he correspon!ing para,eter is rdisp/bufreftime an! !e&ines the +ength o& the
inter$a+ in secon!s. 'he $a+ue ,ust +ie bet2een )0 an! 3)00. A $a+ue bet2een )0 an! 240 is
reco,,en!e!.
'he &o++o2ing e4a,p+e sho2s ho2 the +oca+ bu&&ers o& the syste, are synchroni6e!. A syste, 2ith
t2o app+ication ser$ers is assu,e!.
Start"n% s"tuat"!n: >either ser$er has yet accesse! recor!s o& the tab+e 'AB to be &u++y bu&&ere!.
'he tab+e there&ore !oes not yet resi!e in the +oca+ bu&&ers o& the t2o ser$ers.
T"mep!"nt 1: (er$er 1 rea!s recor!s &ro, tab+e 'AB on the !atabase.
T"mep!"nt 2: 'ab+e 'AB is &u++y +oa!e! into the +oca+ bu&&er o& ser$er 1. Accesses &ro, ser$er 1 to
the !ata o& tab+e 'AB no2 use the +oca+ bu&&er o& this ser$er.
@CA (AP A7 BC430 10
3.11
SAP AG 1999
SELECT * FROM TAB
WHERE FIELD = ''.
Ser*er 2
B.,,er
$AB
Ser*er 1
B.,,er
Syncron(Aat(on table
3
3
4
4
$AB
$AB
B!""er Synchroni@ation 2
T"mep!"nt 3: (er$er 2 accesses recor!s o& the tab+e. (ince the tab+e !oes not yet resi!e in the +oca+
bu&&er o& ser$er 2D the recor!s are rea! !irect+y &ro, the !atabase.
T"mep!"nt 4: 'ab+e 'AB is +oa!e! into the +oca+ bu&&er o& ser$er 2. (er$er 2 there&ore a+so uses its
+oca+ bu&&er to access !ata o& 'AB the ne4t ti,e it rea!s.
@CA (AP A7 BC430 11
3.12
SAP AG 1999
Ser*er 2
B.,,er
$AB
DELETE * FROM TAB
WHERE FIELD = 'X'.
Ser*er 1
B.,,er
Syncron(Aat(on table
$AB $AB
$AB mo#(,(e# by
Ser*er 1
+
+
,
,
/
/
B!""er Synchroni@ation 3
T"mep!"nt 5: (er$er 1 !e+etes recor!s &ro, tab+e 'AB an! up!ates the !atabase.
T"mep!"nt 6: (er$er 1 2rites an entry in the synchroni6ation tab+e.
T"mep!"nt 7: (er$er 1 up!ates its +oca+ bu&&er.
@CA (AP A7 BC430 12
3.13
SAP AG 1999
$AB
Syncron(Aat(on table
$AB mo#(,(e# by
Ser*er 1
SELECT * FROM TAB
WHERE FIELD = 'X'.
Ser*er 2
B.,,er
Ser*er 1
B.,,er
$AB $AB
A
A
B!""er Synchroni@ation 4
T"mep!"nt : (er$er 2 accesses the !e+ete! !ata recor!s. (ince tab+e 'AB resi!es in its +oca+ bu&&erD
the access uses this +oca+ bu&&er.
(er$er 2 there&ore &in!s the recor!s a+though they no +onger e4ist in the !atabase tab+e.
& the sa,e access 2ere ,a!e &ro, an app+ication progra, to (er$er 1D this progra, 2ou+!
recogni6e that the recor!s no +onger e4ist. At this ti,e the beha$ior o& an app+ication progra,
there&ore !epen!s on the ser$er on 2hich it is running.
@CA (AP A7 BC430 13
3.14
SAP AG 1999
Ser*er 2
B.,,er
$AB
Ser*er 1
B.,,er
Syncron(Aat(on table
$AB $AB
$AB mo#(,(e# by
Ser*er 1
.
.
.
.
-0
-0
Syncron(Aat(on
B!""er Synchroni@ation +
T"mep!"nt $: 'he ,o,ent o& synchroni6ation has arri$e!. Both ser$ers +ook in the synchroni6ation
tab+e to see i& another ser$er has ,o!i&ie! one o& the tab+es in its +oca+ bu&&er in the ,eanti,e.
T"mep!"nt 10: (er$er 2 &in!s that tab+e 'AB has been ,o!i&ie! by (er$er 1 in the ,eanti,e. (er$er
2 there&ore in$a+i!ates the tab+e in its +oca+ bu&&er. 'he ne4t access &ro, (er$er 2 to !ata o& tab+e
'AB there&ore uses the !atabase. (er$er 1 !oes not ha$e to in$a+i!ate the tab+e in its bu&&er since it
itse+& is the on+y one to ,o!i&y tab+e 'AB. (er$er 1 there&ore uses its +oca+ bu&&er again the ne4t ti,e
to access recor!s o& tab+e 'AB.
@CA (AP A7 BC430 14
3.15
SAP AG 1999
$AB
Syncron(Aat(on table
SELECT * FROM TAB
WHERE FIELD = ''.
Ser*er 2
B.,,er
Ser*er 1
B.,,er
$AB $AB
--
--
-2
-2
B!""er Synchroni@ation ,
T"mep!"nt 11: (er$er 2 again accesses recor!s o& tab+e 'AB. (ince 'AB is in$a+i!ate! in the +oca+
bu&&er o& (er$er 2D the access uses the !atabase.
T"mep!"nt 12: 'he tab+e is again +oa!e! into the +oca+ bu&&er o& (er$er 2. 'he in&or,ation about
tab+e 'AB is no2 consistent again in both ser$ers an! the !atabase.
*d6anta%es and d"sad6anta%es !7 t)"s met)!d !7 bu77er sync)r!n"&at"!n3
*d6anta%e3 'he +oa! on the net2ork is kept to a ,ini,u,. & the bu&&ers 2ere to be synchroni6e!
i,,e!iate+y a&ter each ,o!i&icationD each ser$er 2ou+! ha$e to in&or, a++ other ser$ers about
each ,o!i&ication to a bu&&ere! tab+e $ia the net2ork. 'his 2ou+! ha$e a negati$e e&&ect on the
per&or,ance.
D"sad6anta%e3 'he +oca+ bu&&ers o& the app+ication ser$ers can contain obso+ete !ata bet2een the
,o,ents o& synchroni6ation.
'his ,eans that3
"n+y those tab+es 2hich are 2ritten $ery in&re;uent+y @rea! ,ost+yA or &or 2hich such te,porary
inconsistencies are o& no i,portance ,ay be bu&&ere!.
'ab+es 2hose entries change &re;uent+y shou+! not be bu&&ere!. "ther2ise there 2ou+! be a
constant in$a+i!ation an! re+oa!D 2hich 2ou+! ha$e a negati$e e&&ect on the per&or,ance.
@CA (AP A7 BC430 15
3.16
SAP AG 1999
:nit S!ary
An inde6 helps yo! to speed !p read accesses to a
ta#le. An inde6 can #e considered a sorted copy o" the
ta#le %hich is red!ced to the inde6 "ields.
&he ta#le #!""ers reside locally on the application
servers.
B!""ering can s!#stantially increase the per"orance
%hen the records o" the ta#le are accessed. Choosing
the correct #!""ering type is iportant.
&he ta#le #!""ers are ad'!sted to changes to the ta#le
entries at "i6ed intervals.
&he ore "reG!ently a ta#le is read and the less
"reG!ently the ta#le contents are changed$ the #etter it is
to #!""er the ta#le.
@CA (AP A7 BC430 1)
3.17Exerc"ses: ,er7!rmance dur"n% Table *ccess
-n"t: ,er7!rmance dur"n% Table *ccess
At the conc+usion o& these e4ercises you 2i++ be ab+e to3
Create in!e4es
Baintain the bu&&ering attributes o& a tab+e
n their !ai+y 2orkD air+ine e,p+oyees nee! &ast access to the !ata in the e,p+oyee
a!,inistration tab+es. n this e4erciseD access to the !ata in these tab+es shou+! be
spee!e! up.
3-1 'he co,bination o& &irst an! +ast na,es are o&ten use! to access the personne+ !ata o&
an e,p+oyee. 'he +ast na,e is ,ore o&ten kno2n @i.e. speci&ie! in the accessA than
the &irst na,e.
Create an in!e4 that supports this access. Bake sure that the in!e4 is create! in the
!atabase.
3-2 'o set up a &+ight cre2D you ha$e to assign e,p+oyees @pi+ots an! ste2ar!sA to &+ights.
Create a tab+e in 2hich the e,p+oyees in$o+$e! an! their &unctions can be entere!
&or each &+ight.
A tab+e 2ith the correspon!ing structure a+rea!y e4ists in the syste,. Copy this
tab+e (%*C-.W to tab+e Q%*C-.W44. -ep+ace the e4isting !ata e+e,ent &or the
e,p+oyee nu,ber 2ith your o2n !ata e+e,ent.
Do not &orget to acti$ate tab+e Q%*C-.W44.
3-3 -econsi!er the settings you ,a!e &or bu&&ering tab+es QD.PB.>'44 an!
Q%*C-.W44. 9eep the &o++o2ing in&or,ation &or using these tab+es in ,in!3
'he carriers ha$e bet2een 10 an! 30 !epart,ents. "n+y a &e2 carriers @,a4i,u,
3A are a!,inistere! in the tab+es. 'he !ata about the cre2s o& co,p+ete! &+ights are
ro++e! out to an archi$e &i+e e$ery three ,onths. 'ab+e Q%*C-.W44 there&ore has
re+ati$e+y &e2 entries @at ,ost 5D000 per carrierA.
'ab+es QD.PB.>'44 an! Q%*C-.W44 are accesse! $ery &re;uent+y. Data
recor!s are rea! repeate!+y &ro, these tab+es.
A!,inistrati$e e,p+oyees o& on+y one air+ine 2ork on one app+ication ser$er. 'he
!ata about the &+ight cre2 is on+y o& interest 2ithin the air+ine. A!,inistrati$e
e,p+oyees o& an air+ineD ho2e$erD o&ten ha$e to access !epart,enta+ !ata o& other
air+inesD since the air+ines share so,e ser$ices.
@CA (AP A7 BC430 1/
(tart Progra, BC430KC<.C9 in 'ransaction (.31. 'his progra,
checks 2hether your so+utions are correct an! &i++s the ne2 tab+e
Q%*C-.W44 2ith sa,p+e !ata nee!e! &or +ater e4ercises.
& you !o the supp+e,entary e4erciseD on+y start the progra, a&ter co,p+eting the
supp+e,entary e4ercise.
3-4 Supplementary Exerc"se: 0sing an in!e4 on the areas ,ight resu+t in a gain in
per&or,ance 2hen accessing the e,p+oyee !ataD &or e4a,p+e i& a++ pi+ots are
&re;uent+y se+ecte!.
n per&or,ance ,easure,ents on !i&&erent !atabase syste,sD ho2e$erD it 2as &oun!
there is on+y a gain in per&or,ance &or the ADABA( an! (E* (er$er !atabase
syste,s. Create an in!e4 an! ,ake sure that it is on+y create! on the ADABA( an!
(E* (er$er !atabase syste,s.
@CA (AP A7 BC430 11
3.1S!lut"!ns: ,er7!rmance dur"n% Table *ccess
-n"t: ,er7!rmance dur"n% Table *ccess
3-1 'he personne+ !ata o& the e,p+oyees is ,anage! in 'ab+e Q.BP*"J44. Create an
in!e4 &or this tab+e. t has to contain &ie+!s ClientD Lastname an! Firstname. (ince
the +ast na,e is usua++y speci&ie! an! is ,uch ,ore se+ecti$e than the &irst na,eD it
,ust be in its in!e4. 'he or!er o& the &ie+!s is then ClientD Lastname an! then
Firstname.
'o create the in!e43
1A n !isp+ay ,o!eD go to the ,aintenance screen o& tab+e Q.BP*"J44 an!
choose -ndees.
2A n the ne4t !ia+og bo4D con&ir, that you 2ant to create an in!e4.
3A n the &o++o2ing !ia+og bo4D enter a three-p+ace in!e4 D an! choose Continue.
4A 'he ,aintenance screen &or the in!e4 appears. .nter a Short description.
5A Choose Table fields. A +ist o& a++ the &ie+!s in the tab+e appears. Bark &ie+!s
ClientD Lastname an! Firstname an! choose Copy.
)A 'he &ie+!s are copie! &ro, the !ia+og bo4 to the in!e4 in that or!er. & &ie+!
Firstname is be&ore &ie+! LastnameD you ha$e to change the or!er o& the
&ie+!s. Do this by p+acing the cursor on the +ine 2ith &ie+! Firstname an!
choosing Cut. >o2 p+ace the cursor on the &irst &ree +ine a&ter &ie+!
Lastname an! choose Paste.
/A 'he in!e4 is certain+y not a uni;ue in!e4 since there can be e,p+oyees 2ith the
sa,e &irst an! +ast na,es. 'here is no reason to create the in!e4 on+y in
certain !atabase syste,s. Jou shou+! there&ore +ea$e the stan!ar! settings
1on)uni6ue inde an! -nde in all database systems.
1A Acti$ate the in!e4. 'he in!e4 is auto,atica++y create! in the !atabase.
3-2 'o copy tab+e (%*C-.W3
1A n the initia+ screen o& the ABAP DictionaryD enter (%*C-.W in &ie+!
Database table. Choose Copy.
2A n the ne4t !ia+og bo4D enter the na,e Q%*C-.W44 in &ie+! to table an! choose
Continue.
3A n change ,o!eD go to the tab+e ,aintenance screen an! rep+ace !ata e+e,ent
(.BPK>0B 2ith the !ata e+e,ent you create! &or the e,p+oyee nu,ber.
4A Acti$ate the tab+e.
3-3 Jou can ,aintain the bu&&ering settings &or the speci&ie! tab+es in their technica+
settings. 'o !o soD go to the ,aintenance screen &or the tab+e in !isp+ay ,o!e an!
choose Technical settin"s. 'he !esire! ,aintenance screen appears an! you can
s2itch to change ,o!e here.
@CA (AP A7 BC430 15
(ince the contents o& tab+e QD.PB.>'44 are rare+y change! but &re;uent+y rea!D it
is not a!$isab+e to bu&&er the tab+e. Bark .ufferin" s#itched on. (ince there are no
restrictions on the access an! the tab+e is s,a++D you shou+! se+ect &u++ bu&&ering.
Bark Fully buffered.
Acti$ate the technica+ settings o& tab+e QD.PB.>'44.
'he !ata o& tab+e Q%*C-.W44 are o&ten rea! repeate!+y. Accesses that change the
contents are rare. Jou shou+! there&ore bu&&er the tab+e. Bark .ufferin" s#itched
on. 0sua++y on+y the !ata o& one air+ine is nee!e! on an app+ication ser$er. Jou
shou+! there&ore bu&&er the tab+e generica++y 2ith the generic key Client an!
Carrier. Bark Generic bufferin" an! se+ect 2 as the nu,ber o& generic key &ie+!s.
Acti$ate the technica+ settings o& tab+e Q%*C-.W44.
3-4 & you !o as speci&ie! in 3.1D the syste, !isp+ays the in!e4 you create! in a !ia+og bo4.
n this !ia+og bo4 choose Create. nc+u!e &ie+!s Client$ Carrier an! Area in the
in!e4. 'his is not a uni;ue in!e4 either.
'o create the in!e4 on+y in the A!abas an! (E* (er$er !atabase syste,s3
1A Bark For selected database systems.
2A 'hen press the arro2 sy,bo+ in this +ine. (e+ect Selection list. 0sing the %4
he+pD se+ect the i!enti&iers &or the A!abas @ADAA an! (E* (er$er @B((A
!atabase syste,s in the +ist.
3A Choose Continue.
4A Acti$ate the in!e4.
'he in!e4 is on+y create! in the !atabase i& your training syste, is running on one
o& the se+ecte! !atabase syste,s.
@CA (AP A7 BC430 20
4
SAP AG 1999
7i6ed val!es
2al!e ta#le
(hat is a "oreign )eyH
7ield assignent !sing the chec) "ield
7oreign )ey ta#le 9 chec) ta#le
Seantic attri#!tes o" the "oreign )ey
&e6t ta#le
Consistency thro!gh 4np!t Chec)s
@CA (AP A7 BC430 1
4.2
SAP AG 1999
Co!rse 1#'ectives
At the end o" this !nit yo! %ill #e a#le to;
Create and !se "i6ed val!es
De"ine %hat a "oreign )ey is
Apply the conditions "or the "ield assignent o" the
"oreign )ey
>no% the di""erence #et%een the val!e ta#le and the
chec) ta#le
Create 7oreign >ey
@CA (AP A7 BC430 2
4.3
SAP AG 1999
7i6ed 2al!es 7i6ed 2al!es

$able entry 3#(t Goto Sett(n's 3n*(ronment System =el"
Reset Ceck table
Insert table SBOOK Insert table SBOOK
Class Sort #escr("t(on
1l('t class
'he !o,ain !escribes the $a+ue range o& a &ie+! by speci&ying its !ata type an! &ie+! +ength. & on+y a
+i,ite! set o& $a+ues is a++o2e!D they can be !e&ine! as &i4e! $a+ues.
(peci&ying &i4e! $a+ues causes the $a+ue range o& the !o,ain to be restricte! by these $a+ues. %i4e!
$a+ues are i,,e!iate+y use! as check $a+ues in screen entries. 'here is a+so an %4 he+p.
%i4e! $a+ues are on+y checke! in screens. >o check is ,a!e 2hen !ata recor!s are inserte! in a tab+e
by an ABAP progra,.
%i4e! $a+ues can either be +iste! in!i$i!ua++y or !e&ine! as an inter$a+.
@CA (AP A7 BC430 3
4.4
SAP AG 1999
2al!e &a#le
&a#le SCA88
Create 7oreign >ey
1ore('n key #oes not e2(st.
2222 a "ro"osal >(t *al.e table SCARR
as ceck tableB
@es ?o $erm(nate
)9&A4? SFCARRF4) )9&A4? SFCARRF4)
Gal.e table SCARR Gal.e table SCARR
*AND& CA884D CA88NA*5 C:88C1D5
401 AA Amer(can A(rl(nes 5S)
401 BA Br(t(s A(r>ays GBP
401
/=
/.,tansa )3&
410 5A 5n(te# A(rl(nes 5S)
'he $a+ue range o& a &ie+! can a+so be !e&ine! by speci&ying a $a+ue tab+e in the !o,ain.
n contrast to &i4e! $a+uesD ho2e$erD si,p+y speci&ying a $a+ue tab+e !oes not cause the input to be
checke!. 'here is no %4 he+p either.
& you enter a $a+ue tab+eD the syste, can ,ake a proposa+ &or the &oreign key !e&inition.
A $a+ue tab+e on+y beco,es a check tab+e 2hen a &oreign key is !e&ine!.
& you re&er to a !o,ain 2ith a $a+ue tab+e in a &ie+!D but no &oreign key 2as !e&ine! at &ie+! +e$e+D
there is no check.
@CA (AP A7 BC430 4
4.5
SAP AG 1999
Data#ase ta#le SC1:N&58
Csales co!nterD
CA884D CCarrierD
C1NN4D CConnectionD
70DA&5 CDate o" "lightD
C1:N&58 CCo!nterD
C:S&1*4D CC!stoerD
Can this "light
#e #oo)ed at
sales co!nter A H
5ntries to "ields o" ta#le SB11>
C"light #oo)ingD;
*AND& CA884D C1:N&N:*
0000000-
0000000-
00000002
00000003
00000004
0000000-
00000002
00000003
00000004
0000000+
0000000,
0000000/
0000000A
0000000-
AA
BA
BA
BA
BA
03
03
03
03
03
03
03
03
:A
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
ACA
AC5
B58
0C=
038
B58
D5N
78A
0C=
0G(
038
*:C
8&*
3A*
A48P18&
4nserting a Data 8ecord
AA AA
00-/ 00-/
0000000A 0000000A
00000-4A 00000-4A
2+.0/.2000 2+.0/.2000
A custo,er 2ants to book a &+ight 2ith A,erican Air+ines @AAA. 'his &+ight 2ith &+ight nu,ber 001/
is to be on >o$e,ber 22D 155/. 'he booking shou+! be ,a!e at counter 1.
'ab+e (B""9 contains a++ the &+ight bookings o& the carriers.
'ab+e (C"0>'.- contains a++ the $a+i! counters o& the carriers.
& an entry is ,a!e in &ie+! C"0>'.- o& tab+e (B""9D you ,ust ,ake sure that on+y $a+i!
counters can be entere!. 'his ,eans that the counters ,ust be store! in tab+e (C"0>'.-.
8uest"!n:
Are you a++o2e! to insert the abo$e !ata recor! in tab+e (B""9=
@CA (AP A7 BC430 5
4.6
SAP AG 1999
Data#ase ta#le SC1:N&58
*AND& CA884D C1:N&N:*
0000000-
0000000-
00000002
00000003
00000004
0000000-
00000002
00000003
00000004
0000000+
0000000,
0000000/
0000000A
0000000-
AA
BA
BA
BA
BA
03
03
03
03
03
03
03
03
:A
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
00-
ACA
AC5
B58
0C=
038
B58
D5N
78A
0C=
0G(
038
*:C
8&*
3A*
A48P18&
CA884D CCarrierD
C1NN4D CConnectionD
70DA&5 CDate o" "lightD
C1:N&58 CCo!nterD
C:S&1*4D CC!stoerD
5ntries to "ields o" ta#le SB11>;
4nsertion not allo%edI 4nsertion not allo%edI
2iolation o" the 7oreign >ey Chec)
5""ect o" the "oreign )ey de"inition; 5""ect o" the "oreign )ey de"inition;
A data record %ith the contents; A data record %ith the contents;
*AND& B J00-J$ CA884D B JAAJ$ *AND& B J00-J$ CA884D B JAAJ$
C1:N&N:* B J00000000.J does not C1:N&N:* B J00000000.J does not
e6ist in ta#le SC1:N&58. e6ist in ta#le SC1:N&58.
AA AA
00-/ 00-/
00000-4A 00000-4A
2+.0/.2000 2+.0/.2000
00000000A 00000000A
'he &+ight cannot be booke! because A,erican Air+ines @AAA !oes not ha$e a counter 1.
>o !ata recor! is se+ecte! in tab+e (C"0>'.- &or the entries in the e4a,p+e. 'he entry &or tab+e
(B""9 is re#ecte!.
n the ABAP DictionaryD such re+ationships bet2een t2o tab+es are ca++e! 7!re"%n keys an! they
,ust be !e&ine! e4p+icit+y &or the &ie+!s.
%oreign keys are use! to ensure that the !ata is consistent. Data that has been entere! is checke!
against e4isting !ata to ensure that it is consistent.
@CA (AP A7 BC430 )
4.7
SAP AG 1999
7oreign >ey 7ields 9 Chec) 7ields
>ey "ields
&A?)$ CARR4) C95?$?5& A4RP9R$
1ore('n key table SB11>
&A?)$ CARR4) C9??4) 1/)A$3 C5S$9&4) CA?C3/3)
7oreign )ey "ields
Ceck ,(el#
... C95?$3R ...
Ceck table SC1:N&58
E9*/,'E3
n this e4a,p+eD the 7!re"%n key table is tab+e (B""9. 'he purpose o& the &oreign key is to ensure
that on+y $a+i! counters o& carriers can be assigne! to a booking. :)eck table (C"0>'.- contains
e4act+y this in&or,ation. .ach counter is i!enti&ie! 2ith three key &ie+!s in this tab+e3 BA>D'D
CA--DD an! C"0>'>0B.
n or!er to !e&ine the &oreign keyD these three &ie+!s are assigne! to &ie+!s o& the &oreign key tab+e
@&oreign key &ie+!sA 2ith 2hich the input to be checke! is entere! on the screen. n tab+e (B""9
these are the &ie+!s3 BA>D'D CA--DD C"0>'.-. 'he entry is accepte! i& it represents a $a+i!
counterH other2ise the syste, 2i++ re#ect it.
'he &oreign key is !e&ine! &or &ie+! (B""9-C"0>'.- @check &ie+!AD 2hich ,eans that the entry in
this &ie+! is checke!. %ie+! C"0>'.- is there&ore ca++e! the c)eck 7"eld &or this &oreign key.
A &oreign key is !e&ine! &or &ie+! C"0>'.-D tab+e (B""9D resu+ting in the &o++o2ing &ie+!
assign,ent3
:)eck table 2!re"%n key table
(C"0>'.--BA>D' (B""9-BA>D'
(C"0>'.--CA--D (B""9-CA--D
(C"0>'.--C"0>'>0B (B""9-C"0>'.-
@CA (AP A7 BC430 /
4.
SAP AG 1999
Data Consistency thro!gh 7oreign >eys
*AND& CA884D C1NN4D
...
A00
A00
A00
A00
AA
AA
8oe
8oe
00-/
00,4
0+++
0/AA
*AND& CA884D
...
A00
A00
A00
A00
AA
AC
A7
8oe
SCA88; Chec) ta#le B re". o#'. SP704; 7oreign )ey ta#le B dep. o#'.
SP1/4:CARR4) SP1/4:&A?)$
Carrier
7light n!#er
Detail
aint.
AB
0020
Chec) "ield
7oreign )ey "ields
STOP STOP
A co,bination o& &ie+!s o& a tab+e is ca++e! a &oreign key i& this &ie+! co,bination is the pri,ary key
o& another tab+e.
A &oreign key +inks t2o tab+es.
'he check tab+e is the tab+e 2hose key &ie+!s are checke!. 'his tab+e is a+so ca++e! the referenced
table.
An entry is to be 2ritten in the &oreign key tab+e. 'his entry ,ust be consistent 2ith the key &ie+!s o&
the check tab+e.
'he &ie+! o& the &oreign key tab+e to be checke! is ca++e! the chec/ field.
%oreign keys can on+y be use! in screens. Data recor!s can be 2ritten to the tab+e 2ithout being
checke! using an ABAP progra,.
Example: A ne2 entry is to be 2ritten in tab+e (P%* @&+ight sche!u+eA. 'here is a check 2hether the
air+ine carrier entere! is store! in tab+e (CA-- @carrierA &or &ie+! (P%*-CA--D. 'he recor! is
on+y copie! to tab+e (P%* @&oreign key tab+eA i& this is the case. A &oreign key is !e&ine! &or &ie+!
(P%*-CA--D @check &ie+!AD i.e. the checks are on this &ie+!. 'he correspon!ing check tab+e is
tab+e (CA-- 2ith the pri,ary key &ie+!s BA>D' an! CA--D.
@CA (AP A7 BC430 1
4.$
SAP AG 1999
7oreign >ey De"initions in the Chec) 7ield
>ey "ields
&a#le SP704
*AND& ... ... Depart!re
airport
%ith chec) ta#le;
SA48P18&
&a#le SA48P18&
*AND&
...... Airport
)oma(n SFA4RP4) )oma(n SFA4RP4)
Gal.e table SA4RP9R$ Gal.e table SA4RP9R$
)ata element SFA4RP9R$ )ata element SFA4RP9R$ )ata element SF1R9&A4RP )ata element SF1R9&A4RP
7oreign )ey relationship to the chec) "ield Depart!re Airport
n the ABAP DictionaryD the sa,e !o,ain is re;uire! &or the check &ie+! an! re&erence! key &ie+! o&
the check tab+e so that you !o not co,pare &ie+!s 2ith !i&&erent !ata types an! &ie+! +engths. D!ma"n
e;ual"ty "s essent"al. D"77erent data elements can be used3 but t)ey must re7er t! t)e same
d!ma"n.
'he re;uire,ent &or !o,ain e;ua+ity is on+y $a+i! &or the check &ie+!. %or a++ other &oreign key &ie+!sD
it is su&&icient i& the !ata type an! the &ie+! +ength are e;ua+. Jou ne$erthe+ess shou+! stri$e &or
!o,ain e;ua+ity. n this case the &oreign key 2i++ re,ain consistent i& the &ie+! +ength is change!
because the correspon!ing &ie+!s are both change!. & the !o,ains are !i&&erentD the &oreign key 2i++
be inconsistent i& &or e4a,p+e the &ie+! +ength is change!.
& the !o,ain o& the check &ie+! has a $a+ue tab+eD you can ha$e the syste, ,ake a proposa+ 2ith the
$a+ue tab+e as check tab+e. n this case a proposa+ is create! &or the &ie+! assign,ent in the &oreign
key.
:*-T<04=
T)e c!nstellat"!n t)at a d!ma"n t)at "tsel7 )as table S*<>,0>T as 6alue table "s used
7!ll!?"n% 7"eld S*<>,0>T#*"rp!rt "s c!rrect == @!?e6er3 a 7!re"%n key "s ne6er de7"ned !n t)"s
7"eld Aa6!"d"n% a l!!pB.
@CA (AP A7 BC430 5
4.10
SAP AG 1999
Chec) &a#le not 5G!al to 2al!e &a#le
$able SB5SPAR$
&A?)$ B5SPAR$?5& ...
Doain S?B:SPA8N:* Doain S?B:SPA8N:*
2al!e ta#le SB:SPA8& 2al!e ta#le SB:SPA8&
&A?)$ AG5NC=N:* ...
$able S$RAG3/AG
1ore('n key table SB11>
&A?)$ CARR4) CA?C3/3) ... AG5NC=N:* ...
n the abo$e e4a,p+e &or the &oreign key !e&inition &or &ie+! (B""9-A7.>CJ>0BD the syste,
proposa+ is as &o++o2s base! on the $a+ue tab+e in the !o,ain3
Check tab+e3 (B0(PA-'
2"eld ass"%nment:
:)eck table 2!re"%n key table
(B0(PA-'-BA>D' (B""9-BA>D'
(B0(PA-'-B0(PA-'>0B (B""9-A7.>CJ>0B
T)"s pr!p!sal d!es n!t d! ?)at ?e ?ant "t t! d!:
'ab+e (B0(PA-' contains a++ the business partners o& air+ine carriers. <o2e$erD on+y agencies are
a++o2e! &or &ie+! (B""9-A7.>CJ>0B. 'ab+e (B0(PA-' there&ore contains in$a+i! !ata &or
this &ie+!. 'he syste, proposa+ is there&ore incorrectO 'he right check tab+e is tab+e ('-A8.*A7. t
is a subset o& tab+e (B0(PA-' !ue to its &oreign key !e&inition on &ie+! A7.>CJ>0B.
1!u must !6er?r"te t)e system pr!p!sal ?"t) table ST>*CE'*D. <7 y!u d! n!t kn!? t)e
c!rrect c)eck table3 t)e system can )elp y!u by l"st"n% all t)e tables "n ;uest"!n. T)"s "ncludes
all t)e tables t)at )a6e a key 7"eld ?"t) d!ma"n SE +-S,*>4-/.
@CA (AP A7 BC430 10
4.11
SAP AG 1999
Seantic Attri#!tes
-;C
-;N -;-
-;CN
Cardinality
C
C
C
C
7
7
7
7
'he car!ina+ity !escribes the &oreign key re+ationship 2ith regar! to ho2 ,any recor!s o& the check
tab+e are assigne! to recor!s o& the &oreign key tab+e. 'he car!ina+ity is a+2ays !e&ine! &ro, the
point o& $ie2 o& the check tab+e.
'he type o& the &oreign key &ie+! !e&ines 2hether or not the &oreign key &ie+! i!enti&ies a tab+e entry.
'his ,eans that the &oreign key &ie+!s are either key &ie+!s or they are not key &ie+!s or they are a
specia+ caseD na,e+y the key &ie+!s o& a te4t tab+e.
'here are the &o++o2ing kin!s o& &oreign key &ie+!s3
n!t spec"7"ed: >o in&or,ation about the kin! o& &oreign key &ie+! can be gi$en
n! key 7"eldsFcand"dates: 'he &oreign key &ie+!s are neither pri,ary key &ie+!s o& the &oreign key
tab+e nor !o they uni;ue+y i!enti&y a recor! o& the &oreign key tab+e @key can!i!atesA. 'he &oreign
key &ie+!s there&ore !o not @partia++yA i!enti&y the &oreign key tab+e.
Gey 7"eldsFcand"dates: 'he &oreign key &ie+!s are either pri,ary key &ie+!s o& the &oreign key
tab+e or they uni;ue+y i!enti&y a recor! o& the &oreign key tab+e @key can!i!atesA. 'he &oreign key
&ie+!s there&ore @partia++yA i!enti&y the &oreign key tab+e.
Gey 7"elds !7 a text table7 'he &oreign key tab+e is a te4t tab+e o& the check tab+eD i.e. the key o&
the &oreign key tab+e on+y !i&&ers &ro, the key o& the check tab+e in an a!!itiona+ +anguage key
&ie+!. 'his is a specia+ case o& the category %ey fields / candidates.
@CA (AP A7 BC430 11
4.12
SAP AG 1999
&e6t &a#le &e6t &a#le
&e6t ta#le S*5A0&
&3A/:
?5&B3R
&A?)$ CARR4)
/A?G5AG3 $3H$
&a#le S*5A0
&A?)$ CARR4)
&3A/:
$@P3
&3A/:
?5&B3R
>ey "ields >ey "ields
7oreign >ey 8elationship %ith Chec) &a#le S*5A0
&ype o" "oreign )ey "ields; )ey "ields o" a te6t ta#le
'ab+e (B.A* contains the ,ea+s ser$e! to the passengers !uring a &+ight. 'he ,ea+ na,es are
,aintaine! in tab+e (B.A*'.
'ab+e (B.A*' is the te4t tab+e &or tab+e (B.A* since the key o& (B.A*' consists o& the key o&
(B.A* an! an a!!itiona+ +anguage key &ie+! @&ie+! 2ith !ata type *A>7A.
'ab+e (B.A*' can contain e4p+anatory te4t in se$era+ +anguages &or each key entry o& (B.A*.
'o +ink the key entries 2ith the te4tD the te4t tab+e (B.A*' ,ust be +inke! 2ith tab+e (B.A* using
a &oreign key. %ey fields of a tet table ,ust be chosen &or the type o& the &oreign key &ie+!s.
T)e 7!re"%n key relat"!ns)"p "s de7"ned 7r!m S/E*'T t! S/E*'.
"n+y one te4t tab+e can be create! &or a tab+e.
@CA (AP A7 BC430 12
4.13
SAP AG 1999
S!ary
&%o %ays to chec) the data consistency %ere
introd!ced in this !nit;
7i6ed val!es CstaticD
7oreign )eys CdynaicD
&he "i6ed val!es are stored in the doain.
&he "oreign )ey perits yo! to chec) the val!es yo!
enter against e6isting data.
&he "oreign )ey relationship is aintained "or the
chec) "ield C"ield o" the "oreign )ey ta#leD.
&he chec) "ield !st #e assigned to a chec) ta#le )ey
"ield having the sae doain.
@CA (AP A7 BC430 13
4.14Exerc"ses: :!ns"stency t)r!u%) <nput :)ecks
-n"t: :!ns"stency t)r!u%) <nput :)ecks
At the conc+usion o& these e4ercises you 2i++ be ab+e to3
Create &i4e! $a+ues
(et $a+ue tab+es to the correct conte4t
De&ine &oreign keys
0se the abo$e ,echanis, to ensure that the !ata is consistent
When you enter or change the e,p+oyee ,aster !ataD on+y consistent !ataD i.e. $a+i!
air+ine carriersD !epart,entsD areasD etc.D shou+! be a++o2e!. 'his 2i++ be i,p+e,ente! in
the ne4t e4ercise.
4-1 'he e,p+oyees o& the air+ines are !i$i!e! into a!,inistration personne+ @AAD &+ight
personne+ @%A an! ser$ice personne+ @(A. 'hey are assigne! to acti$ity areas AD % or (
accor!ing+y. Bake sure that on+y $a+i! acti$ity areas can be entere! in tab+e
Q.BP*"J44.
4-2 De&ine suitab+e &oreign keys &or tab+es Q.BP*"J44 an! QD.PB.>'44. 0se the
tab+es o& the &+ight ,o!e+ or tab+es '000 @c+ientA an! (C0-G @currency co!eA as 2e++
as your tab+es to !e&ine the &oreign keys. De&ine a &oreign key check &or each o& the
&o++o2ing &ie+!s3
Q.BP*"J44-C+ient
Q.BP*"J44-Carrier
Q.BP*"J44-Depart,ent co!e
Q.BP*"J44-Currency
an!
QD.PB.>'44-C+ient
QD.PB.>'44-Carrier
Baintain the !ata &or tab+e Q.BP*"J44 an! test the e&&ect o& your &oreign key
re+ationships.
4-3 (o,e e,p+oyees o& carriers 2ork in tra$e+ agencies in or!er to se++ &+ights &or their
co,panies there. .nhance tab+e Q.BP*"J44 2ith a &ie+! that !ocu,ents &or each
e,p+oyee the tra$e+ agency in 2hich he or she 2orks.
.nhance tab+e Q.BP*"J44 accor!ing+y an! !e&ine the &oreign key re+ationship.
@CA (AP A7 BC430 14
'he tab+e o& a++ tra$e+ agencies is ca++e! ST>*CE'*D.
4-4 Create a te4t tab+e QD.PB.>''44 &or tab+e QD.PB.>'44 to e4p+ain the !epart,ent
co!e &or the e,p+oyees o& the carriers in a++ countries.
Create the correspon!ing tab+e an! use !ata e+e,ents (P-A( an! (K'.G' &or the &ie+!
!e&inition.
De&ine the re;uire! &oreign key re+ationships.
(tart Progra, BC430KC<.C9 in 'ransaction (.31. 'his progra,
checks 2hether your so+utions are correct an! &i++s the ne2 tab+e
QD.PB.>''44 2ith sa,p+e !ata nee!e! &or +ater e4ercises.
@CA (AP A7 BC430 15
4.15S!lut"!ns: :!ns"stency t)r!u%) <nput :)ecks
0nit3 Consistency through nput Checks
4-1 Ca++ the !o,ain ,aintenance screen &or &ie+! Q.BP*"J44-Area. Jou can !o this by
na$igating &ro, the tab+e ,aintenance screen to the correspon!ing !ata e+e,ent an!
&ro, here to the !o,ain @by !oub+e-c+ickingA. C+ick on tab page 8alue ran"e an!
enter the &o++o2ing &i4e! $a+ues3
%i4e! $a+ue (hort !escription
A A!,inistration personne+
F %+ight personne+
S (er$ice personne+
Acti$ate your !o,ain.
4-2 'o ,aintain the in!i$i!ua+ &oreign keysD ca++ the ,aintenance routine &or the particu+ar
tab+es. C+ick on tab page Fields.
:reate 7!re"%n key .E/,'01xx#:l"ent as 7!ll!?s:
1A P+ace the cursor on &ie+! Q.BP*"J44-C+ient. Press Forei"n /ey or choose
Goto Forei"n /ey.
2A (ince you are using !o,ain BA>D' &or &ie+! Q.BP*"J-C+ientD the syste,
proposes $a+ue tab+e '000 as check tab+e.
3A <a$e the syste, ,ake a proposa+ &or the &oreign key !e&inition. Check the proposa+. 'he
&o++o2ing &ie+!s ,ust be assigne!3
Check tab+e Ck'ab%+! %or. key tab+e %or. key &+!
T''' 9A1DT Q.BP*"J44 Client
4A .nter a short te4t an! !e&ine the se,antic attributes as &o++o2s3
'ype o& &oreign key &ie+!s3 /ey fields/candidates
Car!ina+ity3 13C>
5A (a$e your &oreign key.
:reate 7!re"%n key .E/,'01xx#:arr"er as 7!ll!?s:
1A P+ace the cursor on &ie+! Q.BP*"J44-Carrier. Press Forei"n /ey or choose
Goto Forei"n /ey.
2A (ince you are using !o,ain (KCA--KD &or &ie+! Q.BP*"J-CarrierD you can
use $a+ue tab+e (CA-- &or the &oreign key !e&inition.
3A <a$e the syste, ,ake a proposa+ &or the &oreign key !e&inition. Check the
proposa+. 'he &o++o2ing &ie+!s ,ust be assigne!3
@CA (AP A7 BC430 1)
Check tab+e Chk'ab+%+! %or. key tab+e %oreign key &ie+!
SCA:: 9A1DT Q.BP*"J44 Client
SCA:: CA::-D Q.BP*"J44 Carrier
4A .nter a short te4t an! !e&ine the se,antic attributes as &o++o2s3
'ype o& &oreign key &ie+!s3 /ey fields/candidates
Car!ina+ity3 13C>
5A (a$e your &oreign key.
:reate 7!re"%n key .E/,'01xx#Department c!de as 7!ll!?s:
1A 'o get a proposa+ &or the &oreign key !e&initionD you ,ust change the !o,ain
&or &ie+! Q.BP*"J44-Depart,ent co!e. 'his is not abso+ute+y necessary
&or +ater &oreign key !e&initionsD but ,akes the !e&inition easier. .nter $a+ue
tab+e QD.PB.>'44 in the !o,ain &or this &ie+! an! acti$ate the !o,ain.
2A P+ace the cursor on &ie+! Q.BP*"J44-Depart,ent co!e. Press Forei"n /ey or
choose Goto Forei"n /ey.
3A (ince you are using the !o,ain o& &ie+! QD.PB.>'44-Depart,ent co!e &or
&ie+! Q.BP*"J-Depart,ent co!eD you can use $a+ue tab+e QD.PB.>'44
&or the &oreign key !e&inition.
4A <a$e the syste, ,ake a proposa+ &or the &oreign key !e&inition. Check the
proposa+. 'he &o++o2ing &ie+!s ,ust be assigne!3
Check tab+e Chk'ab+%+! %or. key tab+e %oreign key &ie+!
QD.PB.>'44 Client Q.BP*"J44 Client
QD.PB.>'44 Carrier Q.BP*"J44 Carrier
QD.PB.>'44 Depart,ent co!e Q.BP*"J44 Depart,ent co!e
5A .nter a short te4t an! !e&ine the se,antic attributes as &o++o2s3
'ype o& &oreign key &ie+!s3 non)/ey)fields/candidates
Car!ina+ity3 13C>
)A (a$e your &oreign key.
:reate 7!re"%n key .E/,'01xx#:urrency as 7!ll!?s:
1A P+ace the cursor on &ie+! Q.BP*"J44-Currency. Press Forei"n /ey or choose
Goto Forei"n /ey.
2A (ince you are using !o,ain (KC0-- &or &ie+! Q.BP*"J44-CurrencyD you
can use $a+ue tab+e (C0-G &or the &oreign key !e&inition.
3A <a$e the syste, ,ake a proposa+ &or the &oreign key !e&inition. Check the
proposa+. 'he &o++o2ing &ie+!s ,ust be assigne!3
Check tab+e Chk'ab+%+! %or. key tab+e %or. key &+!
@CA (AP A7 BC430 1/
SC4:; C4::%2< Q.BP*"J44 Currency
4A .nter a short te4t an! !e&ine the se,antic attributes as &o++o2s3
'ype o& &oreign key &ie+!s3 non)/ey)fields/candidates
Car!ina+ity3 13C>
5A (a$e your &oreign key.
:reate 7!re"%n key .DE,/E4Txx#:l"ent as 7!ll!?s:
(ee &oreign key Q.BP*"J44-C+ient.
:reate 7!re"%n key .DE,/E4Txx#:arr"er as 7!ll!?s:
(ee &oreign key Q.BP*"J44-Carrier.
n the ,aintenance screen &or tab+e Q.BP*"J44 choose 4tilities Table
contents Create entries.
.nter !ata an! check 2hether your &oreign key &unctions correct+y using the %4
he+p.
4-3 Create a ne2 &ie+! A"ency in your tab+e Q.BP*"J44 as &o++o2s3
1A >a$igate to the &ie+! ,aintenance screen &or tab+e Q.BP*"J44. nsert a ne2
&ie+! A"ency in the &ie+! +ist @press 1e# ro#sA. n the ,aintenance screen &or
tab+e ('-A8.*A7 you can see that the suitab+e !ata e+e,ent is ca++e!
(KA7>CJ>0B. Assign this !ata e+e,ent to your ne2 &ie+! Q.BP*"J44-
Agency.
2A Position the cursor on the &ie+! A"ency an! ha$e the syste, ,ake a proposa+ &or
the &oreign key !e&inition.
3A Check the proposa+. 'he check tab+e is (B0(PA-'. 'his check tab+e is not
correct since it contains a++ the business partners o& carriers an! not on+y
agencies.
4A 'he correct check tab+e is ('-A8.*A7. t contains the agencies the carriers
2ork 2ith.
5A Jou can i,pro$e un!erstan!ing by +ooking at the !e&inition o& tab+e
('-A8.*A7 in a secon! session. %ie+! A7.>CJ>0B has a &oreign key
2ith check tab+e (B0(PA-'. 'his ,eans that tab+e ('-A8.*A7 is a
subset o& tab+e (B0(PA-'.
n the &oreign key !e&inition &or Q.BP*"J44-AgencyD o$er2rite entry
(B0(BA-' in the input &ie+! Chec/ table 2ith ('-A8.*A7.
)A Press Copy. 'he syste, recogni6es the change in the check tab+e an! suggests that it create a
proposa+. Accept this o&&er an! check the proposa+. 'he &o++o2ing &ie+!s ,ust be assigne!3
Check tab+e Chk'ab+%+! %or. key tab+e %or. key &+!
('-A8.*A7 9A1DT Q.BP*"J44 Client
('-A8.*A7 A7.>CJ>0B Q.BP*"J44 A"ency
@CA (AP A7 BC430 11
/A .nter a short !escription. .nter car!ina+ity 13C> an! ,ark that the &oreign key
&ie+!s are not key &ie+!s:can!i!ates. Choose Copy.
1A Acti$ate the tab+e.
5A n the ,aintenance screen &or tab+e Q.BP*"J44 choose 4tilities Table
contents Create entries.
8eri&y your &oreign key using the %4 he+p.
4-4 Create your te4t tab+e QD.PB.>''44 as &o++o2s3
1A Copy tab+e QD.PB.>'44 to tab+e QD.PB.>''44.
2A >a$igate to the &ie+! ,aintenance screen &or tab+e QD.PB.>''44. De+ete a++
the &ie+!s that are not key &ie+!s. Create the &o++o2ing ne2 &ie+!s3
%ie+! na,e Data e+e,ent Data typeD *ength
Lan"ua"e SP:AS LA1G
Description S=T2;T CHA:3'
2"eld .DE,/E4Txx#'an%ua%e must be a key 7"eld.
3A 'he &oreign keys &or &ie+!s QD.PB.>''44-C+ient an! QD.PB.>''44-
Carrier 2ere a+rea!y correct+y !e&ine! by copying. Jou sti++ ha$e to !e&ine
the &oreign keys o& &ie+!s QD.PB.>''44-Depart,ent co!e an!
QD.PB.>''44-*anguage.
4A P+ace the cursor on &ie+! QD.PB.>''44-Depart,ent co!e. Press Forei"n /ey
or choose Goto Forei"n /ey.
5A (ince you are using the !o,ain o& &ie+! QD.PB.>'44-Depart,ent co!e &or
&ie+! QD.PB.>''44-Depart,ent co!eD you can use $a+ue tab+e
QD.PB.>'44 &or the &oreign key !e&inition.
)A <a$e the syste, ,ake a proposa+ &or the &oreign key !e&inition. Check the
proposa+. 'he &o++o2ing &ie+!s ,ust be assigne!3
Check tab+e Chk'ab+%+! %or. key tab+e %or. key &+!
QD.PB.>'44 Client QD.PB.>''44 Client
QD.PB.>'44 Carrier QD.PB.>''44 Carrier
QD.PB.>'44 Depart,ent co!e QD.PB.>''44 Depart,ent co!e
/A .nter a short te4t an! !e&ine the se,antic attributes as &o++o2s3
'ype o& &oreign key &ie+!s3 key 7"elds !7 a text table
@CA (AP A7 BC430 15
Car!ina+ity3 13C>
1A (a$e your &oreign keys.
5A P+ace the cursor on &ie+! QD.PB.>''44-*anguage. Press Forei"n /ey or
choose Goto Forei"n /ey.
10A (ince you are using !o,ain (P-A( &or &ie+! QD.PB.>''44-*anguageD you
can use $a+ue tab+e '002 &or the &oreign key !e&inition.
++, Ha5e the system ma/e a proposal for the forei"n /ey definition! Chec/ the
proposal! The follo#in" fields must be assi"ned7
Check tab+e Chk'ab+%+! %or. key tab+e %oreign key &ie+!
T''& SP:AS QD.PB.>''44 Lan"ua"e
12A .nter a short te4t an! !e&ine the se,antic attributes as &o++o2s3
'ype o& &oreign key &ie+!s3 /ey fields/candidates
Car!ina+ity3 13C>
13A (a$e your &oreign key.
14A Acti$ate the tab+e.
@CA (AP A7 BC430 20
5
SAP AG 1999
Activation o" ABAP Dictionary o#'ects
3andling o" dependent o#'ects
(here-!sed list and 893 8epository 4n"oration
Syste as seen #y the ABAP Dictionary
Dependencies o" ABAP Dictionary 1#'ects
@CA (AP A7 BC430 1
5.2
SAP AG 1999
Co!rse 1#'ectives
At the end o" this !nit yo! %ill )no%;
&he di""erence #et%een the active and inactive version o"
an ABAP Dictionary o#'ect.
&he echanis "or handling dependent o#'ects in the
ABAP Dictionary
3o% the 8epository 4n"oration Syste and the %here-
!sed list "or ABAP Dictionary o#'ects "!nction
@CA (AP A7 BC430 2
5.3
SAP AG 1999
Active and 4nactive 2ersions
Active version 4nactive version
Active version
Active version
7ield - 7ield 2 7ield 3 7ield - 7ield 2 7ield 3 7ield 4
7ield - 7ield 2 7ield 3 7ield 4
Activate
Add 7ield 4 in the ABAP Dictionary
7ield 2 7ield 3 7ield -
During !e$e+op,entD you so,eti,es nee! to change an @acti$eA ob#ect a+rea!y use! by the syste,.
(uch changes are supporte! in the ABAP Dictionary by separating the acti$e an! inacti$e $ersions.
'he act"6e $ersion o& an ABAP Dictionary ob#ect is the $ersion that the co,ponents o& the runti,e
en$iron,ent @&or e4a,p+e ABAP processorD !atabase inter&aceA access. 'his $ersion is not initia++y
change!.
An "nact"6e $ersion is create! 2hen an acti$e ob#ect is change!. 'he inacti$e $ersion can be sa$e!
2ithout checking. t has no e&&ect on the runti,e syste,.
At the en! o& the !e$e+op,ent processD the inacti$e $ersion can be ,a!e the acti$e $ersion. 'his is
!one by act"6at"!n. 'he inacti$e $ersion o& the ob#ect is &irst checke! &or consistency. & it is
consistentD the inacti$e $ersion rep+aces the acti$e one. %ro, no2 onD the runti,e syste, uses the
ne2 acti$e $ersion.
'he abo$e e4a,p+e sho2s ho2 the ob#ect status changes. An acti$e structure contains three &ie+!s. A
&ie+! is a!!e! to this structure in the ABAP Dictionary. A&ter this actionD there is an acti$e $ersion
2ith three &ie+!s an! an inacti$e $ersion 2ith &our &ie+!s. During acti$ationD the acti$e $ersion is
o$er2ritten 2ith the inacti$e $ersion. 'he inacti$e $ersion thus beco,es the acti$e $ersion. A&ter
this action there is on+y the acti$e $ersion 2ith &our &ie+!s.
@CA (AP A7 BC430 3
5.4
SAP AG 1999
8!ntie 1#'ects
Str!ct!re
4n"oration a#o!t
the str!ct!re
7ield in"oration
8!ntie o#'ect
o" the str!ct!re
Data eleents
7ield 2 7ield 3 7ield -
ABAP
4nterpreter
)ata )ata
element 1 element 1
)ata )ata
element 2 element 2
)ata )ata
element 3 element 3
)oma(n 1 )oma(n 1 )oma(n 2 )oma(n 2 )oma(n 3 )oma(n 3
'he in&or,ation about a structure @or tab+eA is !istribute! in the ABAP Dictionary in !o,ainsD !ata
e+e,entsD an! the structure !e&inition. 'he runti,e ob#ect @na,etabA co,bines this in&or,ation into a
structure in a &or, that is opti,i6e! &or access &ro, ABAP progra,s. 'he runti,e ob#ect is create!
2hen the structure is acti$ate!.
'he runti,e ob#ects o& the structures are bu&&ere! so that the ABAP runti,e syste, can ;uick+y
access this in&or,ation.
'he runti,e ob#ect contains in&or,ation about the o$era++ structure @e.g. nu,ber o& &ie+!sA an! the
in!i$i!ua+ structure &ie+!s @&ie+! na,eD position o& the &ie+! in the structureD !ata typeD +engthD nu,ber
o& !eci,a+ p+acesD re&erence &ie+!D re&erence tab+eD check tab+eD con$ersion routineD etc.A.
'he runti,e ob#ect o& a tab+e contains &urther in&or,ation nee!e! by the !atabase inter&ace &or
accessing the tab+e !ata @c+ient !epen!enceD bu&&eringD key &ie+!sD etc.A.
-unti,e ob#ects are create! &or a++ ABAP Dictionary ob#ects that can be use! as types in ABAP
progra,s. 'hese are !ata e+e,entsD tab+e types an! $ie2sD as 2e++ as structures an! tab+es.
@CA (AP A7 BC430 4
5.5
SAP AG 1999
3andling o" Dependent 1#'ects
Str!ct!re 3 &a#le - Str!ct!re 2 Str!ct!re -
&a#le 2
incl!des
)oma(n )oma(n
)ata element 1 )ata element 1 )ata element 2 )ata element 2 )ata element 3 )ata element 3
& an ob#ect that is a+rea!y acti$e is ,o!i&ie!D this can a&&ect other ob#ects that use it @!irect+y or
in!irect+yA. 'hese ob#ects using another ob#ect are ca++e! dependent ob#ects. "n the one han!D it
,ight be necessary to a!#ust the runti,e ob#ects o& these !epen!ent ob#ects to the changes. "n the
other han!D a change ,ight so,eti,es ,ake a !epen!ent ob#ect inconsistent.
%or this reasonD the !epen!ent ob#ects are !eter,ine! an! acti$ate! @i& necessaryA 2hen an acti$e
ob#ect is acti$ate!. 'he acti$e $ersions o& the !epen!ent ob#ects are acti$ate! again. n particu+arD
ne2 an! inacti$e $ersions o& ob#ects using the change! ob#ect are not change!.
Example: When you change a !o,ainD &or e4a,p+e its !ata typeD a++ the !ata e+e,entsD structures
an! tab+es re&erring to this !o,ain ,ust be acti$ate! again. 'his acti$ation is auto,atica++y triggere!
2hen the !o,ain is acti$ate!. 'his ensures that a++ a&&ecte! runti,e ob#ects are a!#uste! to the
change! type in&or,ation.
& an ABAP Dictionary ob#ect has a tab+e as !epen!ent ob#ectD its !atabase ob#ect as 2e++ as its
runti,e ob#ect ,ight ha$e to be a!#uste! 2hen the !epen!ent ob#ect is acti$ate!. 'he ,etho! use!
here 2i++ be !iscusse! in the ne4t unit.
@CA (AP A7 BC430 5
5.6
SAP AG 1999
(here-:sed 0ists
:se
(here-!sed lists
Progra - Progra 2
Str!ct!re 3 &a#le - Str!ct!re 2 Str!ct!re -
)oma(n )oma(n
&a#le 2
)ata element 1 )ata element 1 )ata element 2 )ata element 2 )ata element 3 )ata element 3
Changing an ABAP Dictionary ob#ect ,ight a+so a&&ect its !epen!ent ob#ects. Be&ore ,aking a
critica+ change @such as changing the !ata type or !e+eting a &ie+!A you shou+! there&ore !e&ine the set
o& ob#ects a&&ecte! in or!er to esti,ate the i,p+ications o& the p+anne! action.
'here is a ?)ere#used l"st &or each ABAP Dictionary ob#ect 2ith 2hich you can &in! a++ the ob#ects
that re&er to this ob#ect. Jou can ca++ the 2here-use! +ist &ro, the ,aintenance transaction o& the
ob#ect.
Jou can &in! !irect an! in!irect usages o& an ABAP Dictionary ob#ect 2ith the 2here-use! +ist. Jou
a+so ha$e to !e&ine 2hich usage ob#ect types shou+! be inc+u!e! in the search @e.g. a++ structures an!
tab+es using a !ata e+e,entA. Jou can a+so search &or usages that are not ABAP Dictionary ob#ects
@e.g. a++ progra,s using a tab+eA. 'he search can a+so be +i,ite! by !e$e+op,ent c+ass or user
na,espace.
& an ob#ect is probab+y use! by se$era+ ob#ectsD you shou+! per&or, the search in the backgroun!.
@CA (AP A7 BC430 )
5.7
SAP AG 1999
Sho% all o#'ects o" type K
%ith attri#!te =
Sho% all o#'ects
o" type K that
%ere changed #y !ser =
at tie DD**====
Sho% all o#'ects o" type K
that !se
o#'ect =
Sho% all ta#le "ields
%ith chec) ta#le K
4n"oration a#o!t 4n"oration a#o!t
relationships relationships
#et%een ta#les #et%een ta#les Proo" o" change Proo" o" change
(here-!sed list (here-!sed list Search #y attri#!te Search #y attri#!te

ABAP ABAP
Dictionary Dictionary
H H
H H
&he 8epository 4n"oration Syste ABAP
Dictionary
'he -epository n&or,ation (yste, ABAP Dictionary is part o& the genera+ -epository n&or,ation
(yste,. t he+ps you search &or ABAP Dictionary ob#ects an! their users.
'he 2here-use! +ist &or -epository ob#ects can be ca++e! &ro, the in&or,ation syste,. 'he
in&or,ation syste, a+so enab+es you to search &or ob#ects by their attributes.
n a!!ition to the ob#ect-speci&ic search criteria @e.g. bu&&ering type &or tab+esAD you can search &or a++
ob#ects by !e$e+op,ent c+assD short !escription or author an! !ate o& +ast change.
'he ob#ect +ists create! by the -epository n&or,ation (yste, are entire+y integrate! in the ABAP
Workbench. 'hey per,it you to na$igate !irect+y to the ,aintenance transactions o& the ob#ects
&oun!.
@CA (AP A7 BC430 /
5.
SAP AG 1999
4n the ABAP Dictionary there is an active and an
inactive version o" an o#'ect. &he r!ntie syste
!ses the active version and the developent
process edits the inactive version.
(hen an o#'ect is activated$ the inactive version
#ecoes the active version Ca"ter a chec)D. &he old
active version is over%ritten.
(hen an o#'ect that is already active is activated$
any active dependent o#'ects are also activated.
&he r!ntie o#'ect and the data#ase o#'ect o" these
dependent o#'ects are also !pdated.
&he %here-!sed list can #e !sed to "ind all the
8epository o#'ects that !se an ABAP Dictionary
o#'ect.
=o! can "ind ABAP Dictionary o#'ects #y their
attri#!tes in the 8epository 4n"oration Syste.
:nit S!ary
@CA (AP A7 BC430 1
5.$Exerc"ses: Dependenc"es !7 *+*, D"ct"!nary 0bHects
-n"t: Dependenc"es !7 *+*, D"ct"!nary 0bHects
At the conc+usion o& these e4ercises you 2i++ be ab+e to3
.nhance tab+es an! structures 2ith &ie+!s
0se the -:3 -epository n&or,ation (yste, an! the 2here-use! +ist
&or ABAP Dictionary ob#ects
n&or,ation about the hea! o& the !epart,ent shou+! be store! in the e,p+oyee
,anage,ent syste,. 'he change +og shou+! a+so be ,a!e ,ore !etai+e!. 'his e4ercise
,akes the appropriate enhance,ents to the tab+es an! structures.
5-1 .ach !epart,ent o& an air+ine has a hea! o& !epart,ent. 'he assign,ent bet2een the !epart,ent an! the
hea! o& the !epart,ent shou+! be ,appe! in the &+ight ,o!e+. .nhance tab+e QD.PB.>'44 2ith
&ie+! Dephead De&ine a suitab+e &oreign key &or this &ie+!.
0se the t2o-step !o,ain concept.
5-2 'he change +og &or tab+es Q.BP*"J44 an! QD.PB.>'44 is not precise enough. n
a!!ition to the person 2ho ,a!e the +ast change an! the !ate o& this changeD you
a+so 2ant to recor! the ti,e o& the +ast change. <a$e a suitab+e &ie+! inserte! in both
tab+es as easi+y as possib+e. 0se !ata e+e,ent (K'B..
Bake sure that the &ie+! is inserte! in both tab+es. Check the acti$ation +og o& the
tab+es an! structures in$o+$e!.
(tart Progra, BC430KC<.C9 in 'ransaction (.31. t checks
2hether your so+utions are correct.
@CA (AP A7 BC430 5
5-3 Create a +ist o& the &o++o2ing ABAP Dictionary ob#ects3
5.3.1 A++ !o,ains 2ith &i4e! $a+ues 2hose na,es begin 2ith Q.
5.3.2 A++ tab+e &ie+!s that use !ata e+e,ent (K%>AB..
5-3-3 A++ tab+es o& the &+ight ,o!e+ @!e$e+op,ent c+ass BCKDA'AB"D.*A that
ha$e !e+i$ery c+ass A.
5-4 Deter,ine a++ the progra,s that use tab+e (%*7<'.
5-5 What are the !ata e+e,ents create! by your neighbors ca++e!=
@CA (AP A7 BC430 10
5.10S!lut"!ns: Dependenc"es !7 *+*, D"ct"!nary 0bHects
-n"t: Dependenc"es !7 *+*, D"ct"!nary 0bHects
5-1 n our ,o!e+D peop+e are i!enti&ie! by their personne+ nu,ber. 'here&ore the ne2 &ie+!
to be a!!e! to tab+e QD.PB.>'44 ,ust contain personne+ nu,bers @an! not
na,esA. 'he &ie+! shou+! there&ore re&er to the !o,ain &or personne+ nu,bers that
you create! in the &irst e4ercise. (ince the person to be ,anage! in this case has a
specia+ ro+eD you shou+! create a ne2 !ata e+e,ent an! not use the one a+rea!y
create! &or the personne+ nu,ber. Jou can either &irst create the !ata e+e,ent an!
then ,aintain the tab+eD or create the !ata e+e,ent &ro, the tab+e ,aintenance
screen 2ith &or2ar! na$igation. 'he secon! 2ay is !escribe! be+o23
1A 7o to change ,o!e in the ,aintenance screen &or tab+e QD.PB.>'44. C+ick
on tab page Fields.
2A Choose 1e# ro#s.
3A .nter the ne2 &ie+! !irect+y &o++o2ing the e4isting &ie+!s by entering a suitab+e
&ie+! na,e in the &irst co+u,n an! entering a na,e &or the !ata e+e,ent to be
create! in co+u,n Field type.
4A (a$e the tab+e !e&inition.
5A Doub+e c+ick on the na,e o& the ne2 !ata e+e,ent to be create!. Con&ir, that
you 2ant to create a !ata e+e,ent.
)A .nter a short te4t &or the !ata e+e,ent. .nter the !o,ain na,e that you a+rea!y
create! &or the personne+ nu,ber in &ie+! Domain.
/A C+ick on tab page Field label an! enter the correspon!ing te4t there.
1A Acti$ate the !ata e+e,ent. 7o back to the ,aintenance screen &or tab+e
QD.PB.>'44 by choosing .ac/!
5A Create the &oreign key &or the ne2 &ie+! in the usua+ ,anner. 'he check tab+e is
tab+e Q.BP*"J44. & you store! this tab+e as a $a+ue tab+e &or the !o,ain
&or the personne+ nu,berD the syste, 2i++ ,ake this proposa+. & not you
ha$e to enter it yourse+&. Jou can copy the syste, proposa+ in the &ie+!
a++ocation o& the &oreign key. 'he car!ina+ity is 13C> an! the &oreign key
&ie+!s are not &oreign key &ie+!s:can!i!ates.
10A Acti$ate the tab+e.
5-2 'he &ie+!s &or the change +og can be &oun! in the inc+u!e structure QC<A>7.44. 'he
ne2 &ie+! shou+! there&ore be inserte! in this structure. 'he &ie+! is auto,atica++y
inserte! in tab+es Q.BP*"J44 an! QD.PB.>'44 using the inc+u!e ,echanis,.
Procee! as &o++o2s3
1A n the initia+ screen o& the ABAP DictionaryD se+ect Data type an! enter
QC<A>7.44 in the correspon!ing &ie+!. Choose Chan"e.
2A C+ick on tab page Components. .nter the na,e &or the ne2 &ie+! in the &irst &ree
ro2 o& the co,ponent +ist an! enter (K'B. in co+u,n Component type.
@CA (AP A7 BC430 11
3A Acti$ate the structure.
4A With 4tilities Acti5ation lo" you can &in! the acti$ation +og o& the structure.
Jou can see here that tab+es Q.BP*"J44 an! QD.PB.>'44 are
acti$ate! as !epen!ent ob#ects an! 2ere enhance! 2ith the ne2 &ie+!.
5A 7o to !isp+ay ,o!e in the ,aintenance screen &or tab+e Q.BP*"J44 @or
QD.PB.>'44A. Choose 4tilities Table contents Create entries! Jou
can see here that the tab+e 2as rea++y enhance! 2ith the correspon!ing &ie+!.
5-3 A++ the e4ercises can be so+$e! 2ith the -epository n&or,ation (yste,. Jou can !o
this &ro, the initia+ screen o& the ABAP Dictionary 2ith 2n5ironment
:epository -nformation System. .4pan! the no!es &or the ABAP Dictionary.
1A .4pan! the no!e .asic ob>ects. Doub+e-c+ick on Domains. n the se+ection
screenD enter QW in the &irst &ie+!. Choose All selections. n the enhance!
se+ection screenD ,ark ?nly domains #ith fied 5alues. Jou can create the
!esire! +ist 2ith 2ecute.
2A Choose .ac/ t2ice to return to the initia+ screen o& the -epository n&or,ation
(yste,. .4pan! the Fields no!e. Doub+e-c+ick on Table fields. Choose All
selections an! enter (K%>AB. in &ie+! Data element. Jou can create the
!esire! +ist 2ith 2ecute.
3A Choose .ac/ t2ice to return to the initia+ screen o& the -epository n&or,ation
(yste,. >o!e .asic ob>ects is sti++ e4pan!e!. Doub+e-c+ick on Database
tables. .nter !e$e+op,ent c+ass BCKDA'AB"D.* an! @a&ter choosing All
selectionsA !e+i$ery c+ass A in the se+ection screen. Jou can create the
!esire! +ist 2ith 2ecute.
5-4 7o to the initia+ screen o& the ABAP Dictionary. Choose Database table an! enter
(%*7<' in the correspon!ing &ie+!. Choose @here)used list. 'he usage in
progra,s is a+rea!y ,arke! @a+oneA in the ne4t !ia+og bo4. Jou can create the
!esire! +ist 2ith 2ecute.
5-5 Jou can create the !esire! +ist again in the -epository n&or,ation (yste, ABAP
Dictionary. .4pan! the no!e .asic ob>ects an! !oub+e-c+ick on Data elements. Jou
can !e&ine your neighborRs !ata e+e,ents 2ith either a pattern search &or the na,e
@i& your neighbors a!here! to the gi$en na,ing con$entionA or 2ith Last chan"ed
by @a&ter choosing All selectionsA. & you ha$e t2o groups o& neighborsD you ha$e to
use 9ultiple selection. Jou can restrict the se+ection 2ith the !ate o& the +ast change
@the +ast change shou+! be no ear+ier than the beginning o& the courseA at +east in the
&irst case @na,ing con$entionA.
@CA (AP A7 BC430 12
6
SAP AG 1999
Changes to data#ase ta#les
5""ect o" changes to the ta#le str!ct!re
&a#le conversion
Possi#le pro#les d!ring conversions
Append str!ct!res
Changes to Data#ase &a#les
@CA (AP A7 BC430 1
6.2
SAP AG 1999
At the end o" this !nit yo! %ill #e a#le to;
*a)e changes to ta#les
5stiate the e""ect o" these changes on the data#ase
Convert ta#les
Contin!e terinated conversions
Add c!stoer "ields to SAP standard ta#les #y
eans o" append str!ct!res %itho!t odi"ications
Co!rse 1#'ectives
@CA (AP A7 BC430 2
6.3
SAP AG 1999
ABAP Dictionary
Changes to &a#les
Act(*e *ers(on
(nact(*e *ers(on
7ield - 7ield 2 7ield 3
7ield 2 7ield 3 7ield - 7ield 4
7ield 2 7ield 3 7ield -
Data#ase
Correct access by ABAP progra,s to a !atabase tab+e is on+y possib+e i& the runti,e ob#ect o& the
tab+e is consistent 2ith the structure o& the tab+e in the !atabase. .ach ti,e the tab+e is change! in the
ABAP DictionaryD you ,ust check i& the !atabase structure o& the tab+e ,ust be a!#uste! to the
change! ABAP Dictionary !e&inition o& the tab+e 2hen it is acti$ate! @2hen the runti,e ob#ect is
re2rittenA.
'he !atabase structure !oes not ha$e to be a+tere! &or certain changes to the ABAP Dictionary. %or
e4a,p+eD you !o not ha$e to change the !atabase structure 2hen the or!er o& the &ie+!s in the ABAP
Dictionary is change! @other than &or key &ie+!sA. n this case the change! structure is si,p+y
acti$ate! in the ABAP Dictionary an! the !atabase structure re,ains unchange!.
@CA (AP A7 BC430 3
6.4
SAP AG 1999
3o% is the Str!ct!re Ad'!stedH
7ield - 7ield 2 7ield 3
Act(*e *ers(on
4nact(*e *ers(on
Delete$ create again
or
Change catalog "or
the DB CA0&58 &AB05D
or
Convert the ta#le
7ield 2 7ield 3 7ield -
7ield 2 7ield 3 7ield - 7ield 4
Does the ta#le contain dataH
(hat data#ase
syste is !sedH
(hat change %as adeH
'he !atabase tab+e can be a!#uste! to the change! !e&inition in the ABAP Dictionary in three
!i&&erent 2ays3
By !e+eting the !atabase tab+e an! creating it again. 'he tab+e on the !atabase is !e+ete!D the
inacti$e tab+e is acti$ate! in the ABAP DictionaryD an! the tab+e is create! again on the !atabase.
Data e4isting in the tab+e is +ost.
By changing the !atabase cata+og @A*'.- 'AB*.A. 'he !e&inition o& the tab+e on the !atabase is
si,p+y change!. .4isting !ata is retaine!. <o2e$erD in!e4es on the tab+e ,ight ha$e to be bui+t
again.
By con$erting the tab+e. 'his is the ,ost ti,e-consu,ing 2ay to a!#ust a structure.
& the tab+e !oes not contain any !ataD it is !e+ete! in the !atabase an! create! again 2ith its ne2
structure. & !ata e4ists in the tab+eD there is an atte,pt to a!#ust the structure 2ith A*'.- 'AB*..
& the !atabase syste, use! is not ab+e to !o soD the structure is a!#uste! by con$erting the tab+e.
@CA (AP A7 BC430 4
6.5
SAP AG 1999
Conversion Process -
$AB I 0
$AB I A11
7ield -
?5&C8 6
7ield 2
C=AR8 <
7ield 3
C=AR8 60
000100
001200
003000
1111A00
0222B10
0030B20
$e2t1...
$e2t2 ...
$e2t3 ...
$AB
Act(*e *ers(on o, $AB
7ield 2
C=AR8 <
7ield 3
C=AR8 60
7ield -
?5&C86
4nact(*e *ers(on o, $AB
7ield 2
C=AR8 <
7ield -
?5&C86
7ield 3
C=AR8 30
'he &o++o2ing e4a,p+e sho2s the steps necessary !uring con$ersion.
Start"n% s"tuat"!n: 'ab+e 'AB 2as change! in the ABAP Dictionary. 'he +ength o& &ie+! 3 2as
re!uce! &ro, )0 to 30 p+aces.
'he ABAP Dictionary there&ore has an acti$e @&ie+! 3 has a +ength o& )0 p+acesA an! an inacti$e
@&ie+! 3 sti++ has 30 p+acesA $ersion o& the tab+e.
'he acti$e $ersion o& the tab+e 2as create! in the !atabaseD 2hich ,eans that &ie+! 3 current+y has )0
p+aces in the !atabase. A secon!ary in!e4 2ith the D A11D 2hich 2as a+so create! in the !atabaseD is
!e&ine! &or the tab+e in the ABAP Dictionary.
'he tab+e a+rea!y contains !ata.
@CA (AP A7 BC430 5
6.6
SAP AG 1999
Conversion Process 2
0C&$AB
Rename $AB to
0C&$AB
)elete
(n#e2es
1(el# 1
?5&C8 6
1(el# 2
C=AR8 <
1(el# 3
C=AR8 60
1111A00
0222B10
0030B20
$e2t1...
$e2t2 ...
$e2t3 ...
$AB (s locke#
$AB I A11
$AB I 0
1(el# 1
?5&C8 6
1(el# 2
C=AR8 <
1(el# 3
C=AR8 60
000100
001200
003000
1111A00
0222B10
0030B20
$e2t1...
$e2t2 ...
$e2t3 ...
2
2
Act(*e *ers(on o, $AB
7ield 2
C=AR8 <
7ield 3
C=AR8 60
7ield -
?5&C86
4nact(*e *ers(on o, $AB
7ield 2
C=AR8 <
7ield -
?5&C86
&AB loc)ed
-
-
$AB
7ield 3
C=AR8 30
000100
001200
003000
Step 1: 'he tab+e is +ocke! against &urther structure changes. & the con$ersion ter,inates !ue to an
errorD the tab+e re,ains +ocke!. 'his +ock ,echanis, pre$ents &urther structure changes &ro, being
,a!e be&ore the con$ersion has been co,p+ete! correct+y. Data cou+! be +ost in such a case.
Step 2: 'he tab+e in the !atabase is rena,e!. A++ the in!e4es on the tab+e are !e+ete!. 'he na,e o&
the ne2 @te,poraryA tab+e is !e&ine! by the pre&i4 ECB an! the tab+e na,e. 'he na,e o& the
te,porary tab+e &or tab+e 'AB is there&ore ECB'AB.
@CA (AP A7 BC430 )
6.7
SAP AG 1999
Conversion Process 3
Act(*ate (n te
ABAP )(ct(onary
1(el# 2
C=AR8 <
1(el# 1
?5&C8 6
1(el# 2
C=AR8 <
1(el# 3
C=AR8 60
000100
001200
003000
1111A00
0222B10
0030B20
$e2t1...
$e2t2 ...
$e2t3 ...
0C&$AB
$AB
1(el# 1
?5&C8 6
1(el# 3
C=AR8 30
3
3
Act(*e *ers(on o, $AB
7ield 2
C=AR8 <
7ield 3
C=AR8 60
7ield -
?5&C86
4nact(*e *ers(on o, $AB
3
3
$AB (s ne>ly create# on te )B
7ield 2
C=AR8 <
7ield -
?5&C86
7ield 3
C=AR8 30
&AB loc)ed
$AB I 0
Step 3: 'he inacti$e $ersion o& the tab+e is acti$ate! in the ABAP Dictionary. 'he tab+e is create! on
the !atabase 2ith its ne2 structure an! 2ith the pri,ary in!e4. 'he structure o& the !atabase tab+e is
the sa,e as the structure in the ABAP Dictinary a&ter this step. 'he !atabase tab+eD ho2e$erD !oes
not contain any !ata.
'he syste, a+so tries to set a !atabase +ock &or the tab+e being con$erte!. & the +ock is setD
app+ication progra,s cannot 2rite to the tab+e !uring the con$ersion.
'he con$ersion is continue!D ho2e$erD e$en i& the !atabase +ock cannot be set. n such a case
app+ication progra,s can 2rite to the tab+e. (ince in such a case not a++ o& the !ata ,ight ha$e been
+oa!e! back into the tab+eD the tab+e !ata ,ight be inconsistent.
1!u s)!uld t)ere7!re al?ays make sure t)at n! appl"cat"!ns access t)e table be"n% c!n6erted
dur"n% t)e c!n6ers"!n pr!cess.
@CA (AP A7 BC430 /
6.
SAP AG 1999
Conversion Process 4
)ata (s loa#e# back (nto $AB
4
4
0C&$AB
1(el# 1
?5&C8 6
1(el# 2
C=AR8 <
1(el# 3
C=AR8 60
000100
001200
003000
1111A00
0222B10
0030B20
$e2t1...
$e2t2 ...
$e2t3 ...
1(el# 1
?5&C8 6
1(el# 2
C=AR8 <
1(el# 3
C=AR8 30
000100
001200
003000
1111A00
0222B10
0030B20
$e2t1...
$e2t2 ...
$e2t3 ...
$AB
Act(*e *ers(on o, $AB
7ield 2
C=AR8 <
7ield 3
C=AR8 30
7ield -
?5&C86
&AB loc)ed
$AB I 0
Step 4: 'he !ata is +oa!e! back &ro, the te,porary tab+e @ECB tab+eA to the ne2 tab+e @2ith
B"8.-C"--.(P">D>7A. 'he !ata e4ists in the !atabase tab+e an! in the te,porary tab+e a&ter
this step. When you re!uce the si6e o& &ie+!sD &or e4a,p+eD the e4tra p+aces are truncate! 2hen you
re+oa! the !ata.
(ince the !ata e4ists in both the origina+ tab+e an! te,porary tab+e !uring the con$ersionD the storage
re;uire,ents increase !uring the process. Jou shou+! there&ore $eri&y that su&&icient space is
a$ai+ab+e in the correspon!ing tab+espace be&ore con$erting +arge tab+es.
'here is a !atabase co,,it a&ter 1) BB 2hen you copy the !ata &ro, the ECB tab+e to the origina+
tab+e. A con$ersion process there&ore nee!s 1) BB resources in the ro++back seg,ent. 'he e4isting
!atabase +ock is re+ease! 2ith the Co,,it an! then re;ueste! again be&ore the ne4t !ata area to be
con$erte! is e!ite!.
When you re!uce the si6e o& keysD on+y one recor! can be re+oa!e! i& there are se$era+ recor!s 2hose
key cannot be !istinguishe!. t is not possib+e to say 2hich recor! this 2i++ be. n such a case you
shou+! c+ean up the !ata o& the tab+e be&ore con$erting.
@CA (AP A7 BC430 1
6.$
SAP AG 1999
Conversion Process +
Remo*e lock
/
/
)elete tem"orary table
1(el# 1
?5&C8 6
1(el# 2
C=AR8 <
1(el# 3
C=AR8 60
000100
001200
003000
1111A00
0222B10
0030B20
$e2t1...
$e2t2 ...
$e2t3 ...
0C&$AB
,
,
1(el# 1
?5&C8 6
1(el# 2
C=AR8 <
1(el# 3
C=AR8 30
000100
001200
003000
1111A00
0222B10
0030B20
$e2t1...
$e2t2 ...
$e2t3 ...
$AB I 0
$AB I A11
$AB
Create (n#e2es
+
+
Act(*e *ers(on o, $AB
7ield 2
C=AR8 <
7ield -
?5&C86
7ield 3
C=AR8 30
&AB loc)ed
Step 5: 'he secon!ary in!e4es !e&ine! in the ABAP Dictionary &or the tab+e are create! again.
Step 6: 'he te,porary tab+e @ECB tab+eA is !e+ete!.
Step 7: 'he +ock set at the beginning o& the con$ersion is !e+ete!.
& the con$ersion ter,inatesD the tab+e re,ains +ocke! an! a restart +og is 2ritten.
:aut"!n: 'he !ata o& a tab+e is not consistent !uring con$ersion. Progra,s there&ore shou+! not
access the tab+e !uring con$ersion. "ther2ise a progra, cou+! &or e4a,p+e use incorrect !ata 2hen
rea!ing the tab+e since not a++ the recor!s 2ere copie! back &ro, the te,porary tab+e. :!n6ers"!ns
t)ere7!re s)!uld n!t run dur"n% pr!duct"!n= Jou ,ust at +east !eacti$ate a++ the app+ications that
use tab+es to be con$erte!.
1!u must clean up term"nated c!n6ers"!ns. Progra,s that access the tab+e ,ight other2ise run
incorrect+y. n this case you ,ust &in! out 2hy the con$ersion ter,inate! @&or e4a,p+e o$er&+o2 o&
the correspon!ing tab+espaceA an! correct it. 'hen continue the ter,inate! con$ersion.
@CA (AP A7 BC430 5
6.10
SAP AG 1999
Possi#le Pro#les d!ring Conversions
&a#lespace over"lo%
Data loss i" )ey is red!ced in si@e
4nvalid change o" type
(ince the !ata e4ists in both the origina+ tab+e an! te,porary tab+e !uring con$ersionD the storage
re;uire,ents increase !uring con$ersion. & the tab+espace o$er&+o2s 2hen you re+oa! the !ata &ro,
the te,porary tab+eD the con$ersion 2i++ ter,inate. n this case you ,ust e4ten! the tab+espace an!
start the con$ersion in the !atabase uti+ity again.
& you shorten the key o& a tab+e @&or e4a,p+e 2hen you re,o$e or shorten the &ie+! +ength o& key
&ie+!sAD you cannot !istinguish bet2een the ne2 keys o& e4isting recor!s o& the tab+e. When you
re+oa! the !ata &ro, the te,porary tab+eD on+y one o& these recor!s can be +oa!e! back into the tab+e.
t is not possib+e to say 2hich recor! this 2i++ be. & you 2ant to copy certain recor!sD you ha$e to
c+ean up the tab+e be7!re the con$ersion.
During a con$ersionD the !ata is copie! back to the !atabase tab+e &ro, the te,porary tab+e 2ith the
ABAP state,ent B"8.-C"--.(P">D>7. 'here&ore on+y those type changes that can be
e4ecute! 2ith B"8.-C"--.(P">D>7 are a++o2e!. A++ other type changes cause the con$ersion
to be ter,inate! 2hen the !ata is +oa!e! back into the origina+ tab+e. n this case you ha$e to recreate
the o+! state prior to con$ersion. 0sing !atabase too+sD you ha$e to !e+ete the tab+eD rena,e the ECB
tab+e to its o+! na,eD reconstruct the runti,e ob#ect @in the !atabase uti+ityAD set the tab+e structure in
the Dictionary back to its o+! state an! then acti$ate the tab+e.
@CA (AP A7 BC430 10
6.11
SAP AG 1999
8es!ing &erinated Conversions
(hat yo! sho!ld do
Syslog
1#'ect log
D!ps
(hat yo! sho!ld not do
& a con$ersion ter,inatesD the +ock entry &or the tab+e set in the &irst step is retaine!. 'he tab+e can
no +onger be e!ite! 2ith the ,aintenance too+s o& the ABAP Dictionary @'ransaction (.11A.
A ter,inate! con$ersion can be ana+y6e! 2ith the !atabase uti+ity @'ransaction (.14A an! then
resu,e!. 'he !atabase uti+ity pro$i!es an analysis tool 2ith 2hich you can &in! the cause o& the
error an! the current state o& a++ the tab+es in$o+$e! in the con$ersion.
Jou can usua++y &in! the precise reason &or ter,ination in the ob>ect lo". & the ob#ect +og !oes not
pro$i!e any in&or,ation about the cause o& the errorD you ha$e to ana+y6e the syslo" or the short
dumps.
& there is a ter,inate! con$ersionD t2o options are !isp+aye! as pushbuttons in the !atabase uti+ity3
A&ter correcting the errorD you can resu,e the con$ersion 2here it ter,inate! 2ith the Continue
ad>ustment option.
'here is a+so the 4nloc/ table option. 'his option on+y !e+etes the e4isting +ock entry &or the
tab+e . Jou shou+! ne6er choose 4nloc/ table &or a ter,inate! con$ersion i& the !ata on+y e4ists in
the te,porary tab+eD i.e. i& the con$ersion ter,inate! in steps 3 or 4.
@CA (AP A7 BC430 11
6.12
SAP AG 1999
Append Str!ct!res -
1(el# 1 1(el# 2 1(el# 3 1(el# A 1(el# B
$able
7ield 2 7ield 3 7ield -
A""en# str.ct.re
7ield A 7ield B
Appen! structures per,it you to appen! custo,er &ie+!s to a (AP stan!ar! tab+e 2ithout ha$ing to
,o!i&y the tab+e !e&inition.
An appen! structure is a structure 2hich is assigne! to e4act+y one tab+e. 'here can be se$era+
appen! structures &or a tab+e.
When a tab+e is acti$ate!D a++ the acti$e appen! structures &or the tab+e are &oun! an! their &ie+!s are
appen!e! to the tab+e. & an appen! structure is create! or change!D the tab+e to 2hich it is assigne! is
a+so acti$ate! an! the changes a+so take e&&ect there 2hen it is acti$ate!.
*ike a++ structuresD an appen! structure !e&ines a type that can be use! in ABAP progra,s.
@CA (AP A7 BC430 12
6.13
SAP AG 1999
Append Str!ct!res 2
?e> SAP *ers(on (s
(m"orte#
1(el# 1 1(el# 2 1(el# 3 1(el# A 1(el# B
A""en# str.ct.re
7ield A 7ield B
$able
7ield 2 7ield 3 7ield -
7ield 2 7ield 3 7ield - 7ield 4
Custo,ers create appen! structures in their na,espace. 'he appen! structures are thus protecte!
against o$er2riting !uring an upgra!e.
'he ne2 $ersions o& the stan!ar! tab+es are i,porte! !uring the upgra!e. When the stan!ar! tab+es
are acti$ate!D the &ie+!s containe! in the acti$e appen! structures are appen!e! to the ne2 stan!ar!
tab+es. When appen! structures are a!!e! to a tab+eD you there&ore !o not ha$e to ,anua++y a!#ust the
custo,er ,o!i&ications to the ne2 (AP $ersion o& the tab+e @'ransaction (PDDA !uring the upgra!e.
'he or!er o& the &ie+!s in the ABAP Dictionary can !i&&er &ro, the or!er o& the &ie+!s in the !atabase.
Jou there&ore !o not ha$e to con$ert the tab+e 2hen you a!! an appen! structure or insert &ie+!s in
an e4isting appen! structure. 'he ne2 &ie+!s are si,p+y appen!e! to the tab+e in the !atabase. Jou
can a+2ays a!#ust the structure by a!#usting the !atabase cata+og @A*'.- 'AB*.A.
@CA (AP A7 BC430 13
6.14
SAP AG 1999
Append Str!ct!res 3
A""en# te ,(el#
on te #atabase
$able
Act(*ate
1(el# 1 1(el# 2 1(el# 3 1(el# A 1(el# B 1(el#
4
A""en# str.ct.re
7ield A 7ield B
7ield 2 7ield 3 7ield - 7ield 4
'he ne2 $ersion o& the (AP stan!ar! tab+e is acti$ate! an! the ne2 &ie+! is appen!e! to the !atabase
tab+e.
P+ease note the &o++o2ing points about appen! structures3
>o appen! structures ,ay be create! &or poo+e! an! c+uster tab+es.
& a +ong &ie+! @!ata type *C<- or *-AWA occurs in a tab+eD it cannot be e4ten!e! 2ith appen!
structures. 'his is because such +ong &ie+!s ,ust a+2ays be in the +ast position o& the &ie+! +istD i.e.
they ,ust be the +ast &ie+! o& the tab+e.
& you as a custo,er a!! an appen! structure to an (AP tab+eD the &ie+!s in this appen! structure
shou+! be in the custo,er na,espace &or &ie+!sD that is they shou+! begin 2ith JJ or QQ. 'his
pre$ents na,e co++isions 2ith ne2 &ie+!s inserte! in the stan!ar! tab+e by (AP.
& you as a partner ha$e your o2n reser$e! na,espace &or your !e$e+op,entsD the &ie+!s you se+ect
in appen! structures shou+! a+2ays +ie in this na,espace.
@CA (AP A7 BC430 14
6.15
SAP AG 1999
S!ary
&he r!ntie o#'ect and data#ase de"inition o" a ta#le !st
al%ays #e consistent. 7or this reason$ the corresponding
data#ase ta#le !st #e ad'!sted %hen a ta#le in the ABAP
Dictionary is changed.
&he syste al%ays tries to a)e str!ct!re changes to
ta#les #y changing the data#ase catalog CA0&58 &AB05D. 4"
this is not possi#le$ a conversion ta)es place.
4n a conversion$ the data is stored teporarily in a
teporary ta#le and then copied #ac) to the ta#le %ith its
ne% str!ct!re.
C!stoer "ields sho!ld al%ays #e added to SAP standard
ta#les !sing append str!ct!res.
@CA (AP A7 BC430 15
6.16Exerc"ses: :)an%es t! Database Tables
-n"t: :)an%es t! Database Tables
At the conc+usion o& these e4ercises you 2i++ be ab+e to3
Bake changes to e4isting ob#ects
Con$ert tab+es
.nhance stan!ar! tab+es 2ith appen! structures 2ithout ,o!i&ying
the,
'he origina+ !esign o& e,p+oyee ,anage,ent is no +onger appropriate
a&ter so,e organi6ationa+ changes at the air+ines. t is there&ore necessary
to ,ake s,a++ changes to ob#ects a+rea!y create! in pre$ious e4ercises.
'hese changes 2i++ be ,a!e in this e4ercise.
)-1 'he !esign o& tab+e Q%*C-.W44 is no +onger appropriate. 'he &ie+! &or the ro+e o& the
e,p+oyee !uring the &+ight is too +ong. Correct this error by re!ucing the &ie+!
+ength to 15 p+aces.
Create a ne2 !ata e+e,ent Q-"*.44 an! rep+ace the e4isting !ata e+e,ent 2ith the
ne2 one. When you !e&ine !ata e+e,ent Q-"*.44D !o not use a !o,ainH instea!
enter the !ata type an! +ength !irect+y 2hen you !e&ine the !ata e+e,ent. Acti$ate
the tab+e.
)-2 'he e,p+oyees 2ith ,anage,ent or ,aintenance &unctions ha$e their 2orkp+ace at an
airport. 'hey can be reache! at this airport using a te+ephone nu,ber. A+so recor!
2here the a!,inistrati$e e,p+oyees 2ork @o&&iceA. nc+u!e this in&or,ation in tab+e
Q.BP*"J44.
Create an appen! structure &or tab+e Q.BP*"J44 containing the &o++o2ing
in&or,ation3
2"eld Data e+e,ent
Airport S=A-:P?:T
"&&ice (KB0-.A0>"
'e+ephone (K'.*>"
4!te t)at t)e 7"eld names "n an append structure must l"e "n t)e cust!mer
namespace 7!r 7"elds. T)e 7"eld names s)!uld t)ere7!re be%"n ?"t) .. !r 11.
@CA (AP A7 BC430 1)
)-3 Create a suitab+e &oreign key &or &ie+! Airport o& the appen! structure.
'he tab+e o& a++ airports is ca++e! (A-P"-'.
2!r a c!mplete de7"n"t"!n !7 t)e 7!re"%n key y!u must als! de7"ne a 7"eld !7 t)e
append"n% table A.E/,'01xxB.
(tart Progra, BC430KC<.C9 2ith 'ransaction (.31 a&ter this
e4ercise. 'he progra, checks 2hether your so+utions are correct.
@CA (AP A7 BC430 1/
6.17S!lut"!ns: :)an%es t! Database Tables
-n"t: :)an%es t! Database Tables
)-1 7o to change ,o!e in the ,aintenance screen &or tab+e Q%*C-.W44. 'ake the
&o++o2ing steps.
1A "$er2rite !ata e+e,ent (.BPK-"*. in co+u,n Field type 2ith the na,e o&
your !ata e+e,ent Q-"*.44. (a$e the change.
2A Doub+e-c+ick on the na,e Q-"*.44. n the ne4t !ia+og bo4D con&ir, that you
2ant to create the !ata e+e,ent.
3A 'he ,aintenance screen &or !ata e+e,ents appears. .nter a short te4t.
4A C+ick on tab page Definition. Bark .uilt)in type. Jou can no2 enter $a+ues &or
&ie+!s DatatypeD Len"th an! Decplaces. .nter C<A- as !ata type an! 15 as
+ength.
5A "n tab page Field labelD ,aintain the te4t &or the !ata e+e,ent.
)A Acti$ate the !ata e+e,ent.
/A Jou go to the acti$ation +og. Jou are re,in!e! that shortening the &ie+! re;uires
a con$ersion o& tab+e Q%*C-.W44.
1A 7o back to the tab+e ,aintenance screen.
5A >a$igate to the !atabase uti+ity 2ith 4tilities Database utility.
10A Choose Acti5ate and ad>ust database. Con&ir, the ne4t security ;uery. 'he
syste, con$erts the tab+e.
)-2 'o !e&ine the appen! structure &or tab+e Q.BP*"J443
1A 7o to !isp+ay ,o!e in the ,aintenance screen &or tab+e Q.BP*"J44.
2A Choose Goto U Append structure.
3A n the ne4t !ia+og bo4D enter the re;uire! na,e &or the appen! structure. t ,ust
satis&y the usua+ na,ing con$entions. Choose Continue.
4A 'he ,aintenance screen &or the appen! structure is !isp+aye!. Baintenance o&
the appen! structure is ana+ogous to that &or a structure.
5A .nter a short te4t an! insert &ie+!s AirportD ?ffice an! Telephone 2ith the
speci&ie! !ata e+e,ents.
)A >ote that a++ the &ie+!s o& an appen! structure ,ust +ie in the custo,er
na,espace. 'he &ie+! na,es there&ore ,ust begin 2ith QQ or JJ.
/A Acti$ate the appen! structure. Disp+ay the acti$ation +og 2ith Goto U
Acti5ation lo".
'ab+e Q.BP*"J44 is auto,atica++y a!#uste! 2hen the appen! structure is
acti$ate!. 'he ne2 &ie+!s are appen!e! to the e4isting &ie+!s in the !atabase.
@CA (AP A7 BC430 11
)-3 'he &oreign key ,ust be !e&ine! in the appen! structure ,aintenance routine. Jou can
go there either by entering its na,e as !ata type in the initia+ screen o& the ABAP
Dictionary an! choosing Chan"e or 2ith Goto Append structure in the
,aintenance screen &or tab+e Q.BP*"J44. 'ake the &o++o2ing steps3
1A P+ace the cursor on &ie+! Airport. Choose the key icon. Copy the syste,
proposa+.
2A n a !ia+og bo4 you are in&or,e! that the &oreign key is not co,p+ete+y
speci&ie!. Choose Continue.
'he &oreign key cannot be &u++y speci&ie! in the appen! structure since the key
o& check tab+e (A-P"-' contains the c+ient &ie+! an! the &ie+! &or the
airport co!eD but the appen! structure !oes not contain the c+ient &ie+!.
3A 'he ,aintenance screen &or the &oreign key appears. 'he check tab+e an! the
&ie+! assign,ent are a+rea!y &i++e! !ue to the syste, proposa+. .nter a
suitab+e Short description.
4A Jou no2 ha$e to co,p+ete the &ie+! assign,ent. -e,o$e the ,arking &or
generic ,apping. 'hen enter Q.BP*"J44 in co+u,n For! /ey table an!
the na,e o& the c+ient &ie+! o& this tab+e in co+u,n For! /ey field.
5A Choose 1on)/ey)fields/candidates as the type o& &oreign key &ie+!s @since the
Airport &ie+! is not a key &ie+! o& tab+e Q.BP*"J44A an! as car!ina+ity C
@since not e$ery e,p+oyee is assigne! to an airportA to C1 @since se$era+
e,p+oyees can be assigne! to the sa,e airportA.
)A Choose Copy an! acti$ate the appen! structure.
@CA (AP A7 BC430 15
7
SAP AG 1999
(hy do yo! need vie%sH
Creating a vie% #y 'oin$ pro'ection and selection
Foin conditions and "oreign )eys
Selection o" data %ith vie%s
Data#ase vie%s
*aintenance vie%s
4nner and o!ter 'oins
2ie%s
@CA (AP A7 BC430 1
7.2
SAP AG 1999
Co!rse 1#'ectives
At the end o" this !nit yo! %ill #e a#le to;
F!dge ho% a vie% is created "ro ta#les %ith 'oin$
pro'ection and selection
Create data#ase vie%s
Set !p a lin) #et%een "oreign )eys and 'oin conditions
:se vie%s in progras "or data selection
F!dge %hen to !se aintenance vie%s
8ecogni@e the di""erence #et%een an inner 'oin and an
o!ter 'oin
@CA (AP A7 BC430 2
7.3
SAP AG 1999
13 12 11
14 1%
16 1; 1<
$able 3
$able 2
$able 1
2ie% on the ta#les
2ie% on data
that is
distri#!ted on
ore than one
ta#le
(hy do yo! Need 2ie%sH
7- 72 73 7+ 7A
Data &or an app+ication ob#ect is o&ten !istribute! on se$era+ !atabase tab+es. Database syste,s
there&ore pro$i!e you 2ith a 2ay o& !e&ining app+ication-speci&ic $ie2s on !ata in se$era+ tab+es.
'hese are ca++e! $ie2s.
Data &ro, se$era+ tab+es can be co,bine! in a ,eaning&u+ 2ay using a $ie2 @#oinA. Jou can a+so
hi!e in&or,ation that is o& no interest to you @pro#ectionA or on+y !isp+ay those !ata recor!s that
satis&y certain con!itions @se+ectionA.
'he !ata o& a $ie2 can be !isp+aye! e4act+y +ike the !ata o& a tab+e in the e4ten!e! tab+e
,aintenance.
@CA (AP A7 BC430 3
7.4
SAP AG 1999
&a#le
&ABA
&a#le
&ABB
1 1
1 2
2
2
$e2t 1 $e2t 3
$e2t 4
$e2t %
$e2t 2
$e2t 6
A
A
B
B
1(el# 1 1(el# 2 1(el# 3 1(el# 4 1(el# %
1(el# 1 1(el# 2 1(el# 3 1(el# 4 1(el# %
1 $e2t 1
1 $e2t 1
1 $e2t 1
1 $e2t 1
2 $e2t 2
2 $e2t 2
2 $e2t 2
2 $e2t 2
1
1
2
2
$e2t 3
$e2t 4
$e2t %
$e2t 6
A
A
B
B
1
1
2
2
$e2t 3
$e2t 4
$e2t %
$e2t 6
A
A
B
B
Cross-prod!ct o"
ta#les &ABA and
&ABB
Str!ct!re o" a 2ie% - Starting Sit!ation
'he structure o& a $ie2 an! se+ection o& the !ata using this $ie2 2i++ be sho2n 2ith an e4a,p+e.
7i$en t2o tab+es 'ABA an! 'ABB. 'ab+e 'ABA contains 2 entries an! tab+e 'ABB 4 entries.
'he tab+es are &irst appen!e! to one another. 'his resu+ts in the cross-pro!uct o& the t2o tab+esD in
2hich each recor! o& 'ABA is co,bine! 2ith each recor! o& 'ABB.
@CA (AP A7 BC430 4
7.5
SAP AG 1999
Jo(n con#(t(on! $ABA : 1(el# 1 K $ABB : 1(el# 3
1(el# 1 1(el# 2 1(el# 3 1(el# 4 1(el# %
1 $e2t 1
1 $e2t 1
1 $e2t 1
1 $e2t 1
2 $e2t 2
2 $e2t 2
2 $e2t 2
2 $e2t 2
1
1
2
2
$e2t 3
$e2t 4
$e2t %
$e2t 6
A
A
B
B
1
1
2
2
$e2t 3
$e2t 4
$e2t %
$e2t 6
A
A
B
B
8ed!ction o"
the cross-
prod!ct
Str!ct!re o" a 2ie% - Foin Condition
0sua++y the entire cross-pro!uct is not a ,eaning&u+ se+ection. Jou shou+! there&ore +i,it the cross-
pro!uct 2ith a #oin con!ition. 'he #oin con!ition !escribes ho2 the recor!s o& the t2o tab+es are
re+ate!.
n our e4a,p+eD %ie+! 3 o& 'ABB i!enti&ies %ie+! 1 o& 'ABA. 'he #oin con!ition is then3
'ABA - %ie+! 1 L 'ABB - %ie+! 3
With this #oin con!itionD a++ the recor!s 2hose entry in %ie+! 1 is not i!entica+ to the entry in %ie+! 3
are re,o$e! &ro, the cross pro!uct. 'he co+u,n &or %ie+! 3 in the $ie2 is there&ore unnecessary.
@CA (AP A7 BC430 5
7.6
SAP AG 1999
1(el# 1 1(el# 2 1(el# 4 1(el# %
1 $e2t 1
1 $e2t 1
2 $e2t 2
2 $e2t 2
$e2t 3
$e2t 4
A
B
$e2t %
$e2t 6
A
B
1(el# 1 1(el# 2 1(el# %
1 $e2t 1
1 $e2t 1
2 $e2t 2
2 $e2t 2
$e2t 3
$e2t 4
$e2t %
$e2t 6
Pro+ect(on
Str!ct!re o" a 2ie% - 7ield Selection CPro'ectionD
"&ten so,e o& the &ie+!s o& the tab+es in$o+$e! in a $ie2 are o& no interest. Jou can e4p+icit+y !e&ine
the set o& &ie+!s to be inc+u!e! in the $ie2 @pro#ectionA.
n our e4a,p+eD %ie+! 4 is o& no interest an! can there&ore be hi!!en.
@CA (AP A7 BC430 )
7.7
SAP AG 1999
Select(on con#(t(on! $ABB : 1(el# 4 K LAM.
1(el# 1 1(el# 2 1(el# %
1 $e2t 1
1 $e2t 1
2 $e2t 2
2 $e2t 2
$e2t 3
$e2t 4
$e2t %
$e2t 6
1(el# 1 1(el# 2 1(el# %
1 $e2t 1
1 $e2t 1
2 $e2t 2
2 $e2t 2
$e2t 3
$e2t 4
$e2t %
$e2t 6
Str!ct!re o" a 2ie% - Selection Condition
1(el# 4
A
B
A
B
'he set o& recor!s that can be !isp+aye! 2ith the $ie2 can be &urther restricte! 2ith a se+ection
con!ition.
n our e4a,p+eD on+y those recor!s 2ith $a+ue RAR in %ie+! 4 shou+! be !isp+aye! 2ith the $ie2.
A se+ection con!ition there&ore can a+so be &or,u+ate! 2ith a &ie+! that is not containe! in the $ie2.
@CA (AP A7 BC430 /
7.
SAP AG 1999
&A?)$ CARR4) C9??4) 1/)A$3 B99N4) C5S$9&4)
...
SB11>
&A?)$ CARR4) C9??4) C4$@1R9& C4$@$9
SP704
... ... ...
001
001
SC:S&1* &A?)$ 4) C4$@ ?A&3
...
1223%6 Sm(t ?e> @ork 001
...
1223%6
1223%6
...
...
001
001
?e> @ork
$okyo Berl(n
Berl(n AA
AA
/=
/=
4<
324
324
4<
...
...
...
...
36<9
3690
...
...
...
...
3o% are &a#les 0in)ed to 2ie%sH
Example: 'ra$e+ agencies so,eti,es ha$e to check 2hich custo,er is booke! on 2hich &+ights. 'he
correspon!ing !ata is !istribute! on se$era+ tab+es3
(C0('"B3 Custo,er !ataD such as the custo,er nu,berD na,e an! a!!ress
(B""93 Booking !ataD such as the carrierD &+ight nu,ber an! passenger @custo,er nu,berA
(P%*3 %+ight !ataD such as the city o& !eparture an! city o& arri$a+
Jou ha$e to create a $ie2 on tab+es (C0('"BD (B""9 an! (P%* to obtain the booking !ata.
n this case the #oin con!itions are3
(B""9-BA>D' L (C0('"B-BA>D'
(B""9-C0('"BD L (C0('"B-D
(P%*-BA>D' L (B""9-BA>D'
(P%*-CA--D L (B""9-CA--D
(P%*-C">>D L (B""9-C">>D
@CA (AP A7 BC430 1
7.$
SAP AG 1999
&A?)$ 4) ?A&3 C4$@ CARR4) C9??4) 1/)A$3 B99N4) C4$@1R9& C4$@$9
001
001
1223%6 Sm(t ?e> @ork AA 4< 36<9 ?e> @ork Berl(n
1223%6 Sm(t ?e> @ork /= 324 3690 Berl(n $okyo
G(e> SC5SFB99N ,or c.stomer book(n's
Str!ct!re o" the 2ie%
4.9.1999
9.9.1999
Jou can get the bookings &or a particu+ar custo,er by se+ecting the correspon!ing recor!s &or keys
BA>D' an! C0('"BD in tab+e (B""9.
Jou can get the &+ight !ata &ro, tab+e (P%* &or each booking in tab+e (B""9 by se+ecting the
correspon!ing recor! &or the keys BA>D'D CA--D an! C">>D &ro, tab+e (P%*.
Jou can !isp+ay on+y the custo,er bookings 2hich 2ere not cance+e! using the $ie2 2ith the
&o++o2ing se+ection con!ition3
(B""9-CA>C.*.D ST RGR
'he #oin con!itions can a+so be !eri$e! &ro, the e4isting &oreign key re+ationships. Copying the #oin
con!itions &ro, the e4isting &oreign keys is supporte! in the ,aintenance transaction.
'he &ie+! na,es o& the un!er+ying tab+e &ie+!s are nor,a++y use! as &ie+! na,es in the $ie2.
<o2e$erD you can a+so choose a !i&&erent &ie+! na,e. 'his is necessary &or instance i& t2o &ie+!s 2ith
the sa,e na,e are to be copie! to the $ie2 &ro, !i&&erent tab+es. n this case you ,ust choose a
!i&&erent na,e &or one o& the t2o &ie+!s in the $ie2.
@CA (AP A7 BC430 5
7.10
SAP AG 1999
REPORT CUSBOO!1.
PARAMETERS" CUSTOMID LI!E SBOO!#CUSTOMID.
DATA" BOO!INGS TPE SCUS$BOO!.
WRITE" % &E'()*(+, -../(+,) 0.1 23)*.45167 CUSTOMID7 &"6.
SELECT * FROM SCUS$BOO! INTO BOO!INGS
WHERE CUSTOMID = CUSTOMID.
WRITE" % &CUSTOMER67 BOO!INGS#NAME7 &-../58 0.167
BOO!INGS#CARRID7BOO!INGS#CONNID7 &01.467BOO!INGS#CITFROM7
&*.67BOO!INGS#CITTO7 &.+67BOO!INGS#FLDATE.
ENDSELECT.
IF S#SUBRC 9: 0.
WRITE" % &N. -../(+,) 5'()*6.
ENDIF.
Data Selection %ith 2ie%s
Jou 2ou+! get the sa,e resu+ts using neste! (.*.C' state,ents3
(.*.C' W %-"B (C0('"B W<.-. D L C0('"BD.
(.*.C' W %-"B (B""9 W<.-. C0('"BD L (C0('"B-D.
(.*.C' W %-"B (P%* W<.-. CA--D L (B""9-CA--D A>D
C">>D L (B""9-C">>D
W-'.3 : XCusto,erYD (C0('"B->AB.D Xbooke! onYD (P%*-CA--DD (P%*-C">>DD
X&ro,YD (P%*-C'J%-"BD XtoYD (P%*-C'J'"D XonYD (B""9-%*DA'..
.>D(.*.C'.
.>D(.*.C'.
.>D(.*.C'.
(e+ection 2ith a !atabase $ie2D ho2e$erD is usua++y ,ore e&&icient than se+ection 2ith a neste!
(.*.C' state,ent.
As o& -e+ease 4.0 you can &or,u+ate the #oin con!ition !irect+y in "P.> (E*.
A $ie2 has type character an! can be accesse! in progra,s +ike a++ other types an! can be use! to
!e&ine !ata ob#ects.
@CA (AP A7 BC430 10
7.11
SAP AG 1999
16 1; 1<
$able 3
14 1%
$able 2
13 12 11
$able 1
G(e> #e,(n(t(on (n te ABAP )(ct(onary
G(e> #e,(n(t(on (n
te #atabase
4s create# (n te )B
#.r(n' act(*at(on
ABAP "ro'ram
7- 72 73 7+ 7A
11 12 13 1% 1<
Data#ase 2ie%s
)atabase (nter,ace
A !atabase $ie2 is !e&ine! in the ABAP Dictionary an! auto,atica++y create! on the !atabase !uring
acti$ation. Accesses to a !atabase $ie2 are passe! !irect+y to the !atabase &ro, the !atabase
inter&ace. 'he !atabase so&t2are per&or,s the !ata se+ection.
& the !e&inition o& a !atabase $ie2 is change! in the ABAP DictionaryD the $ie2 create! on the
!atabase ,ust be a!#uste! to this change. (ince a $ie2 !oes not contain any !ataD this a!#ust,ent is
,a!e by !e+eting the o+! $ie2 !e&inition an! creating the $ie2 again in the ABAP Dictionary 2ith
its ne2 !e&inition.
'he ,aintenance status !e&ines 2hether you can on+y rea! 2ith the $ie2 or 2hether you can a+so
2rite 2ith it. & a !atabase $ie2 2as !e&ine! 2ith ,ore than one tab+eD this $ie2 ,ust be rea! on+y.
'he !ata rea! 2ith a !atabase $ie2 can be bu&&ere!. 8ie2 !ata is bu&&ere! ana+ogous+y to tab+es. 'he
technica+ settings o& a !atabase $ie2 contro+ 2hether the $ie2 !ata ,ay be bu&&ere! an! ho2 this
shou+! be !one. 'he sa,e settings @bu&&ering typesA can be use! here as &or tab+e bu&&ering. 'he
bu&&ere! $ie2 !ata is in$a+i!ate! 2hen the !ata in one o& the base tab+es o& the $ie2 changes.
@CA (AP A7 BC430 11
7.12
SAP AG 1999
4ncl!des in Data#ase 2ie%s
7 A 7 /
&ABB &ABB
incl!ded in incl!ded in
vie% vie%
Data#ase vie% on &ABA$ &ABB and &ABC
&ABB &ABA &ABC
7 - 7 3 7 4 7 + 7 , 7 4 7 + 7 , 7 A
7 2 7 3 7 - 7 + 7 , 7 4
Jou can inc+u!e entire tab+es in !atabase $ie2s. n this case a++ the &ie+!s o& the inc+u!e! tab+e
beco,e &ie+!s o& the $ie2 @2hereby you can e4p+icit+y e4c+u!e certain &ie+!sA. & ne2 &ie+!s are
inc+u!e! in the tab+e or e4isting &ie+!s are !e+ete!D the $ie2 is auto,atica++y a!#uste! to this change.
A ne2 or !e+ete! &ie+! is there&ore auto,atica++y inc+u!e! in the $ie2 or !e+ete! &ro, it.
& an appen! structure is a!!e! to a tab+e inc+u!e! in a $ie2D the &ie+!s a!!e! 2ith the appen!
structure are auto,atica++y inc+u!e! in the $ie2.
'o inc+u!e a tab+e in a $ie2D you ,ust enter the character RWR in &ie+! 8ie# field in the $ie2
,aintenanceD the na,e o& the tab+e to be inc+u!e! in the &ie+! Table an! the character RWR again in the
&ie+! Field name.
& you !o not 2ant to inc+u!e a &ie+! o& the inc+u!e! tab+e in the $ie2D procee! as &o++o2s3
.nter a R-R in the &ie+! 8ie# field.
.nter the na,e o& the inc+u!e! tab+e in the &ie+! Table.
.nter the na,e o& the &ie+! in the &ie+! Field name.
@CA (AP A7 BC430 12
7.13
SAP AG 1999
16 1; 1<
$able 3
13 12 11
$able 1
$able 2
14 1%
&a(ntenance
*(e> on te
tables
)ata e2can'e >(t
te ma(ntenance *(e>
1ore('n key 1ore('n key
7- 72 73 7+ 7A
*aintenance 2ie%s
Application o#'ect
Data that is !istribute! on ,ore than one tab+e o&ten &or,s a +ogica+ unitD ca++e! an app+ication ob#ect.
Jou shou+! be ab+e to !isp+ayD change an! create the !ata o& such an app+ication ob#ect together.
0sers usua++y are not intereste! in the technica+ i,p+e,entation o& the app+ication ob#ectD such as the
!istribution o& the !ata on se$era+ tab+es.
Jou can ,aintain co,p+e4 app+ication ob#ects in a si,p+e 2ay using a ,aintenance $ie2. 'he !ata
is auto,atica++y !istribute! on the un!er+ying !atabase tab+es.
A++ the tab+es use! in a ,aintenance $ie2 ,ust be +inke! 2ith a &oreign key. 'his ,eans that the #oin
con!itions are a+2ays !eri$e! &ro, the &oreign key in the ,aintenance $ie2. Jou cannot enter the
#oin con!itions !irect+y as in a !atabase $ie2.
A ,aintenance inter&ace 2ith 2hich the !ata o& the $ie2 can be !isp+aye!D change! an! create! ,ust
be generate! &ro, the !e&inition o& a ,aintenance $ie2 in the ABAP Dictionary.
When the ,aintenance inter&ace is create!D &unction ,o!u+es that !istribute the !ata ,aintaine! 2ith
the $ie2 on the un!er+ying tab+es are auto,atica++y generate!.
'he ,aintenance inter&ace is generate! 2ith the 'ransaction Generate Table 8ie# @'ransaction
(.54A or &ro, the $ie2 ,aintenance screen 2ith 2n5ironment -> Tab!maint!"enerator.
@CA (AP A7 BC430 13
7.14
SAP AG 1999
(hat is displayed %ith the vie%H
4nner +o(n 9.ter +o(n
$able $ABA $able $ABB
Jo(n con#(t(on
1(el# 1 1(el# 2 1(el# 4
A $e2t 1
B $e2t 2
$e2t 3
$e2t 4
1(el# 1 1(el# 2 1(el# 4
A $e2t 1
B $e2t 2
$e2t 3
$e2t 4
C &e6t +
A
B
$e2t 1
$e2t 2
1(el# 1 1(el# 2
C &e6t +
A
B
$e2t 3
$e2t 4
1(el# 3 1(el# 4
4nner and 1!ter Foins
'he set o& !ata that can be se+ecte! 2ith a $ie2 great+y !epen!s on 2hether the $ie2 i,p+e,ents an
inner #oin or an outer #oin.
With an inner #oinD you on+y get those recor!s 2hich ha$e an entry in a++ the tab+es inc+u!e! in the
$ie2. With an outer #oinD on the other han!D those recor!s that !o not ha$e a correspon!ing entry in
so,e o& the tab+es inc+u!e! in the $ie2 are a+so se+ecte!.
'he hit +ist &oun! 2ith an inner #oin can there&ore be a subset o& the hit +ist &oun! 2ith an outer #oin.
Database $ie2s i,p+e,ent an inner #oin. Jou on+y get those recor!s 2hich ha$e an entry in a++ the
tab+es inc+u!e! in the $ie2.
Baintenance $ie2s i,p+e,ent an outer #oin.
@CA (AP A7 BC430 14
7.15
SAP AG 1999
:nit S!ary
Data records that are distri#!ted on di""erent ta#les can #e
co#ined !sing a vie%.
A vie% is derived "ro the ta#les involved !sing the
relational operators 'oin$ pro'ection and selection.
ABAP progras can select data !sing a vie%. Selection
%ith a data#ase vie% is !s!ally "aster than direct ta#le
selection %ith a nested S505C& stateent.
=o! can aintain data records "ro several ta#les
together !sing a aintenance vie%.
@CA (AP A7 BC430 15
7.16Exerc"ses: C"e?s
-n"t: C"e?s
At the conc+usion o& these e4ercises you 2i++ be ab+e to3
Create $ie2s
De&ine #oin con!itions
De&ine se+ection con!itions
Bu&&er !atabase $ie2s
'he !ata e4isting &or an e,p+oyee is !istribute! on se$era+ tab+es @correspon!ing to the
re+ationa+ !ata ,o!e+A. %or so,e e4ercisesD ho2e$erD a co,p+ete $ie2 on this !ata is
nee!e!. n this e4ercise the correspon!ing $ie2s are i,p+e,ente! by creating $ie2s.
/-1 'he &+ight personne+ @a++ pi+ots an! ste2ar!sA ,ust be se+ecte! 2hen a &+ight cre2 is set
up. >ot a++ the !ata in tab+e Q.BP*"J44 ,ay be !isp+aye! 2hen this !ata is
accesse!. %or e4a,p+eD the e,p+oyee setting up the tea,s ,ay not see the sa+ary o&
the cre2 ,e,bers. 'he te+ephone nu,ber o& the e,p+oyeeRs !epart,ent shou+! be
output in case o& ;uestions.
/-1-1 Create a suitab+e !atabase $ie2 Q.BP%*J44 that satis&ies these
re;uire,ents. 'he &o++o2ing in&or,ation about an e,p+oyee shou+! be
!isp+aye!3
C+ient
Carrier
Personne+ nu,ber
%irst na,e
*ast na,e
'e+ephone nu,ber o& the !epart,ent
Depart,ent co!e
/-1-2 Bake sure that on+y &+ight personne+ can be se+ecte! 2ith the $ie2.
/-1-3 Jou probab+y 2i++ ha$e to access the !ata using the $ie2 &re;uent+y. 'he
se+ecte! !ata shou+! there&ore be bu&&ere! in or!er to increase per&or,ance.
Choose full bufferin" as bu&&ering type.
/-2 'o set up the &+ight cre2sD you ha$e to se+ect the e4isting e,p+oyee assign,ents &or
&+ights. A!!itiona+ in&or,ation about the &+ightD such as the city o& !eparture an!
city o& arri$a+D is o& particu+ar interest.
@CA (AP A7 BC430 1)
/-2-1 Create a !atabase $ie2 QC-.W(44 to !isp+ay 2hich e,p+oyees are
assigne! to 2hat &+ights.
'he &o++o2ing !ata shou+! be !isp+aye!3
C+ient
Carrier
%+ight connection
Date o& &+ight
Personne+ nu,ber
%irst an! +ast na,es o& the e,p+oyee
-o+e o& the e,p+oyee on the &+ight @pi+otD copi+otD ste2ar!A
'ype o& airp+ane
City o& !eparture o& the &+ight
City o& arri$a+ o& the &+ight
0se the #oin con!itions &ro, the &oreign key bet2een tab+es Q.BP*"J44
an! Q%*C-.W44. Create these &oreign keys be&ore !e&ining the $ie2.
Table S2'<D@T c!nta"ns t)e "n7!rmat"!n ab!ut t)e type !7 a"rplane. T)e
c"t"es !7 departure and arr"6al can be 7!und "n table S,2'<.
/-2-2 .nter yourse+& as an e,p+oyee o& carrier AA @A,erican Air+inesA an! assign
yourse+& to a &+ight as pi+ot. 'hen !isp+ay your cities o& !eparture an! arri$a+
2ith the $ie2.
/-3 Supplementary Exerc"se: Write an ABAP progra, 2hich outputs the cre2 assigne!
to a &+ight. (e+ect the !ata 2ith $ie2 QC-.W(44. 'he &o++o2ing !ata shou+! be
output3
Carrier
%+ight
Date o& &+ight
City o& !eparture
City o& arri$a+
Pi+otD copi+ot
(te2ar!
& you a+rea!y atten!e! an ABAP progra,,ing courseD you can no2 e!it the
output. A c+ear &or, &or the output 2ou+! be &or e4a,p+e3
(Carrier* (Fli"ht* on (Date=of=fli"ht* &ro, (City=of=departure* to
(City=of=arri5al*3
Pi+ot3
@CA (AP A7 BC430 1/
Copi+ot3
(te2ar!s3 $ $
is here the &irst na,eD +ast na,e an! personne+ nu,ber o& the correspon!ing
person.
/-4 Supplementary Exerc"se: Create a ,aintenance $ie2 2ith the na,e QPA-'>.-44D
2ith 2hich you can easi+y ,aintain ne2 business partners. 'he business partners
are entere! in tab+e (B0(PA-'. A business partner can be either a &+ight custo,er
or a tra$e+ agency. & it is a tra$e+ agencyD there 2i++ be a correspon!ing entry in
tab+e ('-A8.*A7.
'he $ie2 shou+! a+so per,it you to ,aintain tab+es (B0(PA-' an! ('-A8.*A7
at one ti,e. nc+u!e a++ the necessary &ie+!s o& the tab+es in the $ie2.
7enerate the ,aintenance inter&ace. 0se the &o++o2ing para,eters3
%unction group3 QQBC43044
Authori6ation group3 (0>
Baintenance type3 one-step
"$er$ie2 screen3 100
Baintain the !ata o& a ne2 tra$e+ agency using the enhance! tab+e ,aintenance
@System Ser5ices Table maintenance 2t! table maint!,!
@CA (AP A7 BC430 11
7.17S!lut"!ns: C"e?s
-n"t: C"e?s
/-1 'he $ie2 shou+! per,it a $ie2 on !ata in tab+es Q.BP*"J44 an! QD.PB.>'44. 'o
create the $ie23
1A n the initia+ screen o& the ABAP DictionaryD ,ark ob#ect type 8ie#D enter the
ob#ect na,e Q.BP%*J44 an! choose Create.
2A A !ia+og bo4 appears in 2hich you shou+! se+ect the $ie2 type. Bark Database
5ie# an! press Choose.
3A .nter a short te4t in the ne4t screen.
'he $ie2 shou+! !isp+ay !ata about e,p+oyees @&ro, tab+e Q.BP*"J44A an!
!epart,ents @&ro, tab+e QD.PB.>'44A.
4A %irst enter tab+e Q.BP*"J44 in &ie+! Tables.
5A Choose :elationships. A++ the &oreign key re+ationships o& tab+e Q.BP*"J44
to other tab+es are +iste!. Bark the re+ationship to tab+e QD.PB.>'44 an!
choose Copy.
)A 'he #oin con!itions are copie! &ro, the &oreign key. n a !i&&erent ,o!eD
!isp+ay the &oreign key bet2een the t2o tab+es an! notice the re+ationship
bet2een the &oreign key an! the #oin con!itions.
/A Jou no2 ha$e to copy &ie+!s &ro, the tab+es to the $ie2. C+ick on tab page
8ie# fields.
1A Choose Table fields. n the ne4t !ia+og bo4D ,ark tab+e Q.BP*"J44 an!
choose Choose.
5A A++ the &ie+!s o& tab+e Q.BP*"J44 are +iste!. Bark &ie+!s ClientD CarrierD
Personnel numberD First nameD an! Last name. Choose Copy. 'he &ie+!s are
no2 inserte! in the $ie2.
10A Again choose Table fields. n the !ia+og bo4D choose tab+e QD.PB.>'44 an!
insert &ie+!s Department telephone an! Department code in the $ie2 as
!escribe! abo$e.
"n+y &+ight personne+ shou+! be se+ecte! 2ith the $ie2. Jou can !e&ine this restriction
2ith a se+ection con!ition.
11A C+ick on tab page Selection conditions.
12A 'he restriction 2hether an e,p+oyee be+ongs to the &+ight personne+ is containe!
in &ie+! Q.BP*"J44-Area. .nter it in co+u,ns Table an! Field name.
13A %+ight personne+ is i!enti&ie! by the $a+ue R%R in &ie+! Area. .nter .E in the
co+u,n ?perator an! R%R @inc+u!ing the apostrophesA in co+u,n Compar!
5alue.
Jou no2 ha$e to bu&&er the $ie2.
@CA (AP A7 BC430 15
14A Choose Goto U Technical settin"s. 'he ,aintenance screen &or the technica+
settings o& the $ie2 appears. With the e4ception o& so,e attributes that are
,eaning+ess &or $ie2s an! 2hich are there&ore not !isp+aye!D the screen is
ana+ogous to the correspon!ing ,aintenance screen &or tab+es.
15A Bark .ufferin" s#itched on an! Fully buffered.
1)A (a$e the technica+ settings an! return to the $ie2 ,aintenance screen.
1/A Acti$ate the $ie2.
/-2 'he $ie2 shou+! per,it a co,,on $ie2 on !ata in tab+es Q%*C-.W44D
Q.BP*"J44D (%*7<' an! (P%*. 'o create the $ie23
1A %irst create the &oreign key. 'o !o thisD go to the ,aintenance screen &or tab+e
Q%*C-.W44. De&ine a &oreign key 2ith check tab+e Q.BP*"J44 &or &ie+!
.BPK>0B. 0se the &ie+! assign,ent propose! by the syste,. 'he
car!ina+ity o& the re+ationship is 13C> an! the &oreign key &ie+!s are key
&ie+!s.
2A (e+ect ob#ect type 8ie# in the initia+ screen o& the ABAP DictionaryD enter the
ob#ect na,e QC-.W(44 an! choose Create.
3A A !ia+og bo4 appears in 2hich you shou+! se+ect the $ie2 type. Bark Database
5ie# an! press Choose.
4A .nter a short te4t in the ne4t screen.
'he $ie2 shou+! !isp+ay !ata about the assign,ent o& e,p+oyees to &+ights @in tab+e
Q%*C-.W44AD about e,p+oyee !ata @in tab+e Q.BP*"J44A an! about &+ight !ata
@in tab+e (%*7<'A. 'he in&or,ation about the cities o& !eparture an! arri$a+ are in
the &+ight sche!u+e @tab+e (P%*A an! not !irect+y in tab+e (%*7<'.
5A %irst enter tab+e Q%*C-.W44 in &ie+! Tables.
)A >o2 inc+u!e tab+e Q.BP*"J44 in the $ie2 an! +ink it 2ith tab+e
Q%*C-.W44. Jou can create the #oin con!itions &ro, the &oreign key
bet2een the tab+es.
/A Position the cursor on Q%*C-.W44 an! choose :elationships.
1A A !ia+og bo4 appears +isting a++ e4isting &oreign key re+ationships o& tab+e
Q%*C-.W44 to other tab+es. Bark the re+ationship to tab+e Q.BP*"J44
an! choose Copy.
5A 'ab+e Q.BP*"J44 is entere! in &ie+! Tables an! the #oin con!itions are
create! &ro, the &oreign key bet2een the t2o tab+es.
Create the &o++o2ing #oin con!itions3
.E/,'01xx#:l"ent I .2':>E5xx#:'<E4T
.E/,'01xx#:arr"er I .2':>E5xx#:*>><D
.E/,'01xx#,ers!nnel number I .2':>E5xx#E/,E4-/
10A nc+u!e tab+e (%*7<' in the $ie2 in the sa,e 2ay. Create the #oin con!itions
&ro, the &oreign key bet2een tab+es Q%*C-.W44 an! (%*7<'. 'he #oin
con!ition shou+! ha$e the &o++o2ing &or,3
S2'<D@T#/*4DT I .2':>E5xx#:'<E4T
S2'<D@T#:*>><D I .2':>E5xx#:*>><D
S2'<D@T#:044<D I .2':>E5xx#:044<D
@CA (AP A7 BC430 20
S2'<D@T#2'D*TE I .2':>E5xx#2'D*TE
11A nc+u!e tab+e (P%* in the $ie2 @as !escribe! abo$eA. 'he #oin con!itions can
be create! &ro, the &oreign key bet2een tab+es (%*7<' an! (P%*. 'he
#oin con!ition shou+! ha$e the &o++o2ing &or,3
S,2'<#/*4DT I S2'<D@T#/*4DT
S,2'<#:*>><D I S2'<D@T#:*>><D
S,2'<#:044<D I S2'<D@T#:044<D
12A >o2 inc+u!e the &o++o2ing &ie+!s in the $ie2 @see the so+ution to .4ercise 1A3
%ro, tab+e Q%*C-.W44 &ie+!s BA>D'D CA--DD C">>DD %*DA'.D
.BPK>0B an! -"*..
%ro, tab+e Q.BP*"J44 &ie+!s Last name an! First name.
%ro, tab+e (%*7<' &ie+! P*A>.'JP..
%ro, tab+e (P%* &ie+!s C'J%-"B an! C'J'".
13A Acti$ate the $ie2.
'o enter yourse+& as an e,p+oyeeD ca++ 4tilities Table contents Create entries
&ro, the ,aintenance screen o& tab+e Q.BP*"J44. Jou can ,aintain the !ata
recor! here. .nter yourse+& in tab+e Q%*C-.W44 &or a &+ight in the sa,e 2ay. Jou
can then search &or the in&or,ation &ro, the ,aintenance screen &or $ie2
Q%*C-.W44 2ith 4tilities Content.
/-3 *ook at progra, (8.WKC-.W as a sa,p+e so+ution.
/-4 Procee! as &o++o2s3
1A n the initia+ screen o& the ABAP DictionaryD ,ark ob#ect type 8ie#D enter the
ob#ect na,e QPA-'>.-44 an! choose Create.
2A A !ia+og bo4 appears in 2hich you shou+! se+ect the $ie2 type. Bark
9aintenance 5ie# an! choose Choose.
3A .nter a short te4t in the ne4t screen.
Jou 2ant to ,aintain the !ata in tab+es (B0(PA-' an! ('-A8.*A7 together in
the ,aintenance $ie2. & you 2ante! to enter a ne2 partner !irect+yD you 2ou+! &irst
ha$e to enter it in tab+e (B0(PA-'. "n+y then cou+! you enter the correspon!ing
!ata in tab+e ('-A8.*A7 @because o& the e4isting &oreign key check bet2een
(B0(PA-' an! ('-A8.*A7A. Jou there&ore &irst ha$e to inc+u!e tab+e
(B0(PA-' in the !e&inition o& the ,aintenance $ie2.
4A .nter tab+e (B0(PA-' in the &ie+! Tables. 'he key &ie+!s o& this tab+e are
auto,atica++y inc+u!e! in the $ie2 as &ie+!s.
5A P+ace the cursor in &ie+! Tables on entry (B0(PA-'. Choose :elationships.
)A A !ia+og bo4 appears +isting a++ e4isting &oreign key re+ationships o& tab+e
(B0(PA-' to other tab+es. Bark the &oreign key re+ationship to tab+e
('-A8.*A7 an! choose Copy.
/A 'he #oin con!itions are create! &ro, the &oreign key. 'he #oin con!itions ha$e
the &o++o2ing &or,3
S+-S,*>T#/*4D*4T I ST>*CE'*D#/*4DT
S+-S,*>T#+-S,*>T4-/ I ST>*CE'*D#*DE4:14-/
@CA (AP A7 BC430 21
1A Jou no2 ha$e to inc+u!e the &ie+!s o& both tab+es in the $ie2. 7o to tab page
8ie# fields. Position the cursor on tab+e (B0(PA-' an! choose Table
fields. A +ist o& a++ the &ie+!s o& the tab+e appears. Choose Select all an! then
press Copy.
5A nc+u!e a++ the &ie+!s o& tab+e ('-A8.*A7 2ith the e4ception o& &ie+!s
BA>D' an! A7.>CJ>0B in the $ie2 in the sa,e 2ay. 'hese &ie+!s are
+inke! to the correspon!ing &ie+!s o& tab+e (B0(PA-' 2ith the #oin
con!itions an! there&ore shou+! not appear in the $ie2.
10A Acti$ate the $ie2.
>o2 generate a ,aintenance inter&ace &or the $ie2.
11A Choose 4tilities Table maintenance "enerator.
12A .nter authori6ation group (0> an! &unction group QQBC43044 in the ne4t
screen.
13A Bark ,aintenance type one)step. (e+ect nu,ber '+'' as ,aintenance screen
nu,ber o& the o$er$ie2 screen.
14A Choose Create. 'he !e$e+op,ent c+ass o& the &unction group an! the generate!
,aintenance ob#ects are pro,pte!. n both cases choose Local ob>ect.
15A Ca++ the e4ten!e! tab+e ,aintenance 2ith the gi$en ,enu path an! enter the
!ata o& a ne2 tra$e+ agency. With the Data Bro2ser @in the ,enu
en$iron,ent o& the initia+ screen o& the ABAP DictionaryAD $eri&y that the
!ata o& the ne2 tra$e+ agency 2as 2ritten in tab+es (B0(PA-' an!
('-A8.*A7.
@CA (AP A7 BC430 22

SAP AG 1999
4np!t help in the 893 Syste
ABAP Dictionary o#'ect search help
Select(on meto# o, a searc el"
)(alo' bea*(or o, a searc el"
4nter,ace o, a searc el"
Attaching search helps to "ields
Collective search helps and eleentary search helps
Append search helps
Search 3elps
@CA (AP A7 BC430 1
.2
SAP AG 1999
Co!rse 1#'ectives
At the end o" this !nit yo! %ill #e a#le to;
De"ine an inp!t help process %ith a search help
De"ine a search help %ith several alternative search
paths
:se the di""erent echaniss "or the search help
attachent to assign a search help to a screen "ield
Deterine %hether a screen "ield has an inp!t help and
deterine its "or
5nhance a collective search help !sing an append search
help %itho!t odi"ications
@CA (AP A7 BC430 2
.3
SAP AG 1999
893 Standard 7!nction; 4np!t 3elp
Carr(er
1l('t n.mber
. . .
&a(ntenance o, ,l('ts
/=
No
.
Depart. city Arrival city
Carr(er
0400 7ran)"!rt Ne% =or)
0402 7ran)"!rt Ne% =or)
03
2402 7ran)"!rt Berlin
... ... ...
74
'he input he+p @%4 he+pA is a stan!ar! &unction o& the -:3 (yste,. t per,its the user to !isp+ay a +ist
o& possib+e $a+ues &or a screen &ie+!. A $a+ue can be !irect+y copie! to an input &ie+! by +ist se+ection.
'he &ie+!s ha$ing an input he+p are sho2n in the -:3 (yste, by the input he+p key to the right o& the
&ie+!. 'his key appears as soon as the cursor is positione! on the correspon!ing screen &ie+!. 'he he+p
can be starte! either by c+icking on this screen e+e,ent or 2ith &unction key %4.
& the nu,ber o& possib+e entries &or a &ie+! is $ery +argeD you can +i,it the set o& !isp+aye! $a+ues by
entering &urther restrictions.
'he !isp+ay o& the possib+e entries is enhance! 2ith &urther use&u+ in&or,ation about the !isp+aye!
$a+ues. 'his &eature is especia++y use&u+ i& the &ie+! re;uires the entry o& a &or,a+ key.
(ince the input he+p is a stan!ar! &unctionD it shou+! +ook an! beha$e the sa,e throughout the entire
-:3 (yste,. 'he !e$e+op,ent en$iron,ent there&ore pro$i!es too+s &or assigning a stan!ar!i6e!
input he+p to a screen &ie+!.
'he precise !escription o& the input he+p &or a &ie+! is usua++y !e&ine! by its se,antics. %or this
reasonD the input he+p &or a &ie+! is nor,a++y !e&ine! in the ABAP Dictionary.
@CA (AP A7 BC430 3
.4
SAP AG 1999
8eG!ireents o" the 4np!t 3elp
Deterine
the val!es
Dialog %ith
the !ser
&a)e conte6t into consideration
8et!rn val!es
A nu,ber o& re;uire,ents ,ust be ,et &or the input he+p o& a screen &ie+! @searc) 7"eldA3
n&or,ation @about the conte4tA kno2n to the syste, ,ust be taken into consi!eration in the input
he+p. 'his inc+u!es entries the user a+rea!y ,a!e in the current input te,p+ate as 2e++ as in&or,ation
obtaine! in pre$ious !ia+og steps. >or,a++y the input he+p uses the conte4t to +i,it the set o& possib+e
$a+ues.
'he input he+p ,ust !eter,ine the $a+ues that can be o&&ere! to the user &or se+ection. 'he !ata to be
!isp+aye! as supp+e,entary in&or,ation in the +ist o& possib+e $a+ues ,ust a+so be !eter,ine!. When
the possib+e $a+ues are !eter,ine!D the restrictions resu+ting &ro, the conte4t an! &ro, &urther search
con!itions speci&ie! by the user ,ust a+so be taken into consi!eration.
'he input he+p ,ust ho+! a !ia+og 2ith the user. 'his !ia+og a+2ays contains the presentation o& the
possib+e $a+ues @2ith supp+e,entary in&or,ationA in +ist &or, an! the possibi+ity to se+ect a $a+ue
&ro, this +ist. A search te,p+ate in 2hich the user can !e&ine con!itions &or the $a+ues to be
!isp+aye! is a+so so,eti,es re;uire! .
& the user se+ects a $a+ueD the input he+p ,ust return it to the search &ie+!. 'he input te,p+ate o&ten
contains ,ore &ie+!s @o&ten on+y !isp+ay &ie+!sA containing &urther e4p+anatory in&or,ation about the
search &ie+!. 'he input he+p shou+! a+so up!ate the contents o& these &ie+!s in this case.
@CA (AP A7 BC430 4
.5
SAP AG 1999
ABAP Dictionary 1#'ect Search 3elp
Search help
Selection
ethod
Dialog #ehavior
4nter"ace
'he ABAP Dictionary ob#ect searc) )elp is use! to !escribe an input he+p. 'he !e&inition o& a
search he+p contains the in&or,ation the syste, nee!s to satis&y the !escribe! re;uire,ents.
'he "nter7ace o& the search he+p contro+s the !ata trans&er &ro, the input te,p+ate to the %4 he+p an!
back. 'he inter&ace !e&ines the conte4t !ata to be use! an! the !ata to be returne! to the input
te,p+ate 2hen a $a+ue is se+ecte!.
'he "nternal be)a6"!r o& the search he+p !escribes the %4 process itse+&. 'his inc+u!es the select"!n
met)!d 2ith 2hich the $a+ues to be !isp+aye! shou+! be !eter,ine! as 2e++ as the d"al!% be)a6"!r
!escribing the interaction 2ith the user.
As 2ith a &unction ,o!u+eD search he+ps !istinguish bet2een the inter&ace 2ith 2hich it e4changes
!ata 2ith other so&t2are co,ponents an! the interna+ beha$ior @&or &unction ,o!u+esD the +atter is
!e&ine! by the source te4tA.
t on+y ,akes sense to !e&ine a search he+p i& there is a ,echanis, a$ai+ab+e 2ith 2hich the search
he+p can be accesse! &ro, a screen. 'his ,echanis, is ca++e! the searc) )elp attac)ment an! 2i++
be !escribe! +ater.
*ike the e!itor &or &unction ,o!u+esD the e!itor &or search he+ps a+so enab+es you to test an ob#ect.
Jou can thus test the beha$ior o& a search he+p 2ithout assigning it to a screen &ie+!.
@CA (AP A7 BC430 5
.6
SAP AG 1999
SP704
S E L E C T * F R O M S P F L I
W H E R E C A R R I D = ' L H ' .
Selection *ethod o" a Search 3elp
Carr(er
1l('t n.mber
. . .
&a(ntenance o, ,l('ts
/=
74
'he possib+e $a+ues !isp+aye! &or a &ie+! by the input he+p are !eter,ine! at runti,e by a se+ection
&ro, the !atabase. When a search he+p is !e&ine!D you ,ust !e&ine the !atabase ob#ect &ro, 2hich
the !ata shou+! be se+ecte! by speci&ying a tab+e or a $ie2 as the select"!n met)!d.
t ,akes sense to use a $ie2 as se+ection ,etho! i& the !ata about the possib+e $a+ues that is re+e$ant
&or the input he+p is !istribute! on se$era+ tab+es. & this !ata is a++ in one tab+e or in the
correspon!ing te4t tab+eD you can use the tab+e as a se+ection ,etho!. 'he syste, auto,atica++y
ensures that the te4t o& the te4t tab+e is use! in the userRs +ogon +anguage.
& there is not yet a $ie2 that co,bines the !ata that is re+e$ant &or an input he+pD you ,ust &irst
create it in the ABAP Dictionary.
Baintenance $ie2s ,ay not be use! as the se+ection ,etho! &or search he+ps. >or,a++y a !atabase
$ie2 is use!. <o2e$erD you shou+! note that !atabase $ie2s @in the -:3 (yste,A are a+2ays create!
2ith an inner #oin. As a resu+tD on+y those $a+ues ha$ing an entry in each o& the tab+es in$o+$e! are
o&&ere! in the input he+p. (o,eti,es the $a+ues shou+! be !eter,ine! 2ith an outer #oin. n this case
you shou+! choose a he+p $ie2 as the se+ection ,etho!. Jou can &in! ,ore in&or,ation about he+p
$ie2s in the appen!i4.
& the se+ection ,etho! o& a search he+p is c+ient-!epen!entD the possib+e $a+ues are on+y se+ecte! in
the userRs +ogon c+ient.
@CA (AP A7 BC430 )
.7
SAP AG 1999
Carr(er
Connect(on n.mber
)e"art.re c(ty
Arr(*al c(ty
/(m(t #(s"lay to %00
0O
/=
?o l(m(t
Description o" the Dialog Behavior
No
.
Depart. city Arrival city
Carr(er
0400 7ran)"!rt Ne% =or)
0402 7ran)"!rt Ne% =or)
03
2402 7ran)"!rt Berlin
... ... ...
74
B
LMN
'he possib+e $a+ues are presente! in the d"al!% b!x 7!r d"splay"n% t)e )"t l"st an! the user can se+ect
$a+ues &ro, here. & the possib+e $a+ues are &or,a+ keysD &urther in&or,ation shou+! a+so be
!isp+aye!.
& the hit +ist is $ery +argeD the user shou+! be ab+e to !e&ine &urther restrictions &or the attributes o&
the entry. -estricting the set o& !ata in this 2ay both increases the c+arity o& the +ist an! re!uces the
syste, +oa!. A!!itiona+ con!itions can be entere! in a &urther !ia+og 2in!o2D the d"al!% b!x 7!r
restr"ct"n% 6alues.
'he !ia+og type o& a search he+p !e&ines 2hether the !ia+og bo4 &or restricting $a+ues shou+! be
!isp+aye! be&ore !eter,ining the hit +ist.
Jou ,ust !e&ine the characteristics to appear on either @or bothA o& the !ia+og bo4es as parameters
in the search he+p. Jou can use a++ the &ie+!s o& the se+ection ,etho! @2ith the e4ception o& the c+ient
&ie+!A an! the non-key &ie+!s o& your te4t tab+e as para,eters.
Jou !e&ine 2hich para,eter shou+! appear in 2hich !ia+og bo4 @in 2hat or!erA by assigning the
para,eters positions in the t2o !ia+og bo4es. Jou can thus use !i&&erent para,eters @or !i&&erent
or!ersA in the t2o !ia+og bo4es.
'ypes ,ust be !e&ine! &or search he+p para,eters 2ith !ata e+e,ents. 'hese !e&ine the !isp+ay in the
t2o !ia+og bo4es. & nothing e+se is !e&ine!D a para,eter uses the !ata e+e,ent o& the correspon!ing
&ie+! o& the se+ection ,etho!.
@CA (AP A7 BC430 /
.
SAP AG 1999
4nter"ace o" a Search 3elp
No
.
Depart. city Arrival city
Carr(er
0400 7ran)"!rt Ne% =or)
0402 7ran)"!rt Ne% =or)
03
Carr(er
1l('t n.mber
. . .
0O
/=
Import
and export
Export
74
74
When you !e&ine a para,eter o& a search he+pD you ,ust a+so !e&ine 2hether it shou+! be use! to
copy !ata to the input he+p @BP"-' para,eterA or 2hether to return !ata &ro, the input he+p
@.GP"-' para,eterA.
'he BP"-' an! .GP"-' para,eters o& a search he+p together ,ake up your inter&ace. @'his is
a+so ana+ogous to &unction ,o!u+es.A
Jou can a+so !e&ine inter&ace para,eters that !o not appear in either the !ia+og bo4 &or !isp+aying
the hit +ist or the !ia+og bo4 &or restricting $a+ues. 'his is use&u+ &or e4a,p+e 2hen screen &ie+!s that
!o not appear on either o& the t2o !ia+og bo4es are to be up!ate! 2hen you se+ect a $a+ue.
'he +ocation &ro, 2hich the BP"-' para,eters o& a search he+p get their $a+ues an! the screen
&ie+!s in 2hich the contents o& the .GP"-' para,eters o& the search he+p are returne! are !e&ine! in
the search he+p attach,ent.
'he search &ie+! is a specia+ case. ts contents are on+y use! in the input he+p i& it is a search string
@that isD i& it contains a ZWZ or a Z[ZA an! the para,eter +inke! 2ith the search &ie+! is an BP"-'
para,eter.
Para,eters that on+y contain a!!itiona+ in&or,ation about the search &ie+! shou+! not be !e&ine! as
BP"-' para,eters since the user ,ust other2ise e,pty the correspon!ing screen &ie+!s each ti,e
be&ore he can !e&ine a ne2 $a+ue 2ith the input he+p.
@CA (AP A7 BC430 1
.$
SAP AG 1999
3o% do yo! :se Search 3elpsH

Searc ,(el#
1(el# 1
Input template
1(el# 3
&a#le9str!ct!re
1(el# 1 1(el# 3
Search "ield
...
)e,(n(t(ons (n te
Screen Pa(nter
/(nk
(n ))4C
4nternal #ehavior
4nter"ace
74
Search help
A search he+p !escribes the &+o2 o& an input he+p. 'he search he+p can on+y take e&&ect using
a ,echanis, that assigns the search he+p to this &ie+!. 'his ,echanis, is ca++e! the searc)
)elp attac)ment to the &ie+!.
Attaching a search he+p to a &ie+! has an e&&ect on the &ie+!Rs beha$ior. t is there&ore
consi!ere! to be part o& the &ie+! !e&inition.
'he se,antic an! technica+ attributes o& a screen &ie+! @typeD +engthD %1 he+pD ...A are not
nor,a++y !e&ine! !irect+y 2hen the input te,p+ate is !e&ine!. "n the contraryD on+y a
re&erence to an ABAP Dictionary &ie+! @usua++y 2ith the sa,e na,eA is speci&ie! in the
(creen Painter. 'he screen &ie+! takes on the attributes o& this &ie+! &ro, the ABAP
Dictionary.
'he sa,e princip+e is a+so use! to !e&ine the input he+p o& a screen &ie+!. 'he search he+p is
thus attache! to the ABAP Dictionary search &ie+! an! not to the screen &ie+!.
n the search he+p attach,entD the inter&ace para,eters o& the search he+p an! the screen
&ie+!s pro$i!ing !ata &or the input he+p or getting !ata &ro, the input he+p are assigne! to
one another. 'he search &ie+! ,ust be assigne! to an .GP"-' para,eter o& the search he+p
at this ti,e. 'his para,eter shou+! a+so be an BP"-' para,eter so that the user can take
a!$antage o& search patterns that are a+rea!y entere!.
%ie+!s that !o not ha$e a search he+p attach,ent can a+so ha$e an input he+p since &urther
,echanis,s @e.g. !o,ain &i4e! $a+uesA are a+so use! &or the %4 he+p.
@CA (AP A7 BC430 5
.10
SAP AG 1999
Search 3elp Attachent in the ABAP Dictionary
&a#le9str!ct!re
&A?)$ 1(el# 1 1(el# 3 Search "ield
...
Search help
Chec) ta#le
&A?)$ Ney1 Ney 2
)ata "art
4nternal #ehavior
4nter"ace
Data eleent
'here are three ,echanis,s &or attaching a search he+p to a &ie+! o& the ABAP Dictionary.
A search he+p can be attache! !irect+y to a &ie+! o& a structure or tab+e. 'he !e&inition o& this
attach,ent is ana+ogous to that o& a &oreign key. Jou ha$e to !e&ine an assign,ent @bet2een the
inter&ace para,eters o& the search he+p an! the &ie+!s o& the structureA &or 2hich the syste, ,akes a
proposa+.
& a &ie+! has a check tab+eD its contents are auto,atica++y o&&ere! as possib+e $a+ues in the input he+p.
'he key &ie+!s o& the check tab+e are !isp+aye!. & a check tab+e has a te4t tab+eD its &irst character-+ike
non-key &ie+! is !isp+aye!.
& you are not satis&ie! 2ith the !escribe! stan!ar! !isp+ay o& the !ata o& the check tab+eD you can
attach a search he+p to the check tab+e. 'his search he+p is use! &or a++ the &ie+!s that ha$e this tab+e
as check tab+e. Jou ha$e to !e&ine an assign,ent bet2een the inter&ace o& the search he+p an! the
key o& the check tab+e 2hen you !e&ine the attach,ent.
'he se,antics o& a &ie+! an! its possib+e $a+ues are !e&ine! by its !ata e+e,ent. Jou can there&ore
attach a search he+p to a !ata e+e,ent. 'he search he+p is then a$ai+ab+e &or a++ the &ie+!s that re&er to
this !ata e+e,ent. n the attach,ent you ,ust !e&ine an .GP"-' para,eter o& the search he+p &or
the !ata trans&er.
Attaching a search he+p to a check tab+e @or a !ata e+e,entA can resu+t in a high !egree o& reusabi+ity.
<o2e$erD there are restrictions on passing &urther $a+ues $ia the inter&ace o& the search he+p.
@CA (AP A7 BC430 10
.11
SAP AG 1999
1vervie%; *echaniss "or the 4np!t 3elp
#oes not e2(st
e2(sts
PROCESS ON
VALUE-REQUEST
4n".t el" ,rom screen
Ceck o, te
,lo> lo'(c
FIELD ; SELECT
FIELD ; <ALUES
Searc el" ,or
screen ,(el#
Searc el" ,or ,(el#
Searc el" ,or
#ata element
Searc el"
,or ceck table
1(2e# *al.es
$(me or
calen#ar el"
Ceck table >(t
te2t table
Ney *al.es o,
ceck table
Ceck table el"
re#(recte#
n or!er to be ab+e to o&&er a ,eaning&u+ input he+p &or as ,any screen &ie+!s as possib+eD the -:3
(yste, uses a nu,ber o& ,echanis,s. & there is ,ore than one such ,echanis, a$ai+ab+e &or a
&ie+!D the one that is &urthest +e&t or at the top o& the abo$e hierarchy is use!.
n a!!ition to the options !escribe! abo$e &or !e&ining the input he+p o& a &ie+! in the ABAP
DictionaryD you can a+so !e&ine it in the screen &ie+!. 'he !isa!$antageD ho2e$erD is that there is no
auto,atic reuse.
With the screen e$ent P"8 you can progra, the input he+p o& a &ie+! by yourse+&. Jou can a!#ust the
!esign o& the he+p to the stan!ar! he+p using the &unction ,o!u+es
%4%K%.*DK8A*0.K-.E0.(' or %4%K>'K'AB*.K8A*0.K-.E0.('.
<o2e$erD you shou+! check to see i& the part o& the input he+p that you progra,,e! yourse+& shou+!
be i,p+e,ente! as a search he+p e4it instea! @see appen!i4A.
Jou can a+so attach a search he+p to a screen &ie+! in the (creen Painter. 'here are so,e &unctiona+
restrictions on this kin! o& attach,ent as co,pare! 2ith attach,ent in the Dictionary.
Jou shou+! no +onger use the input checks !e&ine! !irect+y in the &+o2 +ogic o& the screenD &ro,
2hich it is a+so possib+e to !eri$e input he+ps.
'he &unction Technical info is o&&ere! in the hit +ist in the ,enu o& the right ,ouse key. t can be
use! to &in! out 2hich o& the speci&ie! ,echanis,s is being use!.
@CA (AP A7 BC430 11
.12
SAP AG 1999
Per"orance o" the 4np!t 3elp
Carr(er
1l('t n.mber
. . .
&a(ntenance o, ,l('ts
/=
74
Jou so,eti,es ha$e to search a +arge a,ount o& !ata 2ith an input he+p. 'his ,eans that you ,ight
ha$e to 2ait a +ong ti,e &or the possib+e entries to be !isp+aye!D an! can a+so resu+t in a signi&icant
increase in the +oa! on the syste,.
When you !e&ine a search he+pD you shou+! there&ore check 2hether you shou+! take ,easures to
opti,i6e the accessing beha$ior &or the se+ection ,etho!. 'his is especia++y true i& the se+ection uses
a $ie2 an! thus ,ore than one physica+ tab+e.
& the nu,ber o& entries in the se+ection ,etho! is $ery +argeD you shou+! restrict the hit +ist 2ith
&urther con!itions. 'his a+so increases the c+arity o& the hit +ist. 'he a!!itiona+ con!itions can !irect+y
resu+t &ro, the conte4tD or can be entere! in the !ia+og bo4 &or restricting $a+ues by the user. 'he
per&or,ance o& the input he+p can &re;uent+y be signi&icant+y i,pro$e! by creating an in!e4 on the
&ie+!s use! to &or,u+ate the restrictions.
& the nu,ber o& entries in the se+ection ,etho! is re+ati$e+y s,a++D you shou+! a+2ays check 2hether
the se+ection ,etho! can be bu&&ere!.
@CA (AP A7 BC430 12
.13
SAP AG 1999
Alternative Search Paths
(hat %as the
#oo)ing n!#er
"or y "light
to Ne% =or)H
(hat #oo)ings %ere
ade in o!r travel
agencyH
n the re+ationa+ !ata ,o!e+D entities are usua++y represente! by &or,a+ keys. n rea+ +i&eD ho2e$erD
these entities are o&ten i!enti&ie! by one or ,ore o& their attributes. %or e4a,p+eD the key &or a person
is the personne+ nu,ber. A person 2i++ genera++y !escribe another 2ith his na,e an! possib+y his
a!!ress.
'he attributes use! to i!enti&y an entity can !i&&er &ro, one user to the ne4t an! &ro, situation to
situation. A user 2ants to use these attributes in an input he+p to !e&ine a $a+ue &or a &ie+! that
re;uires that a &or,a+ key be entere!.
We there&ore nee! searc) pat)s per,itting access to the !ata using non-key &ie+!s. (e$era+ !i&&erent
search paths shou+! be possib+e &or one &ie+!.
A search path &or a &ie+! can be i,p+e,ente! 2ith a search he+p ha$ing the &or, !escribe! abo$e. 'o
!escribe an input he+p 2ith ,ore than one a+ternati$e search pathD a set o& search he+ps can be
co,bine! into a ne2 ob#ect in the -:3 (yste,. (ince this ob#ect is the !escription o& the input he+p
&or a &ie+!D it is a+so ca++e! a search he+p.
n contrast to the elementary searc) )elps !escribe! abo$eD the search he+ps that co,bine se$era+
search paths are ca++e! c!llect"6e searc) )elps.
Co++ecti$e search he+ps are so,eti,es use! to ,ap the !istribution o& the possib+e entries &or a &ie+!
into se$era+ @!is#unctA !atasets.
@CA (AP A7 BC430 13
.14
SAP AG 1999
Collective Search 3elps and 5leentary Search
3elps
4ncl!ded search helps
Collective search help
4nternal #ehavior
4nter"ace
4nter"ace 4nter"ace
4nternal #ehavior
*ike an e+e,entary search he+pD a co++ecti$e search he+p has an inter&ace o& BP"-' an! .GP"-'
para,eters 2ith 2hich it e4changes !ata. 0sing this inter&aceD the co++ecti$e search he+p can be
attache! to &ie+!sD tab+es an! !ata e+e,ents e4act+y +ike an e+e,entary search he+p.
"n+y one search he+p can be attache! to a &ie+!D tab+e or !ata e+e,ent. (e$era+ search paths are
there&ore attache! 2ith a co++ecti$e search he+p.
Jou can o,it the co,ponents &or !escribing the !ia+og beha$ior an! !ata se+ection 2hen you !e&ine
a co++ecti$e search he+p. 'he inc+u!e! search he+ps are +iste! here. Jou ,ust assign the para,eters o&
the co++ecti$e search he+p to the inter&ace para,eters o& the inc+u!e! search he+p &or each inc+usion.
A search he+p can a+so be inc+u!e! in se$era+ co++ecti$e search he+ps an! at the sa,e ti,e itse+& be
attache! to &ie+!sD tab+es an! !ata e+e,ents. A co++ecti$e search he+p can a+so be inc+u!e! in another
co++ecti$e search he+p.
When you use a co++ecti$e search he+pD you are o&&ere! the e+e,entary search he+ps containe! in the
co++ecti$e search he+p as para++e+ tab pages. & you repeate!+y use a co++ecti$e search he+pD the tab
page that 2as +ast use! is auto,atica++y acti$e. 'his is because ,ost users a+2ays use the sa,e
search path.
@CA (AP A7 BC430 14
.15
SAP AG 1999
Append Search 3elps
4ncl!ded search helps
. . .
Cc!stoerD append
search help
4ncl!ded search helps
. . .
(SAP) collective search help
appends
'he set o& search paths that are ,eaning&u+ &or an ob#ect great+y !epen!s on the particu+ar
circu,stances o& the (AP custo,er. 'he custo,er o&ten 2ou+! +ike to enhance the stan!ar! (AP
co++ecti$e search he+ps 2ith his o2n e+e,entary search he+ps. -e+ease 4.) pro$i!es an appen!
techni;ue that per,its the enhance,ent o& co++ecti$e search he+ps 2ithout ,o!i&ications.
An append searc) )elp is a co++ecti$e search he+p that is assigne! to another co++ecti$e search he+p
@its appen!ing ob#ectA an! that enhances it 2ith the search he+ps it inc+u!es. 'he appen! search he+p
uses the inter&ace o& its appen!ing ob#ects.
'he appen! search he+p +ies in the custo,er na,espace. >or,a++y the search he+ps inc+u!e! in the
appen! search he+p are a+so create! by the custo,er an! +ie in the custo,erRs na,espace. <o2e$erD
the re;uire! e+e,entary search he+p ,ight a+rea!y be pro$i!e! by (APD in 2hich case the custo,er
on+y has to a!! it to his o2n appen! search he+p.
Appen! search he+ps are use! 2ith (AP to i,pro$e co,ponent separation. (o,e (AP co++ecti$e
search he+ps there&ore a+rea!y ha$e one or ,ore appen! search he+ps in the stan!ar! search he+p.
Custo,er enhance,ents shou+! a+2ays be ,a!e by creating a separate appen! search he+p.
(AP co++ecti$e search he+ps o&ten contain e+e,entary search he+ps that are not re;uire! by a++
custo,ers. 'he search he+ps you !o not nee! can be hi!!en using an appen! search he+p. 'o !o thisD
the correspon!ing search he+p ,ust be inc+u!e! in the appen! search he+p an! the hidden &+ag ,ust
be set.
@CA (AP A7 BC430 15
.16
SAP AG 1999
&he inp!t help C74 helpD is a standard "!nction o"
the 893 Syste
Search helps perit an easy and "le6i#le
description o" inp!t helps
&a#les and vie%s can #e !sed as the selection
ethod o" a search help
&he appearance o" the inp!t help is controlled #y
the paraeters o" the search help
Search helps can #e attached to "ields$ ta#les and
data eleents
4np!t helps %ith alternative search paths are
ipleented %ith collective search helps
(ith append search helps$ search helps "or
standard collective search helps can #e added or
hidden %itho!t odi"ications
:nit S!ary
@CA (AP A7 BC430 1)
.17Exerc"ses: Searc) @elps
-n"t: Searc) @elps
At the conc+usion o& these e4ercises you 2i++ be ab+e to3
,p+e,ent input he+ps 2ith e+e,entary search he+ps
App+y the !i&&erent &eatures o& search he+p attach,ents in the ABAP
Dictionary
De&ine input he+ps 2ith ,ore than one search path using co++ecti$e
search he+ps
A!! or re,o$e search paths &or co++ecti$e search he+ps 2ithout
,o!i&ications
Bany ,anage,ent tasks re;uire that you search &or e,p+oyee !ata. (uitab+e search
options are nee!e! to !o this. (uch search options 2i++ be i,p+e,ente! in this e4ercise.
1.1 7o to the !isp+ay screen &or tab+e QD.PB.>'44 an! ca++ 4tilities Table
contents ACreate entries. An input te,p+ate appears in 2hich you can create ne2
entries &or tab+e QD.PB.>'44 @i.e. ne2 !epart,entsA. 'he hea! o& the ne2
!epart,ent shou+! a+so be !e&ine! here. Bake this entry in &ie+! Department head.
Baintenance o& this &ie+! shou+! be supporte! 2ith an input he+p that !isp+ays the
@personne+ nu,ber o& theA e,p+oyee.
8eri&y that the &ie+! a+rea!y has an input he+p. %in! out 2hich input he+p
,echanis, is use! here.
'he ob#ecti$e is to ,ake the input he+p &or check tab+e Q.BP*"J44 ,ore user-
&rien!+y. Check your success by ca++ing the input he+p again.
'o !o thisD create an e+e,entary search he+p Q.BP*"J44.
'he &o++o2ing attributes shou+! appear in the speci&ie! or!er in the hit +ist3
Carrier
%irst na,e
*ast na,e
Personne+ nu,ber
Depart,ent co!e
@CA (AP A7 BC430 1/
Because o& the +arge nu,ber o& e,p+oyeesD you shou+! restrict the !isp+aye! $a+ues
by speci&ying the &irst an!:or +ast na,es o& the person 2ante! be&ore !isp+aying the
hit +ist.
9eep in ,in! that the +ast na,e is use! ,ore &re;uent+y as a restriction than the
&irst na,e.
& a carrier 2as a+rea!y speci&ie! be&ore the input he+p 2as ca++e!D on+y its
e,p+oyees are o&&ere!. "ther2ise an input &ie+! on the input te,p+ate &or the carrier
2i++ be &i++e! 2hen the e,p+oyee is se+ecte!.
Bake sure that the search he+p !e&ine! &or the check tab+e he+p o& tab+e
Q.BP*"J44 is use! an! check your success as !escribe! abo$e.
1.2 8eri&y that the input he+p &or &ie+! Q%*C-.W44-.BPK>0B is !e&ine! 2ith
the search he+p you #ust create! by ca++ing Create entries &or tab+e Q%*C-.W44.
0n!erstan! the un!er+ying ,echanis,.
'he input he+p &or &ie+! Q%*C-.W44-.BPK>0B sho2s a++ e,p+oyees. <o2e$erD
you on+y 2ant to +ook at &+ight personne+ &or the gi$en &ie+!. 'he ob#ecti$e is to
correct this.
Jou shou+! there&ore create a search he+p Q.BP*"JK%*J44 that on+y !isp+ays
&+ight personne+. 'he !isp+ay attributes o& the search he+p shou+! be i!entica+ to
those o& search he+p Q.BP*"J44. <o2e$erD since the group o& &+ight personne+ is
not too +argeD the hit +ist can be !isp+aye! i,,e!iate+y in this case. 'he user shou+!
be ab+e to +i,it the e,p+oyees 2ith their &irst an! +ast na,es &ro, this +ist.
0sing a suitab+e search he+p attach,entD ,ake sure that the search he+p is use! &or the gi$en &ie+!
an! check your success as !escribe!.
Consi!er 2hether you can use 2ork &ro, pre$ious e4ercises here. s it necessary
or sensib+e to create your o2n $ie2 &or this e4ercise=
1-3 Supplementary Exerc"se: With Create entries$ $eri&y that the &ie+!s containing the
personne+ nu,ber o& the +ast person to ,ake the change in tab+es Q.BP*"J44 an!
QD.PB.>'44 !o not ha$e their o2n input he+p.
'he ob#ecti$e here is to !e&ine a suitab+e input he+p &or these t2o &ie+!s. 'he t2o
search he+ps !e&ine! so &ar cannot be use! because tab+e changes can on+y be ,a!e
by a!,inistrati$e e,p+oyees. 'he input he+p to be !e&ine! shou+! there&ore !isp+ay
on+y these.
De&ine search he+p Q.BP*"JKADB44 that !isp+ays the a!,inistrati$e e,p+oyees
o& the air+ines. 'he search he+p shou+! ha$e the sa,e !isp+ay attributes as
Q.BP*"JK%*J44. <o2e$erD it is not easy to esti,ate the nu,ber o&
a!,inistrati$e e,p+oyees. Bake sure that the search he+p !irect+y !isp+ays the
$a+ues &oun! i& there are no ,ore than 100. "ther2ise you shou+! &irst o&&er a
search te,p+ate in 2hich you can !e&ine the e,p+oyeeRs air+ine as 2e++ as the &irst
an! +ast na,es.
Attach the search he+p to the !ata e+e,ent. 8eri&y that the search he+p is no2 use!
both in Q.BP*"J44 an! in QD.PB.>'44 &or the input he+p o& &ie+!
Lastchan"edby.
@CA (AP A7 BC430 11
Check 2hether the re;uire,ents &or &ie+! Carrier speci&ie! in .4ercise 1 are
satis&ie!. <o2 !o you e4p+ain this e&&ect= Can you get better resu+ts by using a
!i&&erent type o& attach,ent=
1-4 Jou ,ight 2ant to o&&er &urther search paths &or &in!ing e,p+oyees. 'o !o thisD take the
&o++o2ing steps3
Copy search he+p Q.BP*"J44 to search he+p Q.BP*"JK(BP*.44.
Con$ert search he+p Q.BP*"J44 to a co++ecti$e search he+p.
nc+u!e search he+p Q.BP*"JK(BP*.44 in search he+p Q.BP*"J44.
Check i& the input he+p o& &ie+! QD.PB.>'44-(uper$isor change! !ue to these
operations.
1-5 Jou rea++y ha$e to enhance the input he+p &or the e,p+oyees 2ith another search path3
'his search path shou+! gi$e you an o$er$ie2 o& a++ the e,p+oyees in$o+$e! in a
&+ight.
'o !o thisD create another e+e,entary search he+p Q.BP*"JK%*7<'44.
When you use this search he+pD the user can +i,it the search to the &+ight personne+
&or certain &+ights be&ore !isp+aying the possib+e $a+ues. 'he &+ight shou+! be
i!enti&ie! by its cities o& arri$a+ an! !eparture an! by its &+ight !ate.
'he carrier shou+! be !e&ine! as in .4ercise 1.
'he &o++o2ing in&or,ation shou+! appear in the hit +ist &or the search he+p3
Carrier
%irst na,e
*ast na,e
Personne+ nu,ber
%+ight
Date o& &+ight
Bake sure that the search he+p you create! is a$ai+ab+e as an a+ternati$e search path &or &in!ing
e,p+oyees an! $eri&y your resu+ts.
0se your so+utions &ro, pre$ious units.
1-) Jour syste, has specia+ re;uire,ents 2hen searching &or e,p+oyees3
1.).1.1 An a!!itiona+ search path that on+y o&&ers &+ight personne+ shou+! be o&&ere!.
1.).1.2 'he search path 2ith 2hich e,p+oyees can be &oun! by their &+ights is not
re;uire!.
Change the input he+p &or &ie+! QD.PB.>'44-Depart,ent hea! accor!ing+y
2ithout ,o!i&ying search he+p Q.BP*"J44 @or a tab+e that is in$o+$e!A.
1-/ Supplementary Exerc"se: Ca++ the &unction Create entries &or tab+e Q.BP*"J44.
8eri&y that the check tab+e he+p &or tab+e QD.PB.>'44 is use! &or &ie+!
Department code. %in! out 2here the !isp+aye! te4t &ie+! co,es &ro,. Check the
beha$ior o& the input he+p &or &ie+! Carrier on the input te,p+ate.
@CA (AP A7 BC430 15
>o2 enhance the check tab+e he+p #ust teste! so that the te+ephone nu,ber o& the
!epart,ent appears in the hit +ist in a!!ition to the in&or,ation a+rea!y !isp+aye!.
'ake the necessary steps an! check your success as usua+.
1-1 Supplementary Exerc"se: 'his e4ercise !e,onstrates the use o& he+p $ie2s @see
appen!i4A.
.nhance the search he+p !e&ine! in .4ercise / so that the +ast na,e o& the hea! o&
the !epart,ent a+so appears in the hit +ist. Bake sure that those !epart,ents that
ha$e no !escription in the userRs +ogon +anguage or &or 2hich the Department head
&ie+! is e,pty are a+so !isp+aye!.
Bake sure that the co+u,n hea!er 2ith the +ast na,es o& the !epart,ent hea!s is
ca++e! RDepart,ent hea!R an! not R*ast na,eR in the hit +ist. 0se !ata e+e,ent
(K<.AD.
Check your success in the usua+ ,anner.
@CA (AP A7 BC430 20
.1S!lut"!ns: Searc) @elps
-n"t: Searc) @elps
1-1 (tarting 2ith the ,aintenance transaction &or tab+e QD.PB.>'44D ca++ the %4 he+p as
!escribe!. Choose Techn! info @2ith the right ,ouse buttonA in the hit +ist. n
Search help you can &in! out that the input he+p is the check tab+e he+p &or tab+e
Q.BP*"J44 an! that it is a pure check tab+e he+p @2ithout a search he+p an!
2ithout a te4t tab+eA.
'o create search he+p Q.BP*"J443
1A Choose Search help in the initia+ screen o& the ABAP Dictionary an! enter
Q.BP*"J44 in the correspon!ing &ie+!.
2A Choose Create. n the ne4t !ia+og bo4D con&ir, that you 2ant to create an
e+e,entary search he+p.
3A .nter a short te4t &or your search he+p.
4A 'he search he+p shou+! support the search &or e,p+oyees. 'hese are ,anage! in
tab+e Q.BP*"J44. Jou there&ore ha$e to se+ect this tab+e @or a $ie2 on
this tab+eA as se+ection ,etho!. 'he tab+e is su&&icient &or this e4ercise. .nter
it in &ie+! Selection method.
5A 'o obtain the re;uire! beha$iorD choose !ia+og type Comple dialo" #ith 5alue
restriction.
)A Choose the search he+p para,eters using the %4 he+p. Jou shou+! retain the hit
+ist 2ith the possib+e search he+p para,eters by se+ecting Hold listD since
you !onRt ha$e to ca++ the he+p again in this case. (e+ect &ie+!s CarrierD First
nameD Last nameD Personnel number an! Department code as para,eters.
/A Bark a++ para,eters as .GP"-' para,eters @co+u,n 2;PA. Bark the attribute
to be searche! &or @i.e. Personnel numberA an! the hierarchica++y higher
Carrier as BP"-' para,eters @Co+u,n -9PA. 'his ensures that a
correspon!ing entry in the input te,p+ate is taken into consi!eration @as
!escribe! in the e4erciseA.
1A Jou can !e&ine the hit +ist by assigning the correspon!ing position nu,bers
@e.g. 1D 2D 3D 4D 5A in co+u,n LPos.
5A Jou can !e&ine the !ia+og bo4 &or restricting $a+ues by assigning position
nu,bers in co+u,n SPos. Jou shou+! there&ore enter positi$e nu,bers in
these co+u,ns &or para,eters First name an! Last nameD 2here the $a+ue o&
Last name shou+! be s,a++er than that o& First name.
10A Acti$ate your search he+p. 'he search he+p is not yet e&&ecti$e &or &ie+!
QD.PB.>'44-Depart,ent hea!. <o2e$erD you can try out the search he+p
i,,e!iate+y 2ith the Test &unction.
@CA (AP A7 BC430 21
'he search he+p you #ust create! can on+y i,pro$e the check tab+e he+p o& tab+e
Q.BP*"J44 @an! thus the input he+p o& &ie+! QD.PB.>'44-Depart,ent hea!A i&
it 2as attache! to tab+e Q.BP*"J44. Jou can !o this as &o++o2s3
1A 7o to change ,o!e in the ,aintenance screen &or this tab+e. Choose Goto
Search help For table. n the ne4t !ia+og bo4D enter the na,e o& search
he+p Q.BP*"J44. Choose Continue.
2A 'he proposa+ create! by the syste, &or assigning the search he+p para,eters to
the key &ie+!s o& the tab+e is probab+y correct. Check this an! copy the
!e&inition.
Acti$ate tab+e Q.BP*"J44.
3A Ca++ the Create entries &unction &or tab+e QD.PB.>'44 again. 'he input he+p
o& &ie+! Department head shou+! no2 beha$e as !esire!. & you ca++ Techn!
info againD you can con&ir, that the search he+p you #ust !e&ine! is in e&&ect.
1-2 Ca++ the input he+p as !escribe!. With Techn! info you can $eri&y that search he+p
Q.BP*"J44 is rea++y in e&&ect an! that this is because tab+e Q.BP*"J44 is a+so
check tab+e o& &ie+! Q%*C-.W44-.BPK>0B.
'he search he+p to be create! &or the &+ight personne+ shou+! be $ery si,i+ar to the
search he+p &or a++ e,p+oyees. t 2ou+! there&ore ,ake sense to copy search he+p
Q.BP*"J44 to search he+p Q.BP*"JK%*J44 an! then ,o!i&y it. A+ternati$e+y.
search he+p Q.BP*"JK%*J44 can be create! ana+ogous+y to the ,etho!
!escribe! abo$eD a+so ,aking the &o++o2ing changes3
'he short te4t &or search he+p Q.BP*"JK%*J44 shou+! be a!#uste! to suit its ,eaning.
Change the !ia+og type to -mmediate 5alue display BDropdo#n,.
'he t2o changesD ho2e$erD !o not so+$e the ,ain prob+e, in this e4erciseD na,e+y
that the search he+p shou+! !isp+ay on+y &+ight personne+. Jou can !o this by
se+ecting a $ie2 that on+y contains &+ight personne+ as se+ection ,etho!.
Jou a+rea!y !e&ine! such a $ie2 in .4ercise /-1. .ntering this $ie2 as se+ection
,etho! an! acti$ating the search he+p 2i++ so+$e the prob+e,. <o2e$erD this
assu,es that you na,e! the $ie2 &ie+!s the sa,e as the un!er+ying &ie+!s o& tab+e
Q.BP*"J44. "ther2ise you ha$e to a!#ust the na,es o& the search he+p
para,eters to the na,es o& the $ie2 &ie+!s.
'he so+ution #ust !escribe!D ho2e$erD has one !isa!$antage. 8ie2 Q.BP%*J44 is
!e&ine! 2ith a #oin on tab+es Q.BP*"J44 an! QD.PB.>'44. <o2e$erD on+y
in&or,ation &ro, tab+e Q.BP*"J44 is nee!e! &or the search he+p. An
unnecessari+y co,p+e4 !atabase ;uery is there&ore create! 2hen you use search
he+p Q.BP*"JK%*J44. 'his can ha$e a negati$e e&&ect on the per&or,ance o& the
input he+p.
Jou shou+! there&ore create a ne2 $ie2 ha$ing on+y base tab+e Q.BP*"J44. 'his
$ie2 can be obtaine! &or e4a,p+e by copying it &ro, $ie2 Q.BP%*J44. Jou then
ha$e to re,o$e base tab+e QD.PB.>'44 &ro, this copy. ?oin con!itions an! $ie2
&ie+!s re&erring to this tab+e are a+so !e+ete!.
'his $ie2 shou+! no2 be entere! as se+ection ,etho! &or search he+p
Q.BP*"JK%*J44.
'he search he+p on+y beco,es e&&ecti$e &or &ie+! Q%*C-.W44-.BPK>0B 2hen
it has been attache!. 7o to change ,o!e in the ,aintenance screen &or tab+e
Q%*C-.W44. Position the cursor on &ie+! .BPK>0B. Choose Goto Search
@CA (AP A7 BC430 22
help For field.
n the ne4t !ia+og bo4D enter the na,e o& search he+p Q.BP*"JK%*J44. Choose
Continue.
'he proposa+ create! by the syste, &or assigning the search he+p para,eters to the
&ie+!s o& the tab+e is probab+y correct. Check this an! copy the !e&inition.
Acti$ate tab+e Q%*C-.W44.
Check your success as !escribe!.
4!te: "& course you are not reco,,en!e! to attach search he+p
Q.BP*"JK%*J44 to tab+e Q.BP*"J44. 'his 2ou+! ha$e the !esire! e&&ect &or
&ie+! Q%*C-.W44-.BPK>0B. <o2e$erD on+y &+ight personne+ 2ou+! be o&&ere!
&or a++ other &ie+!s to be checke! against tab+e Q.BP*"J44 as 2e++. 'hisD
ho2e$erD is a sense+ess restriction &or e4a,p+e &or &ie+! QD.PB.>'44-
Depart,ent hea!
4!te: 0sing the !e&au+t $a+ues &or search he+p para,eters !escribe! in the
appen!i4D you can a+so !e&ine the re;uire! search he+p Q.BP*"JK%*J44 2ithout
using a $ie2 at a++. 9eep se+ection ,etho! Q.BP*"J44. nc+u!e Area as an
a!!itiona+ para,eter in the search he+p. *ea$e co+u,ns -9PD 2;PD LPos an! SPos
e,pty &or this para,eter. .nter the $a+ue R%R @inc+u!ing the apostrophesA in co+u,n
Default 5alue. 'he search he+p thus !e&ine! a+so !oes 2hat you !esire.
'here is a+so a 2ay to ,o!i&y search he+p Q.BP*"J44 so that it can be use! &or
the !esire! &unction 2ithout !etracting &ro, the resu+ts o& .4ercise 1. Para,eter
Area ,ust be a!!e! to search he+p Q.BP*"J44 here. t ,ust be ,arke! as an
BP"-' para,eter @,ark co+u,n -9PD +ea$e a++ other co+u,ns e,ptyA. Jou can
no2 attach search he+p Q.BP*"J44 to &ie+! Q%*C-.W44-.BPK>0B. When
you assign the &ie+!s to the search he+p para,etersD you ha$e to assign the constant
R%R @inc+u!ing the apostrophesA to para,eter Area.
A&ter these actionsD the input he+p o& &ie+! Q%*C-.W44-.BPK>0B 2i++ &unction
as !esire!D 2hereas the input he+p o& &ie+! QD.PB.>'44-Depart,ent hea! is not
a&&ecte! by these changes.
'his so+utionD ho2e$erD 2ou+! not resu+t in a search he+p &or the &+ight personne+.
Jou 2ou+! ha$e to !o this again 2hen you so+$e .4ercise 1-).
1-3 Check i& an input he+p e4ists &or the &ie+!s as !escribe!. & it !oes not e4istD it is possib+e
that no &oreign key 2as !e&ine! &or these &ie+!s.
(earch he+p Q.BP*"JKADB44 to be !e&ine! shou+! be $ery si,i+ar to search
he+p Q.BP*"JK%*J44. Jou shou+! there&ore create it by copying an! then ,ake
the &o++o2ing changes3
'he short te4t &or search he+p Q.BP*"JKADB44 shou+! be a!#uste! to suit its ,eaning.
Change the !ia+og type to Dialo" depends on set of 5alues.
(ince the air+ine shou+! a+so appear in the !ia+og bo4 &or restricting $a+uesD
there ,ust be an entry in co+u,n SPos &or the correspon!ing para,eters. 'his
para,eter ,ust be +o2er than both e4isting para,eters. & necessaryD incre,ent
the,.
Jou a+so ha$e to ,ake sure that the search he+p on+y !isp+ays a!,inistrati$e
e,p+oyees. t is best i& you copy the $ie2 create! in the pre$ious e4ercise an!
rep+ace the $a+ue R%R in the copy 2ith RAR in the se+ection con!ition. A&ter acti$ating
this $ie2 you can enter it as se+ection ,etho! &or search he+p Q.BP*"JKADB44.
@CA (AP A7 BC430 23
Acti$ate the search he+p.
'he search he+p 2i++ be e&&ecti$e &or the t2o &ie+!s i& you go in change ,o!e to the
,aintenance transaction o& the !ata e+e,ent you create! in .4ercise 2-3 &or Last
chan"ed by. n Search help$ enter Q.BP*"JKADB44 in &ie+! 1ame! n &ie+!
Parameter$ enter the na,e o& the &ie+! &or the personne+ nu,ber @can be se+ecting
2ith the %4 he+pA.
Acti$ate the !ata e+e,ent.
Check your success in the usua+ ,anner. Copying the air+ine !oes not &unction
correct+y in both !irections in this case. 'o check thisD enter a $a+ue in &ie+! Carrier
be&ore ca++ing the input he+p. t is not use! in the input he+p. 8ice $ersaD se+ecting a
$a+ue &or Last chan"ed by !oes not up!ate the air+ine.
'his e&&ect can be e4p+aine! in that it is not possib+e to take &urther para,eters into
consi!eration 2hen attaching a search he+p to a !ata e+e,ent. n the present caseD
attaching the search he+p to &ie+! QC<A>7.44-Changer 2ou+! not ha$e correcte!
this error since &ie+! Carrier is not containe! in structure QC<A>7.44. 'his &ie+!
there&ore cou+! not ha$e been taken into consi!eration in the attach,ent.
1-4 Procee! as &o++o2s3
1A Copy search he+p Q.BP*"J44 to search he+p Q.BP*"JK(BP*.44 an!
acti$ate the ne2 search he+p.
2A n change ,o!eD go to the ,aintenance screen &or search he+p Q.BP*"J44.
Choose 2dit Chan"e search help type an! con&ir, it in the ne4t !ia+og
bo4.
3A C+ick on tab page -ncluded search helps. .nter search he+p
Q.BP*"JK(BP*.44.
4A Position the cursor on the search he+p #ust entere!. Choose Parameter
assi"nment. <a$e the syste, ,ake a proposa+ &or the assign,ent.
5A 'he proposa+ is probab+y correct. 'o be on the sa&e si!eD check it an! then copy
it.
)A Acti$ate search he+p Q.BP*"J44.
By ca++ing the input he+p &or &ie+! QD.PB.>'44-Depart,ent hea! you can see
that the input he+p is sti++ &unctioning. With Techn! info you can $eri&y that a
co++ecti$e search he+p is no2 in e&&ect.
1-5 Jou a+rea!y !e&ine! a suitab+e se+ection ,etho! @$ie2 QC-.W(44A &or the ne2
e+e,entary search he+p Q.BP*"JK%*7<'44 in .4ercise /-2. Jou can no2
procee! as &o++o2s3
1A n the initia+ screen o& the ABAP Dictionary se+ect Search help. .nter the na,e
Q.BP*"JK%*7<'44 in the correspon!ing &ie+! an! choose Create. n
the ne4t !ia+og bo4D con&ir, that you 2ant to create an e+e,entary search
he+p.
2A .nter a short te4t. Choose Comple dialo" #ith 5alue restriction as !ia+og type.
3A .nter QC-.W(44 as se+ection ,etho!.
4A Choose the &o++o2ing search he+p para,eters using the %4 he+p3 CarrierD First
nameD Last nameD Personnel numberD Fli"ht numberD Fli"ht dateD Departure
city an! Arri5al city.
@CA (AP A7 BC430 24
5A Bark a++ para,eters as .GP"-' para,eters @co+u,n 2;PA. Bark Carrier an!
Personnel number as BP"-' para,eters @Co+u,n -9PA.
)A Assign position nu,bers &or the para,eters in co+u,n LPos. *ea$e this co+u,n
e,pty &or para,eters Departure city an! Arri5al city.
/A Assign position nu,bers &or para,eters Departure cityD Arri5al city an! Fli"ht
date in co+u,n SPos.
1A Acti$ate the search he+p Q.BP*"JK%*7<'44.
Jou no2 ha$e to inc+u!e search he+p Q.BP*"JK%*7<'44 in co++ecti$e search
he+p Q.BP*"J44. Procee! as &o++o2s3
1A n change ,o!eD go to the ,aintenance screen &or search he+p Q.BP*"J44.
C+ick on tab page -ncluded search helps.
2A .nter search he+p Q.BP*"JK%*7<'44 !irect+y be+o2 search he+p
Q.BP*"JK(BP*.44 in the +ist o& search he+ps.
3A Position the cursor on the search he+p #ust entere!. Choose Parameter
assi"nment. n the ne4t !ia+og bo4D con&ir, that you 2ant to create a
proposa+ &or the para,eter assign,ent.
4A 'he para,eter assign,ent propose! by the syste, is probab+y correct. Check
this an! copy the assign,ent.
5A Acti$ate search he+p Q.BP*"J44.
Jou can check your success as usua+ by ca++ing the input he+p &or &ie+!
QD.PB.>'44-Depart,ent hea!.
1-) (ince you 2ant to ,ake the changes 2ithout ,o!i&ying e4isting ob#ectsD you ha$e to
create an appen! search he+p &or co++ecti$e search he+p Q.BP*"J44. Procee! as
&o++o2s3
1A n !isp+ay ,o!eD go to the ,aintenance screen &or search he+p Q.BP*"J44.
Choose Goto Append search helps.
2A A na,e &or the appen! search he+p is propose! in the ne4t !ia+og bo4. Jou can
copy this na,e.
3A .nter a short !escription &or the appen! search he+p.
4A C+ick on tab page -ncluded search helps.
5A .nter Q.BP*"JK%*J44 an! Q.BP*"JK%*7<'44 in the +ist o& inc+u!e!
search he+ps. Bark co+u,n Hidden &or the secon! entry.
)A Position the cursor on the na,e o& search he+p Q.BP*"JK%*J44. Choose
Parameter assi"nment. n the ne4t !ia+og bo4D con&ir, that you 2ant to
create a proposa+ &or the para,eter assign,ent.
/A 'he para,eter assign,ent propose! by the syste, is probab+y correct. Check
this an! copy the assign,ent.
1A Acti$ate your appen! search he+p.
Jou can check your success as usua+ by ca++ing the input he+p &or &ie+!
QD.PB.>'44-Depart,ent hea!.
1-/ Ca++ the input he+p &or &ie+! Q.BP*"J44-Depart,ent co!e as !escribe!. With Techn!
info you can see that the input he+p is !eter,ine! 2ith check tab+e QD.PB.>'44
o& this &ie+!. Jou can a+so see that there is a te4t tab+e &or the check tab+e.
n this case tooD entries that a+rea!y e4ist in &ie+! Carrier are taken into
@CA (AP A7 BC430 25
consi!eration in the %4 he+p. (i,i+ar+yD &ie+! Carrier is up!ate! 2hen a $a+ue is
se+ecte! &ro, the hit +ist.
'o ,ake the re;uire! enhance,entD you ,ust create an e+e,entary search he+p an!
attach it to tab+e QD.PB.>'44. (ince a++ the !ata to be use! in the input he+p are
containe! in tab+e QD.PB.>'44 an! its te4t tab+e QD.PB.>''44D tab+e
QD.PB.>'44 can be use! as the se+ection ,etho! o& this search he+p.
Procee! as &o++o2s3
1A n the initia+ screen o& the ABAP Dictionary se+ect Search help. .nter a na,e
&or the search he+p to be create! in the correspon!ing &ie+!.
2A Choose Create an! con&ir, that you 2ant to create an e+e,entary search he+p in
the ne4t !ia+og bo4.
3A .nter a short te4t &or your search he+p.
4A .nter QD.PB.>'44 as se+ection ,etho!.
5A With the input he+pD se+ect search he+p para,eters CarrierD Department code$
Description an! Telephone.
)A Bark a++ para,eters as .GP"-' para,eters @co+u,n 2;PA. Bark para,eters
Carrier an! Department code as BP"-' para,eters @Co+u,n -9PA.
/A Assign position nu,bers in the hit +ist &or the para,eters in co+u,n LPos.
1A 'he check tab+e he+p can pro$i!e upon re;uest a !ia+og bo4 &or restricting
$a+ues ha$ing the &ie+!s Carrier an! Department code. Jou can retain this
beha$ior by assigning position nu,ber &or these t2o para,eters in co+u,n
SPos.
5A Acti$ate the search he+p.
10A 7o to change ,o!e in the ,aintenance screen &or tab+e QD.PB.>'44. Choose
Goto Search help For table.
11A n the ne4t !ia+og bo4 enter the na,e o& the search he+p you #ust create! an!
choose Continue.
12A 'he proposa+ create! &or assigning the search he+p para,eters to the key &ie+!s
o& tab+e QD.PB.>'44 is probab+y correct. Check this an! copy the
assign,ent.
13A Acti$ate tab+e QD.PB.>'44.
Check your success in the usua+ ,anner.
1-1 Jou can &in! the +ast na,es o& the !epart,ent hea!s in tab+e Q.BP*"J44. 'he !ata
o& the search he+p ,ust be se+ecte! 2ith the three tab+es QD.PB.>'44D
QD.PB.>''44 an! Q.BP*"J44.
Jou ,ust there&ore se+ect a $ie2 as se+ection ,etho! o& the search he+p. 'he
e4ercise states that this $ie2 ,ust i,p+e,ent an outer #oin. Jou ,ust there&ore
choose a he+p $ie2.
'o !e&ine the he+p $ie23
1A n the initia+ screen o& the ABAP Dictionary se+ect 8ie#. n the correspon!ing
&ie+!D enter a na,e beginning 2ith the pre&i4 <KQ &or the he+p $ie2.
2A Choose Create an! con&ir, that you 2ant to create a he+p $ie2 in the ne4t
!ia+og bo4.
3A .nter a short te4t &or the he+p $ie2.
@CA (AP A7 BC430 2)
4A .nter QD.PB.>'44 in the on+y input &ie+! in the area Tables!
5A Position the cursor on the tab+e na,es #ust entere! an! choose :elationships. n
the ne4t !ia+og bo4 ,ark the re+ationship to tab+e Q.BP*"J44 un!er
:eferenced tables an! the re+ationship to tab+e QD.PB.>''44 un!er
Dependent tables. Copy this se+ection.
)A C+ick on tab page 8ie# fields. (o,e &ie+!s that you shou+! not change are
a+rea!y entere! here. Jou ha$e to inc+u!e the &o++o2ing &ie+!s in the $ie2
using the Table fields &unction3 QD.PB.>'44-'e+ephoneD
QD.PB.>''44-Description an! Q.BP*"J44-*ast na,e.
/A Acti$ate the he+p $ie2.
Jou can no2 a!#ust the search he+p to the a!!itiona+ re;uire,ents. Procee! as
&o++o2s3
1A 7o to the ,aintenance screen &or the search he+p create! in the pre$ious
e4ercise. -ep+ace QD.PB.>'44 2ith the he+p $ie2 you #ust create! in
&ie+! Selection method.
2A Choose the a!!itiona+ search he+p para,eter Last name using the input he+p.
Assign it a position in the hit +ist in co+u,n LPos. >ote that this co+u,n
,ay not contain a !up+icate @positi$eA nu,ber. Jou ,ight there&ore ha$e to
a!#ust the position nu,bers o& the other para,eters.
3A 'o assign the !esire! tit+e in the hit +ist o& the co+u,n containing the +ast na,es
o& the !epart,ent hea!sD ,ark co+u,n 9odified &or para,eter Last name @it
is to the right o& co+u,n Data elementA. Jou can no2 enter $a+ues &or the
!ata e+e,ent o& this para,eter. -ep+ace the entere! !ata e+e,ent (K*>AB.
2ith (K<.AD.
4A Acti$ate the search he+p.
Check your success in the usua+ ,anner.
4!te: Jou can a+rea!y speci&y the a+ternati$e !ata e+e,ent &or co+u,n Last name
2hen you !e&ine the he+p $ie2. 'o !o so you ,ust ,ark co+u,n 9od &or &ie+! Last
name in the ,aintenance screen &or the $ie2 &ie+!s o& the he+p $ie2. Jou can then
rep+ace !ata e+e,ent (K*>AB. 2ith (K<.AD. n this case you can +ea$e out step
4 in the abo$e !escription.
@CA (AP A7 BC430 2/
$
SAP AG 1999
Appendi6
7light odel
Decision tree "or #!""ering
7!rther in"oration a#o!t search helps
4portant en! paths
4nde6
@CA (AP A7 BC430 1
$.2
SAP AG 1999
7light Data *odel "or ABAP &raining Co!rses
Starting point
Depart!re airport
Arrival airport
Destination
&as)s o" the travel agency;
P Possi#le airports
P Possi#le carriers at the reG!ested tie
P Possi#le "lights at the reG!ested tie
P 7!rther in"oration a#o!t the "lights;
price$ #oo)ings$ ...
"ne co,,on &+ight !ata ,o!e+ is use! in the ABAP training courses. "n+y a si,p+e o$er$ie2 o& this
!ata ,o!e+ is sho2n hereH !etai+s can be gi$en i& re;uire!.
& you as a custo,er 2ant to get &ro, one p+ace to anotherD you 2ant to &in! out the &o++o2ing &ro,
your tra$e+ agency ...
Which are the best airports &or the gi$en trip
At 2hat ti,es are there &+ights on the gi$en !ay
Depen!ing on your in!i$i!ua+ opti,i6ation con!itionsD 2hat is the opti,a+ so+utionD e.g. the best
&+ightD the &astest connectionD the connection that is nearest to the re;uire! arri$a+ ti,eD ...
'his $ie2 is !i&&erent &ro, that o& a tra$e+ agency3 'he !ata is store! in the !ata ,o!e+ in tab+es in a
centra+ !atabase accor!ing to technica+ criteria.. 'he custo,er is not nor,a++y intereste! in a++ the
re;uire! !ata @&or e4a,p+e you ha$e to enter 2hich custo,er booke! 2hich &+ightsD 2hen the
bookings 2ere ,a!eD ho2 ,uch the custo,er pai! ...A. 'he !ata ,ust be co++ecte! 2ith progra,s
!epen!ing on the user re;uire,ents.
@CA (AP A7 BC430 2
$.3
SAP AG 1999
Data *odel
Airport
BCFA4RP9R$ $
7light
c!stoer
BCFC5S$9& $
Airline
carrier
BCFCARR43R $
7light
BCFS1/4G=$ $
City-airport
assignent
BCFC4$A4RP $
City
BCFG39C4$@ $
7light
sched!le
BCFP/A?1/4 $
Agency
BCF$RAG/AG $
Boo)ings
BCFB99N4?G $
Sales
co!nter
BCFC95?$3R $
&ie
3
A
A
C8
C8
3
8
8
3
3
.ntities can be !e&ine! &or a++ +ogica++y re+ate! in&or,ation3 'he &+ight !ata ,o!e+ there&ore contains
an entity each &or3
a++ citiesD
a++ airportsD
a++ carriersD
a++ &+ightsD
a++ connections.
'he entities ha$e a certain re+ationship to one another3
%+ights start an! en! at an airport.
A connection is uni;ue+y !e&ine! by its carrierD !eparture airportD arri$a+ airportD an! &+ight ti,e
%+ights can be o&&ere! on ,ore than one !ay &or each connectionD but a &+ight can on+y be &or a
certain connection.
A++ nearby airports ,ust be assigne! to the cities.
'his !ata ,o!e+ ,anages a++ the re;uire! !ata 2ithout unnecessary re!un!ancies an! gi$es the
agency the !ata it re;uires.
@CA (AP A7 BC430 3
$.4
SAP AG 1999
4pleentation in the ABAP Dictionary
SP704
1l('t sce#.le
.....
SB11>
1l('t book(n'
.....
&A?)$
CARR4)
C9??4)
1/)A$3
B99N4)
C5S$9&4)
C95?$3R
AG3?C@?5&
S704G3&
1l('t
.....
&A?)$
CARR4)
C9??4)
1/)A$3
S3A$S&AH
S3A$S9CC
SCA88
Carr(er
&A?)$
CARR4)
CARR?A&3
.....
Airline
carrier
11001
7light
11001
7light
sched!le
11001
Boo)ings
11001
&ie
3 3 3
3
&A?)$
CARR4)
C9??4)
A4RP1R9&
A4RP$9
)3P$4&3
'he e4a,p+es an! e4ercises in the ABAP training courses an! the ABAP !ocu,entation re&er to the
(AP &+ight !ata ,o!e+. 'he -epository ob#ects &or the &+ight !ata ,o!e+ can be &oun! in !e$e+op,ent
c+ass (APBCKDA'AB"D.*.
'he &o++o2ing tab+es o& the &+ight !ata ,o!e+ are ,ain+y use! in the ABAP training courses3
(P%*3 'ab+e o& &+ight connections
(%*7<' 'ab+e o& &+ights
(B""93 'ab+e o& &+ight bookings
(CA--3 'ab+e o& air+ines
(B0(PA-'3 'ab+e o& air+ine partners
('-A8.*A73 'ab+e o& tra$e+ agencies
(C0('"B3 'ab+e o& &+ight custo,ers
(C"0>'.-3 'ab+e o& sa+es !esks
@CA (AP A7 BC430 4
$.5
SAP AG 1999
?o
@es
@es
@es
@es
?o
@es
?o
?o
?o
Decision &ree "or B!""ering
&a#le ay not #e #!""ered.
Start
1.ll b.,,er(n'
S(n'le:recor# b.,,er(n'
B.,,er(n' #e"en#s on (nstallat(on
1.rter cons(#erat(ons m.st be ma#e!
1.ll or 'ener(c b.,,er(n' "oss(bleB
Secon#ary (n#e2es or b.,,er(n'B
&a#le ay #e #!""ered.
Gener(c b.,,er(n' >(t s.(table
n.mber o, 'ener(c key ,(el#s
Are tem". (ncons(stenc(es (n te
rea# #ata acce"tableB Are most
accesses rea# onlyB
4s te e2"ecte# table s(Ae
smaller tan <NBB
4s te table mostly accesse# >(t
S3/3C$ S4?G/3B
4s te e2"ecte# table s(Ae lar'er
tan 1&B 6EE 1000 recor#s7B
4s a le,t:+.st(,(e# "art o, te
key .s.ally s"ec(,(e# >en
te table (s accesse#
1.ll b.,,er(n'
@CA (AP A7 BC430 5
$.6
SAP AG 1999
Base table 1 Base table 2
DB vie%
Secon#ary table
3elp vie%
Pr(mary table
2ie% as Selection *ethod o" a Search 3elp
& the se+ection ,etho! o& a search he+p is a !atabase $ie2D the input he+p 2i++ on+y !isp+ay the
recor!s &or 2hich there are entries in a++ the tab+es in$o+$e! in the $ie2 @inner #oinA. 'he set o&
possib+e entries is so,eti,es !escribe! by the entries in a pri,ary tab+e &or 2hich a!!itiona+ optiona+
in&or,ation can be a!!e! &ro, &urther secon!ary tab+es. 'his $ie2 on the !ata can be i,p+e,ente!
2ith a he+p $ie2. 'he sa,e outer #oin +ogic is use! &or he+p $ie2s as &or ,aintenance $ie2s.
A he+p $ie2 is !e&ine! ana+ogous+y to a ,aintenance $ie2. <e+p $ie2s can on+y be use! as se+ection
,etho!s in search he+ps. (ince the -:3 (yste, cannot pass the se+ection !irect+y to the !atabase
using a he+p $ie2D it ,ust generate its o2n access routines. 'he !atabase $ie2 shou+! there&ore be
use! as se+ection ,etho! in pre&erence to the he+p $ie2.
(e+ection using a tab+e an! te4t tab+e correspon!s to se+ection using a $irtua+ he+p $ie2. %or this
reason a he+p $ie2 shou+! not be create! in this case.
.4ception3 'he tab+e contains a &ie+! ha$ing the sa,e na,e as a non-key &ie+! o& the te4t tab+e. &
this &ie+! o& the te4t tab+e is nee!e! in the search he+pD you ha$e to create a he+p $ie2 on the t2o
tab+es because the &ie+! in the search he+p cannot be accesse! !irect+y.
t is custo,ary to start the na,e o& he+p $ie2s 2ith the pre&i4 \<K\. 8ie2s beginning 2ith the
pre&i4es \<KJ\ or \<KQ\ there&ore +ie in the custo,er na,espace.
@CA (AP A7 BC430 )
$.7
SAP AG 1999
Search help
7!rther 1ptions "or Search 3elps
De"a!lt val!es 3ot )eys
3ide incl!ded
search helps
Display "ields in the display
#o6 "or restricting val!es
A para,eter can be pre-assigne! a $a+ue by a++ocating a !e&au+t $a+ue. 'he para,eter is a+2ays gi$en
this $a+ue un+ess it is an BP"-' para,eter that is +inke! 2ith a &ie+! o& the screenD its ,o!u+e poo+
or 2ith a para,eter o& the inc+u!ing co++ecti$e search he+p.
'he &o++o2ing can be !e&au+t $a+ues3 +itera+sD syste, &ie+!s an! 7.' para,eters.
Jou can use a !e&au+t $a+ue to &or,u+ate a si,p+e se+ection con!ition &or a &ie+! o& the se+ection
,etho!.
A sing+e +etter or a !igit can be assigne! as hot key to an e+e,entary search he+p. & this e+e,entary
search he+p is use! in a screen &ie+! &or the input he+p an! i& this &ie+! has the short cut LShot
keyT.S(.*1T.S(.*2T... 2hen the input he+p is ca++e!D this e+e,entary search he+p is processe!.
S(.*1TD S(.*2T... is use! as the &ie+! contents &or the !ia+og bo4 &or restricting $a+ues @2ith an RWR
a!!e! at the en!A an! the hit +ist is then !isp+aye! i,,e!iate+y.
n!i$i!ua+ search he+p inc+usions can be hi!!en in a co++ecti$e search he+p. Jou can thus !eacti$ate
in!i$i!ua+ search paths that are not 2ante! in a syste,. 'hey shou+! nor,a++y be hi!!en in an
appen! search he+p as this can be !one 2ithout ,o!i&ication.
Para,eters o& an e+e,entary search he+p can be ,arke! as pure !isp+ay &ie+!s in the !ia+og bo4 &or
restricting $a+ues. n genera+D BP"-' para,eters that are assigne! unchangeab+e &ie+!s o& the
screen are !isp+aye! in this !ia+og bo4 as unchangeab+e.
@CA (AP A7 BC430 /
$.
SAP AG 1999
)ate o, ,l('t
74 74
Carr(er
. . .
&a(ntenance o, Book(n's
1l('t n.mber
)e"art. c(ty
Arr(*al c(ty
. . .
S E L E C T * F R O M
S F L I G H T . . .
Searc el" e2(t Searc el" e2(t
SAPBCFG/9BA/F14FS1/4G=$ SAPBCFG/9BA/F14FS1/4G=$
?o. ?o. )e"art. c(ty )e"art. c(ty 1ree 1ree
Carr(er Carr(er
0+++ Rome 14;
0+++ Rome 19<
Al(tal(a
. . . . . .
Rome
AC
. . . . . .
. . . . . .
. . . . . .
. . . . . . . . . . . . . . . . . .
Non-Standard; Search 3elp 56it
A search he+p is an ob#ect that !escribes an input he+p 2ithin the syste,-2i!e stan!ar!. n so,e
casesD the specia+ se,antics o& a &ie+! re;uires that you !e$iate &ro, this stan!ar! in so,e !etai+s.
'his can be i,p+e,ente! 2ith a search he+p e4it.
A search he+p e4it is a &unction ,o!u+e ha$ing a stan!ar!i6e! inter&ace. 'he &unction ,o!u+e
%4%K(<*PK.G'K.GABP*. can be use! as te,p+ate. & a search he+p has such a search he+p e4itD
the search he+p e4it is ca++e! prior to each sing+e step o& the process. 'he a!,inistrati$e !ata o& the
he+p processor is passe! $ia the inter&ace. 'he search he+p e4it can ,anipu+ate this !ata.
'he a!,inistration !ata a+so inc+u!es the in&or,ation about the ne4t step to be e4ecute!. 'he search
he+p e4it can no2 e4ecute either preparatory actions &or this step or the step itse+& @&or e4a,p+e a !ata
se+ection 2hich cannot be i,p+e,ente! 2ith a (.*.C' on a tab+e or $ie2A. n the secon! case the
search he+p e4it a+so changes the in&or,ation about the ne4t step to be e4ecute!.
(o,e &unction ,o!u+es that can be use! as search he+p e4its or that can be use! to ,anipu+ate the
a!,inistration !ata in search he+p e4its are a+rea!y !e&ine! 2ith the pre&i4 %40'K.
(earch he+p e4its shou+! on+y be use! &or e4ceptions. 0sing search he+p e4its encourages non-
stan!ar! so+utions an! ,ake it ,ore !i&&icu+t to ,aintain the input he+p.
@CA (AP A7 BC430 1
$.$
SAP AG 1999
*igration o" 56isting 4np!t 3elps
3l. src. l".
3?NA*5
Select(on
meto#
$able
&
Searc el"
attacment
=el" *(e>
3?NA*5
Pr(mary table $
Secon#. tab. 1
...
or
=el" *(e>
3?NA*5
Pr(mary table $
Secon#. tab. 1
...
Coll. src. l".
ABCD
Searc el"
(ncl.s(ons
3l. src. l".
ABCDA
Select(on
meto#
)B *(e>
*?ABCDA
3l. src. l".
<ABCD-
Select(on
meto#
)B *(e>
*?ABCD-
)B *(e>
*?ABCDA
&C ob+ect
ABCD
&C 4)
A
'enerates
)B *(e>
*?ABCD-
&C 4)
-
'enerates
Release 3.2
Release 4.2
belon's to
belon's to
(earch he+ps 2ere intro!uce! in -e+ease 4.0. Pre$ious+yD input he+ps 2ere i,p+e,ente! by creating
,atchco!es an! he+p $ie2sD 2hichD ho2e$erD ha! +ess &unctiona+ity. When you upgra!e to 4.4D
search he+ps 2ith the sa,e na,e are create! &ro, these ob#ects @i& necessaryD the na,e is prece!e!
2ith a J or QA. 'he origina+ ob#ects 2i++ initia++y re,ain in the syste,D but be ,eaning+ess.
Prior to -e+ease 4.0D a he+p $ie2 2as a co,p+ete !escription o& an input he+p that 2as auto,atica++y
attache! to its pri,ary tab+e @an! on+y to itA. An e+e,entary search he+p is create! &ro, each he+p
$ie2. 'he pri,ary tab+e o& the he+p $ie2 can be entere! as the se+ection ,etho! &or ,any casesD an!
the he+p $ie2 2i++ be use! &or the others. 'he search he+p that is create! is attache! to the pri,ary
tab+e o& the he+p $ie2.
An e+e,entary search he+p is create! &ro, a ,atchco!e D. 'he se+ection ,etho! assigne! is the
generate! !atabase $ie2 @&or a transparent DA or the generate! poo+e! tab+e @&or a non-transparent
DA o& the ,atchco!e D. n the &irst caseD the generate! $ie2 is a!,inistere! as an in!epen!ent
ob#ect in the ABAP Dictionary. n the secon! caseD the poo+e! tab+e is sti++ appen!e! to its
,atchco!e D since the ,atchco!e techni;ue is use! to up!ate the !ata in this tab+e.
A co++ecti$e search he+p is create! &ro, a ,atchco!e ob#ect. Batchco!es 2ere attache! to input
&ie+!s in the screen. 'hese attach,ents are con$erte! to attach,ents o& the create! co++ecti$e search
he+ps to the correspon!ing screen &ie+!s..
'he abo$e s+i!e i++ustrates the ,igration &or he+p $ie2s an! &or transparent ,atchco!es.
@CA (AP A7 BC430 5
$.10
SAP AG 1999
Alternative Displays o" the 4np!t 3elp
4np!t 3elp Control
0ist #o6
'he -:3 (yste, recogni6es three presentation &or,s &or the input he+p3
- *ist bo4
- Contro+ @,o!e+essA
- -:3 !ia+og @,o!a+A
'he +ist bo4 !oes not pro$i!e &or any &urther se+ection con!itions an! no &urther co+u,ns are
!isp+aye! in the hit +ist. <o2e$erD the +ist bo4 is the ,ost user-&rien!+y input he+p &or c+ear one-
co+u,n +ists. 'he app+ication !e$e+oper !eci!es 2hether to o&&er a &ie+! as +ist bo4 an! stores this
in&or,ation in the (creen Painter &or the correspon!ing &ie+!. When the user ca++s the +ist bo4D the
!ata to be !isp+aye! is obtaine! 2ith the input he+p ,echanis, store! in the ABAP Dictionary or
(creen Painter &or the &ie+!. Jou can obtain ,ore in&or,ation on using the +ist bo4 in the course
BC410 Pro"rammin" 4ser Dialo"s.
A+ternati$e+y you can !isp+ay &ie+!s that are not o&&ere! as a +ist bo4 2ith a ,o!e+ess contro+ or 2ith
a ,o!a+ !ia+og i,p+e,ente! 2ith -:3 screen techno+ogy. With Help C Settin"s each user can !e&ine
the $ariant he pre&ers. 'his presentation &or, is then use! &or a++ input he+ps &or this user. 'he syste,
a!,inistrator can !e&ine the !e&au+t $a+ue.
'he contro+ is particu+ar+y use&u+ i& ,ore than one &ie+! is to be &i++e! se;uentia++y 2ith the sa,e
input he+p @&or e4a,p+e in a tab+e contro+A. 'he Hold list &unction starts the contro+ &ro, the ,o!a+
he+p.
@CA (AP A7 BC430 10
$.11<mp!rtant /enu ,at)s and Transact"!ns
ABAP Dictionary *aintenance9Display
Tools ABAP Workbench Development Dictionary
: )(ct(onary ma(ntenance 6S3117 : )(ct(onary #(s"lay 6S3127
893 8epository 4n"oration Syste ABAP Dictionary
+! Tools ABAP Workbench Development Dictionary (Dictionary object; Enter object
name and choose operation)
Environment R! Repository "n#ormation $ystem or
&! Tools ABAP Workbench %vervie& R! "n#ormation $ystem
: R/3 Re"os(tory 4n,ormat(on System 6S3<47 / Re"os(tory 4n,ormat(on System ABAP
)(ct(onary 6S31%7
Data Display9*aintenance CData Bro%serD
'( Tools ABAP Workbench Development Dictionary (Dictionary object)Table*
Enter table name and choose operation)
+tilities Table contents Display or Table contents ,reate entries
or
2. Tools ABAP Workbench %vervie& Data Bro&ser
)ata #(s"lay/ma(ntenance 6)ata Bro>ser7 6S3167
4nde6
Tools ABAP Workbench Development ABAP Dictionary (Dictionary object) table;
Enter table name and choose operation)
-oto "nde.es or P.sb.tton "nde.es(((
&echnical Settings
Tools ABAP Workbench Development ABAP Dictionary (Dictionary object) Table*
enter table name and choose operation)
-oto Technical settin/s or ".sb.tton Technical settin/s ($E'!)
Data#ase :tility
Tools ABAP Workbench Development ABAP Dictionar (Dictionar ob!ect"
#nter ob!ect name and choose operation)
$tilities Database %tilit
& Data#ase !tility CS5-4D
Storage Paraeters
Tools ABAP Workbench Development ABAP Dictionar (Dictionar ob!ect"
#nter ob!ect name and select operation)
$tilities Database %tilit
'oto Stora(e parameters or p!sh#!tton Stora(e parameters
& Data#ase !tility CS5-4D 'oto Stora(e parameters
7i6ed 2al!es
Tools ABAP Workbench Development ABAP Dictionar (Dictionar ob!ect"
domain)
#nter domain name and choose operation)
Tab pa(e *al%e ran(e
*aintenance 2ie%
Tools ABAP Workbench Development Other tools Table maint+ vie,
& &a#le vie% generation CS5+4D
5nhanced Data Display
$ystem +tilities Table maintenance E.t( table maint(
0 32ten#e# table ma(ntenance 6S&307
@CA (AP A7 BC430 11
@CA (AP A7 BC430 12
$.12<ndex
Depen!ent ob#ect 5-5
Acti$ation 5-3
A*'.- 'AB*. )-4D )-13
Ana+ysis too+ )-11
Continue a!#ust,ent )-11
Appen! structure )-12D )-13D )-14D /-12
Appen! search he+p 1-15
-estart +og )-5
C+uster tab+e )-14
Data c+ass 2-1D 2-5
custo,er 2-5
Database 1-4D 2-3D 3-4
Database ob#ect 1-3D 1-/
Database syste, 3-4D )-4D /-11
Database tab+e 1-3D 2-)
Database inter&ace 1-/D 3-5
Database $ie2 1-3D 1-4D /-11D /-14
Data e+e,ent 1-3D 1-5D 2-4
Docu,entation 1-)
Do,ain 2-10D 4-3D 4-4
e;ua+ity 4-5
Do,ain concept
t2o-+e$e+ 2-5
(creen 1-3
nput he+p 1-3D 1-)D 1-3D 1-4D 11-10
nput check 1-)
De$e+op,ent en$iron,ent 1-/
.4tent 2-10
%ie+! he+p 1-3D 1-)
%ie+! assign,ent 4-/
%i4e! $a+ue 4-3
%oreign key 1-)D 4-)D 4-/D 4-1D 4-10D /-5D /-13
%oreign key &ie+!
type o& 4-11
@CA (AP A7 BC430 13
%oreign key re+ationship 4-11
%oreign key tab+e 4-/D 4-1
7eneration o& tab+e $ie2 /-13
(i6e category 2-1D 2-10
<e+p $ie2 11-)D 11-5
nc+u!e
structure 2-/D 5-5
in !atabase $ie2s /-12
n!e4 1-4D 3-3D 3-4D 1-12
n!e4 entry 3-3
n!e4 D 3-4
n&or,ation syste, 5-/
?oin /-3
inner #oin /-14
outer #oin /-14
?oin con!ition /-5D /-5D /-10D /-13
Cata+og change )-4
Car!ina+ity 4-11
Co,ponent 1-5
Cross-pro!uct /-4D /-5
Custo,er &ie+! )-12
Custo,er ,o!i&ication )-13D 1-15
-unti,e ob#ect 5-4D )-3
-unti,e en$iron,ent 1-/
Batchco!e 11-5
"b#ect +og )-11
"pti,i6er 3-4
Poo+e! tab+e )-14
Per&or,ance 1-)D 3-5D 3-1D 1-12
Baintenance status /-11
<e+p $ie2 /-13D /-14
Pri,ary in!e4 3-4
Pri,ary key 2-3D 3-1D 4-1
Pro#ection /-3D /-)
*og 1-)D 2-1D 2-11
Check &ie+! 4-/D 4-1D 4-5
Check tab+e 4-4D 4-/D 4-1
@CA (AP A7 BC430 14
Bu&&er 3-5D 3-)D 3-/D 3-1D 3-5
Bu&&ering 1-)D 2-1
&u++ 3-)D 3-/D 3-1D 3-5
generic 3-)D 3-1
sing+e-recor! 3-)D 3-5
o& !atabase $ie2 /-11
Bu&&ering type 3-)D 3-1D /-11
Bu&&er synchroni6ation 3-10D 3-11D 3-12D 3-13D 3-14D 3-15
-e+ease upgra!e )-13
r!isp:bu&re&ti,e 3-10
(e,antic attribute 4-11
9ey 3-/
generic 3-1
re!uce +ength o& )-1
9ey &ie+! 3-4D 4-1
generic 3-1
(econ!ary in!e4 3-4D 3-/
(e+ection /-3D /-4
(e+ection con!ition /-/D /-5
(.54 /-13
(PDD )-13
(torage area 2-10
*ock ob#ect 1-)
(tructure 1-3D 1-5D 2-3
(tructure a!#ust,ent )-4
(earch &ie+! 1-4D 1-5
(earch he+p 1-)D 1-5D 11-/
search he+p attach,ent 1-5D 1-10D 1-11D 1-14
e+e,entary 1-14
co++ecti$e search he+p 1-14D 1-15
appen! search he+p 1-15
!ia+og beha$ior o& a search he+p 1-5D 1-/
search he+p para,eter 1-/D 1-1
inter&ace o& a search he+p 1-5D 1-1D 1-5D 1-10D 1-14
se+ection ,etho! o& a search he+p 1-5D 1-)
search he+p e4it 11-1
(ynchroni6ation tab+e 3-10D 3-11D 3-12D 3-13D 3-14D 3-15
@CA (AP A7 BC430 15
(ynchroni6ation ti,e 3-14D 3-15
'ab+e 1-3D 1-)D 2-3
transparent 2-)
te4t tab+e 4-12
un+ock )-11
'ab+e bu&&er 3-5D 3-)
'ab+e type 1-3D 1-5
'ab+e ,aintenance generator /-13
'ab+espace )-5D )-10
'echnica+ settings 2-1
'ype
structure! 2-)
user-!e&ine! 1-3D 1-5
'ype !e&inition 1-3D 1-5D 1-/
Con$ersion )-4
ter,inate! )-5D )-10
Con$ersion process )-5D )-)D )-/D )-1D )-5
0ni;ue in!e4 3-4
0pgra!e )-13
Disp+ace,ent 3-5
8ersion
acti$e 5-3D )-3D )-5D )-)D )-/D )-1D )-5
inacti$e )-3D )-3D )-5D )-)D )-/
Where-use! +ist 5-)
8ie2 1-4D 1-)D /-3D /-4D /-5D /-)D /-/D /-1D /-5D /-10D /-11D /-12D /-13D /-14D 11-)
8a+ue tab+e 4-4D 4-5D 4-10
V'AB 3-5
@CA (AP A7 BC430 1)