Introductory Statements for Programs

11
ABAP Keyword Documentation SAP NetWeaver AS ABAP Release 731, ©Copyright 2015 SAP AG All rights reserve! " #$tro!%&tory State'e$ts (or Progra's " R)P*R+ PR*GRA -.NC+#*N/P** C ASS/P** #N+)R-AC)/P** + P)/P** Introductory Statements for Programs +he i$tro!%&tory state'e$ts (or progra's are REPORT PROGRAM FUNCTION-POOL CLASS-POOL INTERFACE-POOL TYPE-POOL +he i$tro!%&tory state'e$t o( ea&h progra' !epe$!s o$ the progra' type spe&i(ie! i$ the progra' attri All state'e$ts that (ollo4 the i$tro!%&tory state'e$ts i$ the so%r&e &o!e or are i$&l%!e! as i$&l%!e p are ha$!le! as a si$gle %$it y ABAP Co'piler +he (irst state'e$t o( every i$!epe$!e$t ABAP progra' '%st e a$ i$tro!%&tory state'e$t, a$! ea&h prog &a$ o$ly &o$tai$ o$e o( these state'e$ts +he o$ly other state'e$t allo4e! i$ the (irst positio$ alo$ i$tro!%&tory state'e$t6 is the INCLUDE state'e$t #$ this &ase, a$ i$tro!%&tory state'e$t (or a progra' '%st appear i$ the (irst positio$ o( the progra' a(ter the i$&l%!e progra' has ee$ resolve! 4he$ the progr ge$erate! ) e&%ta le progra's, 'o!%le pools, (%$&tio$ gro%ps, &lass pools, i$ter(a&e pools, s% ro%ti$e pools, a gro%ps are sta$!alo$e &o'pilatio$ %$its #$&l%!e progra's, o$ the other ha$!, are are o$ly %se! i$ the o( o( &o'pilatio$ %$its +ype gro%ps, also 8$o4$ as type pools, are sta$!alo$e progra's (ro' a logi&al poi$t o( vie4 9o4ever, $ot &o$tai$ e e&%ta le &o!e %t o$ly type !e(i$itio$s a$! &o$sta$t !e(i$itio$s -or this reaso$, type have their o4$ i$tro!%&tory progra' state'e$t, the TYPE-POOL

description

Introductory Statements for Programs

Transcript of Introductory Statements for Programs

 
ABAP Keyword Documentation SAP NetWeaver AS ABAP Release 731, ©Copyright 2015 SAP AG All rights reserve!
  "  #$tro!%&tory State'e$ts (or Progra's 
"  R)P*R+ 
PR*GRA 
-.NC+#*N/P** 
CASS/P** 
#N+)R-AC)/P** 
• REPORT 
• PROGRAM  
• FUNCTION-POOL 
• CLASS-POOL 
• INTERFACE-POOL 
• TYPE-POOL 
+he i$tro!%&tory state'e$t o( ea&h progra' !epe$!s o$ the progra' type spe&i(ie! i$ the progra' attri%tes
 All state'e$ts that (ollo4 the i$tro!%&tory state'e$ts i$ the so%r&e &o!e or are i$&l%!e! as i$&l%!e progra's  are ha$!le! as a si$gle %$it y ABAP Co'piler
+he (irst state'e$t o( every i$!epe$!e$t ABAP progra' '%st e a$ i$tro!%&tory state'e$t, a$! ea&h progra' &a$ o$ly &o$tai$ o$e o( these state'e$ts +he o$ly other state'e$t allo4e! i$ the (irst positio$ alo$gsi!e the i$tro!%&tory state'e$t6 is the INCLUDE state'e$t #$ this &ase, a$ i$tro!%&tory state'e$t (or a progra' '%st
appear i$ the (irst positio$ o( the progra' a(ter the i$&l%!e progra' has ee$ resolve! 4he$ the progra' is ge$erate!
)e&%tale progra's, 'o!%le pools, (%$&tio$ gro%ps, &lass pools, i$ter(a&e pools, s%ro%ti$e pools, a$! type gro%ps are sta$!alo$e &o'pilatio$ %$its #$&l%!e progra's, o$ the other ha$!, are are o$ly %se! i$ the &o$tet o( o( &o'pilatio$ %$its
+ype gro%ps, also 8$o4$ as type pools, are sta$!alo$e progra's (ro' a logi&al poi$t o( vie4 9o4ever, they !o $ot &o$tai$ ee&%tale &o!e %t o$ly type !e(i$itio$s a$! &o$sta$t !e(i$itio$s -or this reaso$, type gro%ps have their o4$ i$tro!%&tory progra' state'e$t, the TYPE-POOL
Note
#t is $ot oligatory, (ro' a sy$ta poi$t o( vie4, to assig$ i$tro!%&tory progra' state'e$ts to the progra' types !e(i$e! i$ the progra' attri%tes 9o4ever, yo% sho%l! al4ays %se the assig$'e$ts liste! i$ the (ollo4i$g se&tio$s Whe$ a progra' is &reate!, the s%itale state'e$t is a%to'ati&ally ge$erate! y ABAP Wor8e$&h a$! sho%l! e &ha$ge! o$ly i$ the a!!itio$s, 4he$ e!iti$g #$ parti&%lar, the 8ey4or!s FUNCTION-POOL,
CLASS-POOL, INTERFACE-POOL, a$! TYPE-POOL sho%l! e &reate! solely y the respe&tive tools o( ABAP
Wor8e$&h a$! $ever e e$tere! i$ the so%r&e tet the'selves, i$ or!er to avoi! %$epe&te! syste' ehavior
REPORT
Extras:
Effect
+he state'e$t REPORT i$tro!%&es a$ ee&%tale progra' #t '%st e the (irst state'e$t o( a sta$!alo$e
progra' a(ter the triggeri$g o( possile i$&l%!e progra's o% '%st spe&i(y the $a'e rep !ire&tly o% &a$ %se
the optio$al a!!itio$ list_options to i$(l%e$&e the asi& list o( the progra' A 'essage &lass &a$ e
spe&i(ie! %si$g MESSAGE-ID
+he a!!itio$ DEFINING DATA"ASE is %se! to !e(i$e a logi&al !ataase, 4hereas REDUCED FUNCTIONALITY sho%!l o$ly e %se! (or PROGRAM 
Notes
• #$ the aove state'e$t, yo% &a$ repla&e the 8ey 4or! REPORT 4ith the 8ey 4or! PROGRAM  #$ ee&%tale progra's, PROGRAM  'ea$s the sa'e as REPORT a$! &a$ e %se! 4ith the a!!itio$s o(
R)P*R+ As a r%le, o$ly i$itiate ee&%tale progra's %si$g REPORT
•  Altho%gh yo% !o $ot asol%tely $ee! to spe&i(y the $a'e rep, yo% sho%l! al4ays %se the $a'e o( the
 ABAP progra' (ro' the Repository
 
Effect
+his a!!itio$ spe&i(ies a 'essage &lass i!  that, i$ the progra', allo4s the %se o( short(or's o( the state'e$t
 MESSAGE i$ 4hi&h o$ly the 'essage type a$! 'essage $%'er are spe&i(ie! +he 'essage &lass '%st e
spe&i(ie! !ire&tly a$! appear i$ the &ol%'$ ARBGB o( the !ataase tale +100 +he variatio$s o( state'e$t  MESSAGE, i$ 4hi&h the 'essage &lass is spe&i(ie!, overri!e the a!!itio$ MESSAGE-ID
Exam!"e
:e(a%lt setti$g o( the 'essage &lass ;<<)SSAG)S (or the progra' ;<<R)P*R+
REPORT %_&_report MESSAGE-ID %_&_ess'(es$ 
Effect
+his a!!itio$ is o$ly i$te$!e! (or the PROGRAM  state'e$t i$ s%ro%ti$e pools
REPORT $ "ist%o!tions
Short Re(ere$&e 
$$$ [NO STANDARD PAGE )EADING] [LINE-SI*E +i!t,] [LINE-COUNT p'(e_lines[.ooter_lines/]] $$$ $ 
Extras:
2 $$$ LINE-SI*E +i!t, 
3 $$$ LINE-COUNT p'(e_lines[.ooter_lines/] 
 
+hese a!!itio$s i$(l%e$&e the asi& list o( the progra'
Addition
Effect
+his a!!itio$ s%ppresses the o%tp%t o( the sta$!ar! page hea!er  sta$!ar! hea!er a$! &ol%'$ hea!ers6 o$ the asi& list o( the progra' a$! sets the syste' (iel! s&-+titl to the val%e =N= o% &a$ over4rite this
setti$g !%ri$g list &reatio$ 4ith the a!!itio$s NO-TITLE01IT)-TITLE a$! NO-)EADING01IT)-)EADING to the NE1-PAGE state'e$t
Addition #
Effect
+his a!!itio$ spe&i(ies the li$e 4i!th o( the asi& list a$! !etails list o( the progra' to +i!t, &hara&ters, a$!
sets the syste' (iel! s&-lins% to this val%e +he li$e 4i!th !eter'i$es the $%'er o( &hara&ters i$ the li$e
%((er as 4ell as the $%'er o( &ol%'$s i$ the list !isplaye! +he val%e +i!t, '%st e spe&i(ie! !ire&tly as a
positive $%'er +he 'ai'%' li$e 4i!th is 1023
Whe$ the LINE-SI*E is $ot spe&i(ie!, the li$e 4i!th o( the asi& list is set to a sta$!ar! 4i!th ase! o$ the
4i$!o4 4i!th o( the &%rre$t :y$pro, %t is at least as 4i!e as a sta$!ar! si>e SAP 4i$!o4 -or the sta$!ar! 4i!th, the &o$te$ts o( s&-lins% is 0 +he LINE-SI*E over4rites the val%e o( the li8e/$a'e! LINE-SI*E  a!!itio$ to the state'e$t SU"MIT a$! &a$ e over4ritte$ !%ri$g list &reatio$ 4ith the li8e/$a'e! LINE-SI*E  a!!itio$ to the state'e$t NE1-PAGE
Note
+he &%rre$t 'ai'%' li$e 4i!th is store! i$ the &o$sta$ts S#S+<A?<#N)S#;) o( the type gro%p S#S+  Also !e(i$e! there is a type S#S+<A?<#S+#N) o( type 2 4ith le$gth S#S+<A?<#N)S#;)
Addition &
Effect
+his a!!itio$ spe&i(ies the page le$gth (or the asi& list o( the progra' to p'(e_lines li$es a$! (ills the
syste' (iel! s&-lin2t 4ith this val%e #( LINE-COUNT is $ot spe&i(ie! a$! (or p'(e_lines less tha$ 0 or
greater tha$ @0000, the page le$gth is set i$ter$ally to @0000 +his setti$g over4rites the val%e passe! y the si'ilarly $a'e!6 a!!itio$ LINE-SI*E o( the state'e$t SU"MIT a$! &a$ e over4ritte$ 4he$ the list is &reate!
y the si'ilarly $a'e!6 a!!itio$ LINE-COUNT o( the state'e$t NE1-PAGE
#( yo% &hoose to spe&i(y a $%'er (or .ooter_lines, a &orrespo$!i$g $%'er o( li$es are reserve! (or the
page (ooter , 4hi&h &a$ e !es&rie! i$ the eve$t lo&8 END-OF-PAGE
 p'(e_lines a$! .ooter_lines '%st e spe&i(ie! !ire&tly as positive $%'ers, 4here $o sig$ &a$ e
spe&i(ie! (or .ooter_lines
Notes
• -or s&ree$ lists, yo% sho%l! %se the sta$!ar! val%e si$&e, as a r%le, page rea8s !e(a%lte! thro%gh
LINE-COUNT are $ot a!%ste! to the 4i$!o4 si>e
• o% sho%l! also %se the sta$!ar! val%e (or pri$t lists, so that yo% &a$ still sele&t the page si>e o$ a
pri$ter/spe&i(i& asis A pri$t list sho%l! e &reate! i$ s%&h a 4ay that it provi!es satis(a&tory res%lts (or  a$y page si>e
• Spe&i(yi$g a (ie! li$e &o%$t is o$ly %se(%l (or (or'/li8e lists 4ith a (ie! page layo%t 9ere, ho4ever,
yo% sho%l! al4ays &he&8 4hether s%&h (or's &a$ e &reate! y other 'ea$s, s%&h as SAPS&ript (or's
Exam!"e
+he page le$gth o( the asi& list is set to @5 li$es, eight o( 4hi&h are reserve! (or the page (ooter +he li$e 4i!th is 132 &hara&ters
REPORT %_&report LINE-COUNT 345/ LINE-SI*E 678$
PRO'RA(
Addition:
Effect
+he state'e$t PROGRAM  i$itiates a 'o!%le pool or a s%ro%ti$e pool #t '%st e the (irst state'e$t o( a
sta$!alo$e progra' a(ter the triggeri$g o( possile i$&l%!e progra's o% '%st spe&i(y the $a'e pro( !ire&tly
+he (ollo4i$g applies (or the a!!itio$s
• #$ 'o!%le pools, the a!!itio$s list_options a$! MESSAGE-ID o( the PROGRAM  state'e$t have the
 
• #$ s%ro%ti$e pools, the spe&i(i&atio$ o( MESSAGE-ID has the sa'e 'ea$i$g as 4ith the state'e$t
REPORT +he possile a!!itio$s list_options (or the asi& list are ig$ore!, si$&e s%ro%ti$e pools
!o $ot have a separate list %((er  *%tp%t state'e$ts i$ s%ro%ti$e pools 4rite to the &%rre$t list o( the &alli$g 'ai$ progra' +he a!!itio$ REDUCED FUNCTIONALITY o$ly 4or8s i$ s%ro%ti$e pools
Notes
• #$ the aove state'e$t, yo% &a$ repla&e the 8ey 4or! PROGRAM  4ith the 8ey 4or! REPORT #$ 'o!%le
pools or s%ro%ti$e pools, REPORT has the sa'e 'ea$i$g as PROGRAM  a$! &a$ e %se! 4ith its
a!!itio$s As a r%le, yo% sho%l! i$itiate 'o!%le pools a$! s%ro%ti$e pools o$ly y %si$g PROGRAM 
•  Altho%gh yo% !o $ot asol%tely $ee! to spe&i(y the $a'e pro(, yo% sho%l! al4ays %se the $a'e o(
the ABAP progra' (ro' the repository
• +he $a'e o( a 'o!%le pool is $ot (ie!, %t sho%l! (ollo4 the $a'i$g &o$ve$tio$s i$ ABAP
Wor8e$&h +hese spe&i(y that the $a'e o( 'o!%le pools sho%l! start 4ith =SAP=
Addition
Effect
+his a!!itio$ o$ly has a$ e((e&t i$ progra's o( the type s%ro%ti$e pool #$ a s%ro%ti$e pool i$itiate! 4ith the a!!itio$ REDUCED FUNCTIONALITY, $ot all &o'po$e$ts that are %s%ally loa!e! 4ith a$ ABAP progra' are
loa!e! +his lea!s to a re!%&tio$ i$ the progra' loa! a$! to a lo4er 'e'ory i$ the roll area +his 'ea$s that the (%ll ABAP la$g%age ra$ge is $ot availale
• +he e'e!!e! str%&t%re s&st is $ot loa!e! #$stea! o( s&st, the str%&t%re s& 4ith the sa'e 'ea$i$g
&a$ e %se!
• +he e'e!!e! str%&t%re s2reen is $ot loa!e! +he state'e$ts LOOP AT SCREEN a$! MODIFY SCREEN are the$ $ot possile
• )!iti$g is $ot possile 4ith the !y$pros o( the 'ai$ progra' o( the &%rre$t progra' gro%p 
• No s%pport is availale (or list pri$ti$g +he &orrespo$!i$g a!!itio$s o( the state'e$ts NE1-PAGE a$!
SU"MIT &a$$ot e &ha$ge!
#( $o$e o( the 'issi$g (%$&tio$ality is re%ire!, yo% &a$ %se the REDUCED FUNCTIONALITY a!!itio$ to avoi!
the %$$e&essary reso%r&e &o$s%'ptio$ o( s%ro%ti$e pools
Notes
• +he REDUCED FUNCTIONALITY a!!itio$ also 4or8s i$ s%ro%ti$e pools 4hi&h 4ere &reate! 4ith
GENERATE SU"ROUTINE POOL
• +he %se o( REDUCED FUNCTIONALITY is espe&ially re&o''e$!e! (or s'all s%ro%ti$e pools 4hi&h
o$ly &o$tai$ si'ple help pro&e!%res
 
• +he %se o( REDUCED FUNCTIONALITY i$ a s%ro%ti$e pool lea!s to a 4ar$i$g (ro' the sy$ta &he&8,
poi$ti$g o%t that the e$tire ABAP ra$ge is $ot availale #( (%$&tio$ality 4hi&h is $ot prese$t is %se!, &orrespo$!i$g sy$ta errors o&&%r
)*N+TION$POO,
Effect
+he FUNCTION-POOL state'e$t i$tro!%&es a (%$&tio$ gro%p A(ter the epa$sio$ o( a$y eisti$g i$&l%!e
progra's, it '%st e the (irst state'e$t o( a sta$!alo$e progra' +he a!!itio$s o( theFUNCTION-POOL  state'e$t have the sa'e 'ea$i$g as the a!!itio$s o( the REPORT state'e$t
o% %se the -%$&tio$ B%il!er  o( the ABAP Wor8e$&h to 'ai$tai$ the (%$&tio$ gro%ps +he Wor8e$&h a%to'ati&ally ge$erates a (ra'e4or8 progra' a$! the i$&l%!e progra's liste! elo4 +he FUNCTION-POOL  state'e$t is &reate! i$ a top i$&l%!e
+he &o'plete $a'e o( a (ra'e4or8 progra' o( a (%$&tio$ gro%p i$ the Repository &o$sists o( the pre(i SAP a$! the $a'e .pool o( the FUNCTION-POOL state'e$t
 A (%$&tio$ gro%p serves as a (ra'e (or (%$&tio$ 'o!%les a$! is orga$i>e! i$ i$&l%!e progra's as (ollo4s
• *$e top i$&l%!e 4ith the pre(i == a$! the e$!i$g =+*P= i$ the !e&laratio$ se&tio$ o( the (%$&tio$
gro%p
• *ptio$al i$&l%!e progra's 4ith the pre(i == a$! the e$!i$g =:= (or the !e&laratio$ o( lo&al &lasses
4ithi$ the top i$&l%!e
• *$e i$&l%!e progra' 4ith the pre(i == a$! the e$!i$g =.??= i$ the i'ple'e$tatio$ se&tio$ o( the
(%$&tio$ gro%p +his i$&l%!e progra' i$&l%!es i$&l%!e progra's 4ith the e$!i$g =.= (or i'ple'e$ti$g ea&h (%$&tio$ 'o!%le o( the (%$&tio$ gro%p +his str%&t%re '%st $ot e &ha$ge!
• *ptio$al i$&l%!e progra's 4ith the pre(i == a$! the e$!i$g =P= (or i'ple'e$ti$g the 'etho!s o(
lo&al &lasses i$ the i'ple'e$tatio$ se&tio$ o( the (%$&tio$ gro%p
• *ptio$al i$&l%!e progra's 4ith the pre(i == a$! the e$!i$g =*= (or i'ple'e$ti$g PB* 'o!%les i$
the i'ple'e$tatio$ se&tio$ o( the (%$&tio$ gro%p
• *ptio$al i$&l%!e progra's 4ith the pre(i == a$! the e$!i$g =#= (or i'ple'e$ti$g PA# 'o!%les i$ the
i'ple'e$tatio$ se&tio$ o( the (%$&tio$ gro%p
 
• *ptio$al i$&l%!e progra's 4ith the pre(i == a$! the e$!i$g =)= (or i'ple'e$ti$g eve$t lo&8s i$ the
i'ple'e$tatio$ se&tio$ o( the (%$&tio$ gro%p
• *ptio$al i$&l%!e progra's 4ith the pre(i == a$! the e$!i$g =-= (or i'ple'e$ti$g s%ro%ti$es i$ the
i'ple'e$tatio$ se&tio$ o( the (%$&tio$ gro%p
• +he perio!s == represe$t a t4o/!igit $%'er +he (%$&tio$ality o( the -%$&tio$ B%il!er is ase! o$
a!here$&e to this $a'i$g &o$ve$tio$
Exam!"e
-%$&tio$ gro%p SAPABAP<:*C. is str%&t%re! (ro' i$&l%!e progra's
9:---------------------------------------------------------------------9 9: F;n2tion Gro;p SAPLA"AP_DOCU 9:---------------------------------------------------------------------9
INCLUDE l'#'p_!o2;;>>$ < F;n2tion Mo!;les
INCLUDE l'#'p_!o2;e=6$ < )'n!lin( o. R;ntie-E?ents@
INCLUDE l'#'p_!o2;p=6$ < Cl'ss ipleent'tions INCLUDE l'#'p_!o2;p=8$ INCLUDE l'#'p_!o2;p=7$ INCLUDE l'#'p_!o2;p=B$
+he (%$&tio$ gro%p i$&l%!es the top i$&l%!e i$ the (irst pla&e it &o$tai$s the FUNCTION-POOL state'e$t a$!
other i$&l%!e progra's (or !ata a$! &lass !e&laratio$s
9:---------------------------------------------------------------------9 9: In2l;!e LA"AP_DOCUTOP 9:---------------------------------------------------------------------9
FUNCTION-POOL '#'p_!o2;$
+,ASS$POO,
Effect
+he CLASS-POOL state'e$t i$tro!%&es a &lass pool #t '%st e the (irst state'e$t o( a sta$!alo$e progra',
a(ter a$y i$&l%!e progra's have ee$ &alle! +he MESSAGE-ID a!!itio$ o( the CLASS-POOL state'e$t has
the sa'e 'ea$i$g as (or the REPORT state'e$t
Class pools are e!ite! i$ Class B%il!er  i$ ABAP Wor8e$&h A (ra'e4or8 progra' (or a gloal &lass, a$! asso&iate! i$&l%!e progra's, are ge$erate! a%to'ati&ally +he state'e$t CLASS-POOL is &reate! i$ the
(ra'e4or8 progra'
+he (%ll $a'e o( the (ra'e4or8 progra' o( a &lass pool i$ the repository starts 4ith the $a'e o( the gloal &lass, is pa!!e! 4ith the &hara&ter =D= %p to a$! i$&l%!i$g positio$ 30, a$! e$!s 4ith =CP=
+he $a'es o( the i$&l%!e progra's o( a &lass pool i$&l%!e! y the (ra'e4or8 progra' are &o$str%&te! i$ ea&tly the sa'e 4ay as the $a'e o( the &lass pool itsel(, ho4ever they have !i((ere$t e$!i$gs .$li8e the &ase 4ith (%$&tio$ gro%ps, the a&t%al str%&t%re o( a &lass pool &o$str%&te! (ro' i$&l%!e progra's is the i$ter$al respo$siility o( ABAP Wor8e$&h a$! the ABAP r%$ti'e e$viro$'e$t a$! is $ot !isplaye! i$ Class B%il!er
Note
+he state'e$ts per'itte! i$ a &lass pool are liste! %$!er State'e$ts i$ Class Pools a$! #$ter(a&e Pools
Exam!"e
+he $a'e o( the (ra'e4or8 progra' o( the &lass pool o( the gloal &lass C<ABAP<BR*WS)R is C<ABAP<BR*WS)RDDDDDDDDDDDDDDDCP
INTER)A+E$POO,
Syntax
INTERFACE-POOL$ 
Effect
+he state'e$t INTERFACE-POOL i$tro!%&es a$ i$ter(a&e pool #t '%st e the (irst state'e$t o( a$ i$!epe$!e$t
progra' a(ter resolvi$g possile i$&l%!e progra's
 
#$ter(a&e pools are e!ite! o$ly 4ith the tool Class B%il!er  i$ ABAP Wor8e$&h A (ra'e4or8 progra' (or a gloal i$ter(a&e i$&l%!i$g the state'e$t INTERFACE-POOL is ge$erate! a%to'ati&ally
+he (%ll $a'e o( the (ra'e4or8 progra' o( a$ i$ter(a&e pool i$ the repository starts 4ith the $a'e o( the gloal i$ter(a&e, is pa!!e! 4ith the &hara&ter =D= %p to a$! i$&l%!i$g positio$ 30, a$! e$!s 4ith =#P=
+he $a'es o( the i$&l%!e progra's o( a$ i$ter(a&e pool i$&l%!e! y the (ra'e4or8 progra' are &o$str%&te! i$ ea&tly the sa'e 4ay as the $a'e o( the i$ter(a&e pool itsel(, ho4ever they have !i((ere$t e$!i$gs .$li8e the &ase 4ith (%$&tio$ gro%ps, the a&t%al str%&t%re o( a$ i$ter(a&e pool &o$str%&te! (ro' i$&l%!e progra's is the i$ter$al respo$siility o( ABAP Wor8e$&h a$! the ABAP r%$ti'e e$viro$'e$t a$! is $ot !isplaye! i$ Class B%il!er
Note
+he state'e$ts per'itte! i$ a$ i$ter(a&e pool are liste! %$!er State'e$ts i$ Class Pools a$! #$ter(a&e Pools
Exam!"e
+he $a'e o( the (ra'e4or8 progra' o( the i$ter(a&e pool o( the gloal i$ter(a&e #-<:)*<CR<CAR<R)N+<S)RE#C) is #-<:)*<CR<CAR<R)N+<S)RE#C)DD#P
T-PE$POO,
Effect
+he TYPE-POOL state'e$t i$tro!%&es a type gro%p #t '%st e the (irst state'e$t o( a type gro%p (ollo4i$g the
triggeri$g o( a$y i$&l%!e progra's o% &a$ 'ai$tai$ type gro%ps o$ly i$ ABAP :i&tio$ary i$ ABAP Wor8e$&h, 4herey a$ ABAP progra' is a%to'ati&ally ge$erate! i$&l%!i$g the TYPE-POOL state'e$t +he a&t%al $a'e
o( the progra' o( a type gro%p i$ the repository !oes $ot &o'pletely 'at&h the $a'e o( the type gro%p a$! is o( i$ter$al releva$&e o$ly
+ype gro%ps &a$ o$ly &o$tai$ the state'e$ts
• INCLUDE,
• CLASS DEFINITION $$$ DEFERRED PU"LIC 
a$! the !e&lare! !ata types, &o$sta$ts, a$! 'a&ros '%st e pre(ie! 4ith the $a'e tpool o( the type gro%p
+he ele'e$ts !e&lare! i$ a type gro%p &a$ e a!!resse! stati&ally or !y$a'i&ally y $a'e i$ every ABAP progra' i$ 4hi&h the type gro%p &a$ e %se! +his is loa!e! 4he$ a$ ele'e$t o( a type gro%p is (irst a&&esse!
Notes
• +ypes i$ type gro%ps are the pre!e&essors (or ge$eral type !e(i$itio$s i$ ABAP :i&tio$ary
• Si$&e yo% &a$ also !e(i$e !ata types a$! &o$sta$ts i$ the p%li& visiility se&tio$ o( gloal &lasses,
type gro%ps are osolete a$! sho%l! $o lo$ger e &reate! )isti$g type gro%ps &a$ still e %se!
• +o avoi! &o$(li&ts i$ the type re(ere$&e 4ith the a!!itio$ LIE, yo% '%st e$s%re that &o$sta$ts i$ type
gro%ps !o $ot have the sa'e $a'e as eisti$g (lat str%&t%res or !ataase tales i$ ABAP :i&tio$ary
• +he $a'e o( a type gro%p 'ay &o$tai$ a 'ai'%' o( (ive &hara&ters
• Previo%sly, type gro%ps ha! to e 'a!e 8$o4$ i$ ABAP progra's %si$g the TYPE-POOLS state'e$t
e(ore its ele'e$ts &o%l! e a&&esse! stati&ally or !y$a'i&ally +his restri&tio$ is $o4 osolete +he TYPE-POOLS state'e$t is $o lo$ger $e&essary
Exam!"e
+ype gro%ps 4ith the !e(i$itio$ o( a tale type
TYPE-POOL &t(r$ TYPES &t(r_sp.li_t'# TYPE )AS)ED TA"LE
OF sp.li  1IT) UNIUE EY 2'rri! 2onni!$