+ All Categories
Home > Documents > 2.1.Abap Ddic & Basics

2.1.Abap Ddic & Basics

Date post: 06-Oct-2015
Category:
Upload: bakkalibilal
View: 43 times
Download: 0 times
Share this document with a friend
Description:
2.1.Abap Ddic & Basics
104
© Copyright IBM Corporation 2007 IBM Global Business Services © IBM Corporation 2013 IBM Global Business Services Production Quality ABAP Workshop
Transcript
OVERVIEW
)echnical Settings
Accessing the ABAP Dictionary
Da ta
CREATIO O! TAB"E T#RO$%# TRA&ACTIO &E''
 
!-I- CASS
)he ,elivery class controls the transport o4 table ,ata 'hen installing or upgra,ing5 in a client copy an, 'hen transporting bet'een custo6er syste6s
 C"A&& A(  Application Ta)le *+aster and Transaction Data,-
 Master data is ,ata 'hich is 4re8uently rea,5 but rarely up,ate, -g custo6er 6aster5 6aterial 6aster
Transaction data is ,ata 'hich is 4re8uently up,ate, -g sales or,er5 purchase or,er
ogically tables o4 ,elivery class A are not transporte, hence no C)S is assigne,
C"A&& C( Custo.i/ing ta)le-
Customizing data is ,ata 'hich is ,e4ine, 'hen the syste6 is initiali9e, an, then rarely change, eg co6pany co,es5 ,ocu6ent types
 
 
!A)A B":S-()AB- I-: MAI;)
DATA BROW&ER0TAB"E VIEW +AIT ( 
)hrough this option 'e can insert ,ata into the table )here are 3 options
DI&P"A10 +AITEACE A""OWED WIT# RE&TRICTIO < )hrough this option 'e
can insert5 ,elete5 up,ate ,ata into the table through )AB- MAI;)-;A;C-
G-;-A)"
DI&P"A10 +AITEACE A""OWED ( )hrough this options 'e can ,irectly insert the
,ata into the table through +tilities table contents  create entries
DI&P"A10 +AITEACE OT A""OWED (  )hrough this option 'e can neither insert
the ,ata into the table ,irectly nor through )MG "nly 'e can insert the ,ata into the
table progra66atically using the S= state6ent up,ate5 ,elete etc
 
 
DATA C"A&&
DATA C"A&&(  )he ,ata class ,e4ines the physical area o4 the ,atabase @4or "AC-
the )AB-SAC- in 'hich your table is logically store, I4 you choose a ,ata class
correctly5 your table 'ill auto6atically be assigne, to the correct area 'hen it is create,
on the ,atabase
or custo6 tables 'e use the ,ata class +S- )he other classes are use, by SA
stan,ar, tables
B$!!ERI%
 
Bu44ering a table i6proves the per4or6ance 'hen accessing the ,ata recor,s containe,
 
B$!!ERI% *Contd-,
ou 6ust ,e4ine 'hether an, ho' a table is bu44ere, in the technical settings 4or the table
)here are three possibilities here<
Bu22ering not per.itted( :e 6ust not bu44er a table i4 the table ,ata is 4re8uently
6o,i4ie,
Bu22ering per.itted )ut not acti3ated(
Bu22ering acti3ated( Generally custo6 ,ata are bu44ere, 'ith 4ull bu44ering or generic
bu44ering
B$!!ERI% *Contd-,
)he bu44ering type ,e4ines 'hich table recor,s are loa,e, into the bu44er o4 the application
server 'hen a table recor, is accesse, )here are the 4ollo'ing bu44ering types<
!ull )u22ering( All the recor,s o4 the table are loa,e, into the bu44er 'hen one recor, o4
the table is accesse,
%eneric )u22ering ( :hen a recor, o4 the table is accesse,5 all the recor,s having this
recor, in the generic ey 4iel,s @part o4 the table ey that is le4t&#usti4ie,5 i,enti4ie, by
speci4ying a nu6ber o4 ey 4iel,s are loa,e, into the bu44er
&ingle4record )u22ering( "nly the recor,s o4 a table that are really accesse, are loa,e,
into the bu44er 
B$!!ERI% *Contd-,
:hich )ables shoul, be bu44ere,D
"nly transparent tables an, poole, tables can be bu44ere, Cluster tables cannot be
bu44ere,
 
B$!!ERI% *Contd-,
 :hen )ables shoul,nEt be bu44ere,D
)he ,ata rea, by the application 6ust al'ays be up&to&,ate !elays cause, by the
synchroni9ation 6echanis6 cannot be accepte,
)he table ,ata is 4re8uently 6o,i4ie, In this case the cost o4 synchroni9ation coul, be
greater than the gain in per4or6ance resulting 4ro6 bu44ering oughly speaing5 it ,oes
not 6ae sense to bu44er a table i4 6ore than one percent o4 the accesses to the table
are 6o,i4ying accesses
TAB"E +AITEACE %EERATOR
ollo' 6enu path +tilities & )able 6aintenance generator 4ro6 transaction S-11
Speci4y the Authori9ation Group @-g F;CF 4or sipping any Authority Chec
Clic one stepE 6aintenance type
Give the "vervie' Screen as ?000E @ou can speci4y any Screen ;u6ber beginning
'ith ?
;o'5 hit the Create Button to create the 6aintenance vie' 4or the table Speci4y the
!evelop6ent Class an, C)S 'hen pro6pte, 4or
Speci4y a unction group @I4 you ,onEt have a unction Group alrea,y5 then open
transaction S->0 in another session an, create a unction Group
:e can also give a ne' 4unction group
 
TAB"E +AITEACE %EERATOR *Contd-,
 
TAB"E +AITEACE %EERATOR *Contd-,
 
processe, ,uring eHten,e, table
in list 4or6 on this screen
 
TAB"E +AITEACE %EERATOR *Contd-,
 
TAB"E +AITEACE %EERATOR *Contd-,
 
TAB"E +AITEACE %EERATOR *Contd-,
 
TAB"E +AITEACE %EERATOR *Contd-,
Changes are recor,e, by the
stan,ar, recor,ing routine I4
there are in,ivi,ual routines5
they supple6ent the stan,ar,
TAB"E +AITEACE %EERATOR *Contd-,
Changes are
 
Para.eter T code 2or ta)le (
Go to transaction se?3 to
attach a ) co,e to )MG
 
)o create a
para6eter ) co,e 'e
 
Data)ase Inde5
 An in,eH helps to spee, up selection 4ro6 the ,atabase An in,eH is a sorte, copy o4 selecte,
,atabase table 4iel,s
)he pri6ary in,eH is al'ays auto6atically create, in an ABA base, SA syste6 It consists o4 the
pri6ary ey 4iel,s o4 the ,atabase table )his 6eans5 4or each co6bination o4 the in,eH 4iel,s eHists a
6aHi6u6 o4 one recor, in the table )his in, o4 in,eH is calle, a +;I=+- in,eH
Creating a secon,ary in,eH
ou can use the transaction ABA !ictionary Change In,eHes Create to create an in,eH )o
6ae the in,eH uni8ue5 select +;I=+- )o speci4y the 4iel,s that 'ill co6prise the in,eH5 choose
JChoose 4iel,sJ )hen save an, activate the in,eH
+sing an in,eH consisting o4 several 4iel,s
-ven i4 an in,eH consists o4 several 4iel,s5 you can still use it 'hen only a 4e' o4 the 4iel,s actually
appear in the :K-- clause )he se8uence in 'hich the 4iel,s are speci4ie, in the in,eH is i6portant
ou can only use a 4iel, in the in,eH i4 all o4 the prece,ing 4iel,s in the in,eH ,e4inition are inclu,e, in
the :K-- con,ition
 An in,eH can only support search criteria 'hich ,escribe the search value positively5 such as -= or
 
"pti6al nu6ber o4 4iel,s 4or an in,eH<
 An in,eH shoul, only consist o4 a 4e' 4iel,s as a rule5 no 6ore than 4our )his is because the in,eH has to
be up,ate, each ti6e you change its 4iel,s in a ,atabase operation
It is 'orth creating a secon,ary in,eH 'hen<
 ou 'ant to select table entries base, on 4iel,s that are not containe, in an in,eH5 an, the response
ti6es are very slo' )he -NAI; 4unction in the S= trace sho's 'hich in,eH the syste6 is using ou
can generate a list o4 the ,atabase 8ueries involve, in an action by entering )ransaction S)0. an,
choosing )race on -Hecute action )race o44 ist trace I4 you eHecute the -NAI; S= 4unction
on a -N-C5 --N-C5 "-;5 -"-; or -A- state6ent5 the syste6 returns a list containing the
in,eH use, in the ,atabase 8uery
 )he 4iel, or 4iel,s o4 the ne' secon,ary in,eH are so selective that each in,eH entry correspon,s to at
6ost .O o4 the total nu6ber o4 table entries "ther'ise5 it is not 'orth creating the in,eH
 )he ,atabase table is accesse, 6ainly 4or rea,ing entries
iel,s to inclu,e in an in,eH<
Inclu,e 4iel,s that are o4ten selecte, an, have a high selectivity In other 'or,s5 you nee, to chec the
proportion o4 the table entries that can be selecte, 'ith this 4iel, )he s6aller the proportion5 the 6ore
selective the 4iel, ou shoul, place the 6ost selective 4iel,s at the beginning o4 the in,eH
Data)ase Inde5 *continued,
 ABA !ictionary "b#ects $ %an&20072>
 I4 all o4 the 4iel,s in a &E"ECT state6ent are containe, in the in,eH5 the syste6 ,oes not access
the ,ata a secon, ti6e 4ollo'ing the in,eH access I4 there are only a 4e' 4iel,s in the &E"ECT 
state6ent5 you can i6prove per4or6ance signi4icantly by inclu,ing all o4 these 4iel,s in the in,eH
 ou shoul, not inclu,e a 4iel, in an in,eH i4 its value is initial 4or 6ost o4 the table entries
ote( 
:henever you change table 4iel,s that occur in the in,eH5 the in,eH itsel4 is also up,ate,
)he a6ount o4 ,ata increases
)he opti6i9er has too 6any chances to 6ae 6istaes by using the P'rongP in,eH
I4 you are using 6ore than one in,eH 4or a ,atabase table5 ensure that they ,o not overlap
)he value ;+ is not store, in the in,eH structure o4 so6e ,atabase syste6s )he conse8uence
o4 this is that the in,eH is not use, 4or that 4iel,
  Since in,eHes are ,erive, entirely 4ro6 ,ata alrea,y in the ,atabase5 you can ,elete the6
'ithout ,ata being lost
  ;ote that5 in certain circu6stances5 the ,atabase syste6 6ay have to up,ate the in,eH
correspon,ing to any ,ata changes5 'hich taes ti6e In,eH Analysis o4 tables 'ith respect to
in,eH can be ,one 4ro6 transaction !B0.
Data)ase Inde5 *continued,
)ypical logical steps 'ithin an ABA eHecutable progra6s
!esign the selection screen 4or taing the inputs an, ,o the vali,ations o4 the entere,
inputs Also ,o the necessary ,ata 4iltrations
ea, the ,ata 4ro6 ,atabase table or 4ile in the presentation(application server into
internal tables
!o the necessary ,ata 6anipulations5 calculations an, collate the ,ata into a 4inal
internal table
 
E3ents
  :hat ,oes this event ,oD
  It is use, 4or assigning initial values to variables(constants o4 ,i44erent
  ,ata types
Type  Value Area  Initial Value 
b 0 to 2.. 0
c Any alphanu6eric character J J 4or every position
,
> user&,e4ine, alphanu6eric characters "nly values in the 4or6at MM!! that are per6itte, as ,ate entries accor,ing to the calen,ar rules are vali,< @year< 0001 to ????5 MM@6onth< 01 to 125 !! @,ay< 01 to 31
J00000000J

loating point nu6bers are ,isplaye, internally 'ith 1/ ,eci6al places  accor,ing to the I---&7.* stan,ar, @,ouble precision ali, values are &157?7/?313*>/231.7--R30> to &2522.073>.>.07201*--&30> 4or the negative area5 the value 9ero5 an, R2522.073>.>.07201*--& 30> to R157?7/?313*>/231.7--R30> 4or the positive area Both vali,ity areas are eHten,e, in the ,irection o4 9ero through ,e6orali9e, nu6bers a4ter I---&7.*
0
 
The Di22erent ABAP Prede2ined Data Types *Contd-,
Type   Value Area  Initial Value 
n Any alphanu6eric characters5 ho'ever5 vali, values are only the ,igits 0 to ?
J0J 4or every position
p
)he vali, length 4or pace, nu6bers is bet'een 1 an, 1/ bytes t'o ,eci6al places are pace, into one byte5 'hereby the last byte only contains one place an, the plus(6inus sign a4ter the ,eci6al separator5 up to 1* ,eci6al places are per6itte, !epen,ing on the 4iel, length len an, the nu6ber o4 ,eci6al places ,ec5 the 4ollo'ing applies 4or the value area< @&10@2len &1 R1 ( @10@R,ec to @R10@2len &1 &1 (@10@R,ec in steps o4 10@&,ec alues in bet'een this range are roun,e, o44
0
string as 4or type c  e6pty string o4 length 0
s &327/> to R327/7 0
 
The Di22erent ABAP Prede2ined Data Types *Contd-,
Type   Value Area  Initial Value 
t
/ user&,e4ine, alphanu6eric characters the only vali, values are nu6bers that are interprete, as a ti6e speci4ication in the 2*&hour cloc 4or6at KKMMSS SA reco66en,s to eHclusively use 00 to 23 hours 4or KK @hours an, 00 to .? 4or MM @6inutes an, 00 to .? 4or SS @secon,s
J000000J
 
  para6eters< pT,ate type sy&,atu6 ,e4ault sy&,atu6 R 30
  :e 'ill get syntactical error here since the ,e4ault o44set shoul, be only
string
  Kence in this case 'e can solve our proble6 in the 4ollo'ing 'ay<
  para6eters< pT,ate type sy&,atu6
  initiali9ation
 
&teps 2or declaring an internal ta)le06ork area
types< begin o4 tyTcepc5
prctr type prctr5
,atbi type ,atbi5
en, o4 tyTcepc
prctr type cepc&prctr5
  ,atbi type cepc&,atbi5
en, o4 tyTcepc
1)ype !eclaration
&teps 2or declaring an internal ta)le06ork area *Contd-,
7- !eclaration o4 table type
  types< tyTtTcepc type stan,ar, table o4 tyTcepc
  3!eclaration o4 table('or area
,ata< tTcepc type tyTtTcepc5
&election4screen .anipulation
In every report generally 'e have a selection&screen )he selection&screen is nee,e,
4or user interaction 5 'ithin this selection screen 'e can ,yna6ically 6o,i4y the screen
 
 ABA !ictionary "b#ects $ %an&20073>
D1A+IC +ODI!ICATIO O! &CREE
In A) S--C)I";&SC--; "+)+) event 'e ,yna6ically 6o,i4y the screen5 eg i4 'e 'ant to suppress the lo' or Kigh value boH o4 a select&options 'e can use this event
)he 4ollo'ing is the co,e 4or ,yna6ic 6o,i4ication o4 screen )his event occurs be4ore the selection&screen appears
  select&options < sT6atnr 4or 6ara&6atnr
  at selection&screen output
  screen&active U 0
VA"IDATIO C#EC8I% O! T#E IP$T
In A) S--C)I";&SC--; event 'e can vali,ate the user input also 'e can ,o ,ata 4iltration )his event triggers a4ter the selection screen appears
)he 4ollo'ing is the co,e 4or ,ata vali,ation
:e can use the S--C) SI;G- clause i4 'e have the 4ull set o4 pri6ary ey in our han, i4 'e ,onEt have the 4ull set o4 pri6ary ey then 'e use the &E"ECT $PTO ' ROW clause
  para6eters < p3Tunnr type na1&unnr
  ,ata < vTunnr type unnr
  at selection&screen
  'here unnr U p3Tunnr
  i4 sy&subrc VW 0
  6essage e3?>@00 'ith p3Tunnr Penter vali, custo6er noP
  en,i4
&election4screen .anipulation *Contd-,
options is generate,
!ebugging 6o,e5 it actually consist o4 *
4iel,s na6ely
1 sign
2 option
3 lo'
&election4screen .anipulation *Contd-,
B) Bet'een
&election4screen .anipulation *Contd-,
Suppose 4or eHa6ple 'e have a select option as 4ollo'ing<
S--C)&")I";S< soT6atnr " vT6atnr
 
&EARC# #E"P I ABAP
 A search help ,escribes the 4lo' o4 an input help )he search help can only tae e44ect using a 6echanis6 that assigns the search help to this 4iel, )his 6echanis6 is calle, the search help attach6ent to the 4iel,
 Attaching a search help to a 4iel, has an e44ect on the 4iel,Ps behavior It is there4ore consi,ere, to be part o4 the 4iel, ,e4inition
 )he input help @* help is a stan,ar, 4unction o4 the (3 Syste6 It per6its the user to ,isplay a list o4 possible values 4or a screen 4iel, A value can be ,irectly copie, to an input 4iel, by list selection
 
#OW TO ATTAC# &EARC# #E"P I ABAP
 A search help can be attache, ,irectly to a 4iel, o4 a structure or table )he
,e4inition o4 this attach6ent is analogous to that o4 a 4oreign ey
I4 a 4iel, has a chec table5 its contents are auto6atically o44ere, as possible
values in the input help )he ey 4iel,s o4 the chec table are ,isplaye,
I4 you are not satis4ie, 'ith the ,escribe, stan,ar, ,isplay o4 the ,ata o4 the chec
table5 you can attach a search help to the chec table )his search help is use, 4or
all the 4iel,s that have this table as chec table
 Attaching a search help to a chec table @or a ,ata ele6ent can result in a high
,egree o4 reusability
 &TART O! &E"ECTIO
)his is the event 'here 'e retrieve the ,ata 4ro6 the ,atabase table )here are
,i44erent 'ays by 'hich 'e can 4etch the ,ata
I;;- %"I;
" A -;)I-S
In case o4 inner #oin it is reco66en,e, that 'e shoul, use not 6ore than 3 tables 4or
per4or6ance issue
:e generally use " A -;)I-S clause but be4ore that 'e shoul, ensure that the
table is not initial @e6pty "ther'ise i4 the internal table is e6pty then it 'ill scan all
the ,ata in the ,btable 4ro6 'hich 'e are retrieving the ,ata so per4or6ance is again
,egra,e, here
&E"ECT ED&E"ECT 3ersus &E"ECT99ITO TAB"E
:henever 'e select ,ata 4ro6 ,atabase table using select en,select the ,ata selection
4lo' consists o4 the 4ollo'ing path 'hich is recursive loop<
  resentation server&&Wapplication server&&&W,atabase server
Kence 'hen 'e use the select en,select the per4or6ance is ,egra,e,
But in the case o4 select into table the 4lo' is only once @bac an, 4orth so the
 
 ABA !ictionary "b#ects $ %an&2007*7
Collating all the indi3idual internal ta)les into a 2inal internal ta)le
Case 1
Consi,er a si6ple eHa6ple that 'e have t'o internal tables say tT6at an, tT6ara 'ith 4iel,s
an, ,ata as sho'n belo'
 
 ABA !ictionary "b#ects $ %an&2007*>
Collating all the indi3idual internal ta)les into a 2inal internal ta)le *Contd-,
;o' 'e 'ant to collate these t'o internal tables into a 4inal table tT4inal 'hich loos lie
the 4ollo'ing
 ABA !ictionary "b#ects $ %an&2007*?
Collating all the indi3idual internal ta)les into a 2inal internal ta)le *Contd-,
 
"" A) tT6ara I;)" 'aT6ara
  -A! )AB- tT6at I;)" 'aT6at :I)K L- 6atnr U 'aT6ara&6atnr
  I sy&subrc -= 0
  'aT4inal&6atH U 'aT6at&6atH
  A-;! 'aT4inal )" tT4inal
 ABA !ictionary "b#ects $ %an&2007.0
Collating all the indi3idual internal ta)les into a 2inal internal ta)le *Contd-,
Case 2
  ;o' in this case instea, o4 co6bining the t'o in,ivi,ual internal tables @tT6ara an, tT6at
into a 4inal internal table @tT4inal 'e 'ant to a,, the 4iel,s o4 internal table tT6at into another
alrea,y eHisting table tT6ara
Case 7 *Contd-,
!eclare the internal table tT6at 'ith the 4iel,s to be selecte, 4ro6 ,atabase table
MAL) 'hereas ,eclare the internal table tT6ara 'ith the 4iel,s to be selecte, 4ro6
,atabase table MAA plus the 4iel,s 4ro6 tT6at@ the internal table tT6ara shoul,
contain the 4iel,s o4 4inal internal table @tT4inal o4 the previous case
Initially 4or tT6at select the ,ata 4ro6 ,atabase table MAL) or tT6ara select the
,ata 4ro6 MAA table @the other 4iel,s re6ain blan
;o' populate the blan 4iel,s o4 tT6ara by rea,ing 4ro6 the internal table tT6at
In this Case the logic shoul, be as 4ollo's<
 
The code 2or data selection and .odi2ication
S)A)&"&S--C)I";
  M-SSAG- i00*
  -A- IS)&"C-SSI;G
The code 2or data selection and .odi2ication *Contd-,
XXXXXXXXXlogical step 2XXXXXXXXXXXXXXXXXXXX
  -;!I
  M-SSAG- i00.
  -A- IS)&"C-SSI;G
  EDI!-
The code 2or data selection and .odi2ication *Contd-,
XXXXXXXXXlogical step 3XXXXXXXXXXXXXXXXXXXXXXX
X "" A) tT6at I;)" 'aT6at
X "" A) tT6ara I;)" 'aT6ara :K-- 6atnr U 'aT6at&6atnr
X 'aT6ara&6atH U 'aT6at&6atH
X M"!I tT6ara "M 'aT6ara )A;S")I;G 6atH
X -;!""
X -;!""
:ote(
X)his 6etho,@loop un,er loop is highly not reco66en,e,
 
The code 2or data selection and .odi2ication *Contd-,
XXXXXXXXXlogical step 3XXXXXXXXXXXXXXXXXXXXXXX
BI;A S-ACK
  -;!""
The code 2or data selection and .odi2ication *Contd-,
;ote 1<
In this case instea, o4 6o,i4y i4 'e use appen, then tT6ara 'ill loo lie
 
The code 2or data selection and .odi2ication *Contd-,
;ote 2<
In the above 6o,i4y state6ent i4 'e o6it the a,,ition )A;S")I;G
6atH then all the correspon,ing 4iel,s are 6o,i4ie, 'hich is not re8uire, in
our case since the 4iel,sP 6atnr an, 6tart re6ains the sa6e an, nee, not be
6o,i4ie, Kence only the thir, 4iel, 6atH is 6o,i4ie, using the a,,ition
)A;S")I;G 6atH
The code 2or data selection and .odi2ication *Contd-,
;ote 3<
[ In the -A! )AB- state6ent above itPs a goo, practice that 'e use the
BI;A S-ACK a,,ition 4or the sae o4 i6proving per4or6ance but be4ore
this it is 6an,atory that 'e S") @ascen,ing or ,escen,ing ,epen,ing on
the re8uire6ent the internal table that 'e are rea,ing
[ In case 'e are rea,ing an internal table using 6ultiple ey 4iel,s then the
or,er in 'hich 'e 6ust S") the table shoul, 6atch 'ith the se8uence
speci4ie, in the -A! )AB- state6ent
 
The code 2or data selection and .odi2ication *Contd-,
-A! )AB- tTvbpa
  posnr U 'aTvbap&posnr 
  BI;A S-ACK
  In this case be4ore the -A! )AB- state6ent5 tTvbpa shoul, be 4irst
sorte, by vbeln an, then by posnr as sho'n belo'
or eHa6ple i4 'e have <
 
The code 2or data selection and .odi2ication *Contd-,
S") tTvbpa B vbeln posnr
"" A) tTvbap I;)" 'aTvbap
  posnr U 'aTvbap&posnr 
  M"!I tTvbap "M 'aTvbap )A;S")I;G unnr
-;!""
 
!or All Entries *!AE,
!or All Entries is an S= syntaH in ABA to support array selects
Ko' to e44iciently 'rite a \" A -;)I-S] in ABA<
[ 1 )he ,river table cannot be e6pty )his 'oul, cause one 4ull table scan
2 In general5 eep the ,river table as s6all an, uni8ue @in regar,s to the 4iel,s that 'oul, be
nee,e, 4or re4erencing in the A- as possible I4 ,uplicate entries are not ,elete,5 i,entical ,ata
is rea, unnecessarily 4ro6 the ,atabase
3 I4 A- is use,5 the selecte, 4iel, list 6ust be a superset o4 all the ey 4iel,s o4 the ,atabase
tables use, in S= )his is absolutely re8uire, to avoi, ,ata loss since the !B inter4ace in (3
returns uni8ue sets o4 the result set to the application progra6 ailing to ensure this 6ay cause
proble6s 'hen you 'ant to get all recor,s 4ro6 a ,atabase table that 6atch a certain con,ition
* Avoi, using A- on a s6all !B table @lie con4ig tables )his coul, potentially cause 4ull table
scans 4or each A- pacet -ven i4 it ,oes in,eH range scan5 it is better to get ,ata 4ro6 the
 
!or All Entries *!AE,
 
. Al'ays use A- in con#unction 'ith a !B in,eH other'ise it 'oul, cause 6ultiple 4ull table scans @one table scan 4or each !B pacet or 6ultiple ine44icient in,eH range scans
/ )he 4irst 4iel,@s o4 the !B in,eH shoul, re4er to the 4iel,s o4 the A- ,river table in the S=
:K-- clause
7 A- 'ors best 'hen retrieving a s6all percentage o4 ,ata 4ro6 a !atabase table :hen a large
percentage o4 ,ata is nee,e,5 consi,er getting ,ata out o4 the !B table 'ithout A- i6ple6entation5
an, then ,o a,,itional 4iltration in your application
 
+E&&A%E&
Green
- -rror Botto6 o4 the selection screen
e,
ello'
 
+E&&A%E& *Contd-,
S&&& Success &&& A success 6essage ,oes not necessarily 6ean that an action 'as
success4ul It #ust ,eter6ines the place6ent o4 the 6essage an, ,oes not restrict the
user 4ro6 going on to the neHt screen
I &&&&& In4or6ation &&&& )his 6essage is ,isplaye, on the current screen in a ,ialog boH
)he user cannot 6ae any changes to the values in the current screen 5 A4ter pressing
the -nter ey on the ,ialog boH the user 'ill be taen to the neHt screen @4urther
processing is allo'e,
 A&&&&&&&& Aben, &&&& )he Aben, 6essage is ,isplaye, on the current screen in a ,ialog
boH 5 the user cannot 6ae any changes to the values on the current screen 5 a4ter
 
+E&&A%E& *Contd-,
:&&&&&&& :arning&&& )he 'arning 6essage is ,isplaye, at the botto6 o4 the current
screen 5 the user can 6ae changes to the values o4 the current screen 5 but ,oes not
have to 6ae any changes
-&&&& -rror &&& )he error 6essage is ,isplaye, at the botto6 o4 the screen )he user
6ust 6ae changes to the values on the current screen A4ter pressing the -nter eyE
on the current screen 5 the user 'ill be taen to the neHt screen only i4 the appropriate
correction is 6a,e on the current screen
 
+E&&A%E& *Contd-,
It is reco66en,e, that 'e shoul, use an -" 6essage in S--C)I";&SC--;
@4or S--C)I";&SC--; vali,ation to ensure that 'e provi,e vali, inputs be4ore
procee,ing 4urther
In S)A)&"&S--C)I"; 'e shoul, use I;"MA)I"; 6essage an, not -"
6essage because using the -" 6essage 'ill not allo' the user to navigate to the
previous screen @selection screen to 6ae necessary input changes
 A4ter the in4or6ation 6essage 'e 6ust also use the P-A- IS)&"C-SSI;GP
co66an, in or,er to stop 4urther eHecution so that be4ore processing 4urther 'e 6ae
the necessary changes
$tility o2 using te5t ele.ents(
:hile 'riting our co,es 'e 6ust use teHt ele6ents instea, o4 har, co,e, teHt
)his beco6es 6an,atory 'hen an entire co,e is to be translate, to so6e other language
or eHa6ple consi,er that a co,e is 'ritten in -nglish an, no' 'e 'ant to translate it into Spanish
:e go to G")"&&W)A;SA)I"; an, enter the original language an, target language
!oing this 'ill translate the co,e to the target language i4 the language is available on the server but the har, co,e, teHt 'ill re6ain as it is
Kence 4or the har, co,e, teHts<
irst 'e 6ust create teHt ele6ent @G")"&&W)-N) --M-;)S or ,ouble clic on the har, co,e, teHt an, assign the har, co,e, teHts to ,i44erent teHt nu6bers
 
 
Additional Progra. Docu.entation
popup&W!ocu6ent&&W+ploa,
popup&WGo to&&WChange -,itor
 
De)ugging (
 
DEB$%%I% ( *COTD,
.< &ingle &tep< -Hecutes the report line by line )his is use4ul i4 the user 'ants to see
the progra6 eHecute one line at a ti6e
/< E5ecute< rocesses all o4 the steps associate, 'ith one line o4 co,e or eHa6ple5
one line o4 co,e 6ay be a call to a subroutine -Hecute 'ill process that line 'ithout
sho'ing all o4 the activities insi,e the subroutine
 
DEB$%%I% ( *COTD,
DEB$%%I% ( *COTD,
or eg initially the cursor 'as in line no 2? an, on pressing 4/ the cursor 6oves
,irectly to line 32 ie5 it eHecutes the entire bloc o4 co,es insi,e the subroutine vali,ate
plant at one go
7< eturn< eturns the user to 'here the calling progra6 resu6es control a4ter a
calle, routine(4unction call etc
>< Continue< rocesses all state6ents until a breapoint or the en, o4 the progra6 is
reache, I4 no breapoints eHist5 the syste6 'ill eHecute the report in its entirety 'ithout
stopping
DEB$%%I% ( *COTD,
I.portance o2 WATC#POIT ( 
Suppose that 'hile troubleshooting a particular co,e5 instea, o4 analy9ing an, eHecuting
step by step or 6anually setting a breapoint 'e 'ant the progra6 to stop eHecution or
a breapoint to be set 'hen a certain con,ition is 4ul4ille, 4or eHa6ple 'hen a variable
achieves a particular value or loses a particular value
-g In the ,ebugging 6o,e o4 our co,e the current value o4 S&S+BC is 0
 Case1: ;o' 'e 'ant the progra6 4lo' to stop 'hen S&S+BC changes to any other
value so 'e set a 'atch point as 4ollo's<
Go to ,ebugging 6o,e&&&&Wbrea('atch points &&&&W 'atch points&&&Wcreate
 A4ter that 'e get a popup 'here 'e can enter the variable na6e @in this eg it is S&
S+BC
DEB$%%I% ( *COTD,
DEB$%%I% ( *COTD,
 Case2: I4 'e 'ant 'e 'ant the progra6 4lo' to stop 'hen S&S+BC changes to a
 particular value say * then 'e 6ust clic on the ;o A,,itional Con,ition button an, enter
 
DEB$%%I% ( *COTD,
DEB$%%I% ( *COTD,
BREA8POIT (
It is also possible to set breapoints at certain ABA Co66an,s
or instance 'e enter an invali, input at any o4 the selection screen inputs an, on ,oing
so an error 6essage is thro'n ;o' 'e 'ish to go to that part o4 the co,e 'hich is
responsible 4or thro'ing this 6essage )his can be 6a,e possible by using Breakpoints
at ABAP Commands.
DEB$%%I% ( *COTD,
DEB$%%I% ( *COTD,
&AVI% ; "OADI% DEB$%%ER (
:henever 'e eep our co,e in the ,ebugging 6o,e 'ithout using it then a4ter so6eti6e
@ti6eout the ,ebugging session eHpires an, conse8uently all the breapoints('atch
points that 'e have save, also eHpires Kence in or,er to avoi, this 'e can save the
,ebugger be4ore leaving the ,ebugging session
A)K<
DEB$%%I% ( *COTD,
DEB$%%I%(*COTD,
DEB$%%I%( *COTD,
Si6ilarly 'e can loa, the ,ebugger session that 'e have save, 'hen 'e 'ant
A)K<
 
DEB$%%I%( *COTD,
&1&TE+ "AD&CAPE(
an,scape is lie a layout o4 the servers or so6e 6ay even call it the architecture o4 the
servers
 A typical syste6 lan,scape loos lie the 4ollo'ing<
De3elop.ent
&er3er 
De3elop.ent &er3er( :e create our ob#ects @reports(s6art 4or6s(,ata ,ictionary
ob#ects etc in this server an, then transport it to test server
Testing0QA ser3er( !i44erent types o4 testing are per4or6e, here<
 
 ABA !ictionary "b#ects $ %an&2007>7
&1&TE+ "AD&CAPE ( *COTD,
Preproduction ser3er( )his is optional I4 this server is present then S) @Stress er4or6ance testing an, Cutover testing is ,one here
Production ser3er(  )his is the last( 6ost re4ine, client 'here the user 'ill 'or a4ter pro#ect G" I- Any changes( ne' ,evelop6ent is ,one is ,evelop6ent client an, the re8uest is transporte, to pro,uction
 A re8uest 'ill 4lo' 4ro6 !ev&W=ual&Wro, an, not bac'ar,s
DE+O &1&TE+ "AD&CAPE (
M-;+ A)K < )A;SAC)I"; ^ S)MS
 
PAC8A%E
  A pacage is a logical 4ol,er in, o4 thing that contains a group o4 logically relate,
,evelop6ent ob#ects
:hen entering a con4iguration(creating a ,evelop6ent ob#ect5 the SA 'ill pro6pt the
user 4or a Change e8uest
I4 the user alrea,y has an outstan,ing Change e8uest that he(she 'oul, lie to place
the custo6i9ing(,evelop6ent change in5 the \"'n e8uests] button can be selecte,
)his 'ill provi,e the user 'ith a tree structure vie' o4 all re8uests 'ith 'hich that user is
associate, ro6 there5 the user 6ay select the appropriate re8uest in 'hich to inclu,e
the custo6i9ing(,evelop6ent change
By selecting the \Create e8uest] button5 a ne' Change e8uest 'ill be generate,5 an,
a )as 'ithin the ne' re8uest 'ill be generate,
 
TE&TI%(
 A $nit testing(  ABA +nit is a test tool integrate, in the ABA runti6e environ6ent that you can use 4or eHecuting 6o,ule tests & that is5 4or checing the 4unctions o4 co,e sections in a progra6
+nit testing is ,one in bit an, pieces ie eg in S! stan,ar, or,er cycle 'e ,o have 1& Create "r,er5 2&!elivery5 3&)rans4er "r,er5 *&GI an, .&Invoice So 'e 'ill be testing 152535* an, . separately one by one using test cases an, test ,ata :e 'ill not be checing an, testing any integration bet'een or,er an, ,elivery ,elivery an, )rans4er "r,er )rans4er "r,er an, GI an, then invoice
B Integration testing (  A so4t'are syste6 is co6pose, o4 one or 6ore subsyste6s5 'hich are co6pose, o4 one or 6ore units @'hich are co6pose, o4 one or 6ore 6o,ules Integration is the process o4 buil,ing a so4t'are syste6 by co6bining subsyste6s into a 'oring entity Integration o4 subsyste6s shoul, procee, in an or,erly se8uence )his allo's the operational capabilities o4 the so4t'are to be ,e6onstrate, early an, thus gives visible evi,ence that the pro#ect is progressing
Integration testing 4ocuses on testing 6ultiple 6o,ules 'oring together It tests the reliability an, 4unctionality o4 groups o4 units @6o,ules that have been co6bine, together into larger seg6ents )he 6ost e44icient 6etho, o4 integration is to slo'ly an, progressively co6bine the separate 6o,ules into s6all seg6ents rather than 6erging all o4 the units into one large co6ponent
 
)-SI;G <@C";)!
O)<ecti3es(
1W)o chec that all ,ata eHchange, across an inter4ace agree 'ith the ,ata structure
speci4ications
3W)o chec the ,ata reliability
*W)o chec all the co66unication ,elays
 
TE&TI%( *contd-,
C, &PT *&TRE&& PER!OR+ACE TE&TI%, (  er4or6ance )est an, oa, ( Stress )est ,eter6ine the ability o4 the application to per4or6 'hile un,er loa, !uring Stress(oa, testing the tester atte6pts to stress or loa, an aspect o4 the syste6 to the point o4 4ailure & the goal being to ,eter6ine 'ea points in the syste6 architecture )he tester i,enti4ies pea loa, con,itions at 'hich the progra6 'ill 4ail to han,le re8uire, processing loa,s 'ithin re8uire, ti6e spans !uring er4or6ance testing the tester ,esigns test case scenarios to ,eter6ine i4 the syste6 6eets the state, per4or6ance criteria @ie A ogin re8uest shall be respon,e, to in 1 secon, or less un,er a typical ,aily loa, o4 1000 re8uests per 6inute In both cases the tester is trying to ,eter6ine the capacity o4 the syste6 un,er a no'n set o4 con,itions )he sa6e set o4 tools an, testing techni8ues can be applie, 4or both types o4 capacity testing & only the goal o4 the test changes
 
Testing &trategies (
$nit Testing Plan *$TP, (
In the technical speci4ication 'e have Unit Testing Plan section 'hich loos lie sho'n
belo'
;or6al unctionality & test cases that ensure the 'or4lo' 4unctions as it shoul, @eg
up,ates 4iel,s correctly5 processes all recor,s
 
Testing &trategies ( *COTD,
Re.arks
1)est nor6al eHecution o4 the report using vali, selection con,itions
1 -nter vali, selection con,itions on the selection screen an, eHecute
 An A gri, report o4 6aterial 6aster ,etails
 
Testing &trategies ( *COTD,
@eg ,o not process Govern6ent Marets
custo6ers5 only process pre&pacs
eHceptions are so6e specials con,itions
that restrict the eHecution
Testing &trategies ( *COTD,
errors @eg Custo6er not 4oun,5 ecor,
alrea,y eHists
1 -nter invali, lantE
 
Testing &trategies ( *COTD,
!e4aults
Chec return co,es
!atabase up,ates(6o,i4ications are correct
Sorts are correct
Subtitles are correct
 Any roun,ing is occurring correctly
 Any truncation is occurring correctly
I4 there is no ,ata to be ,isplaye,5 an appropriate 6essage occurs
 
Testing &trategies ( *COTD,
%eneral tests 6hile coding (
:henever 'e 'rite our co,e 'e eep on testing a4ter certain steps in or,er to 6ae or
co,e 6ore syste6atic
or eHa6ple i4 'e have a si6ple ob#ect 'here 'e enter so6e inputs on the selection
 
Testing &trategies ( *COTD,
irst 'e chec the vali,ations or this 'e go to the event at selection-screen an, test
the vali,ations o4 each 4iel, in,ivi,ually :e test 'hether proper error 6essages are
thro'n on entering 'rong inputs etc
 A4ter that 'e chec 'hether the internal tables are populate, or not an, ,epen,ing on
that proper 6essage shoul, be thro'n or this 'e go to the ,ebugging 6o,e an,
inspect the internal tables
Testing &trategies ( *COTD,
TRA&PORT REQ$E&T (
 )ransports o4 changes by the C)S allo' you to ,evelop in one environ6ent5 test your
,evelop6ent 'or in a test environ6ent5 an, then5 i4 the tests are success4ul5 use it
pro,uctively )his 6aes sure that pro,uctive operations are not place, at ris by 4aulty
settings or progra6 errors
 )he C)S recor,s all changes in change re8uests )he changes in change re8uests can
be line, together logically5 or can be co6pletely in,epen,ent o4 each other !evelopers
in a tea6 can use a co66on re8uest ou can create ,ocu6entation 4or a change
re8uest5 'here you can ,escribe your changes in 6ore ,etail )his 6aes it easier to
 
 ABA !ictionary "b#ects $ %an&2007102
TRA&PORT REQ$E&T ( *COTD,
 Customizing request: +n,er this re8uest type 'e have the re8uests that are assigne,
to client&speci4ic ob#ects
 Workbench request: +n,er this re8uest type 'e have the re8uests that are assigne, to
cross&client ob#ects
Transaction Codes
S-3> ABA -,itor 
 
Transaction Codes *Contd-,
SM12 !isplay an, !elete ocs
S-1> Business A,,&Ins< !e4initions
S-1? Business A,,&Ins< I6ple6entations
S-2* Class Buil,er 
S=01 SA =uery< Maintain 8ueries

Recommended