You are on page 1of 25

Exercises: The ABAP Dictionary !

amin "onventions

SAP R/3 Release 4.7 SAP Development ABAP Trainin

SAP has agreed to never create development objects whose names begin with a Y or a Z. SAP customers (thats you! must give all objects that they create names that do begin with a Y or a Z. !his prevents the possibility o" naming con"licts during an upgrade "rom one release o" SAP to another. Also# in the "ollowing e$ercises you will see suggested object names. %ach suggested object name will contain XX or ZZ. !o ensure that objects you create have di""erent names "rom objects that your classmates create# replace the XX or ZZ that you will see in the suggested object names with the last two digits o" your SAP &ogon '(. )*hen you are in a situation# where a dictionary object o" your selected name already e$ists in the system# then as+ the instructor i" you can delete the e$isting one# otherwise as+ him to suggest a new name "or yours., 'n short- .egin all object names with a Y or a Z# and replace the XX or ZZ with the last two digits o" your SAP logon '(.

Developer Access #eys vs. $%&ect Access #eys


!he "irst time you try to create an object in SAP# the system will respond with a dialog bo$ that says# /You are not a registered developer.0 !he dialog bo$ will prompt you "or a 123digit Developer Access #ey. !he re4uest "or a developer access +ey will only appear once. A"ter you enter the +ey correctly# you will not be prompted "or it again. 5owever# i" you try to change an SAP3delivered object (or i" you "orget to name your object beginning with a Y or a Z # you will be prompted "or an $%&ect Access #ey. !his is because SAP registers and controls all customer changes to SAP3delivered objects. '" you see this dialog bo$ during this course# you have made a mista+e6 clic+ the cancel button in the dialog bo$. 't is easy to con"use a re4uest "or a developer access +ey with a re4uest "or an object access +ey. 7ne way to remember the di""erence is to remember the phrase# /You are not a registered developer.0 '" the re4uest contains this phrase# it is as+ing "or a developer access +ey. '" it does not contain this phrase# it is as+ing "or an object access +ey.

"hapter ' Exercises


Page : 8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

!he e$ercises "or this chapter will teach you how to create and manipulate the basic objects o" the A.AP (ictionary- tables# data elements# and domains. You will also enter data into one o" your tables# and you will learn how to write a simple program that e$tracts data "rom an A.AP (ictionary table. '" you re4uire assistance at any point# please as+ an instructor. !ry to do the solutions "or the e$ercises yoursel" and i" you "ind any di""iculty consult the hands on instructor. Also# solutions are provided in this boo+# but only re"er to them as a last resort.

Exercise '.( "reate the )XXE*P ta%le.


!his table will store basic in"ormation "or all employees. All employees will have one entry in this table. Step (: ;rom SAP 'nitial Screen 3< =o to !ools 3< A.AP *or+bench 3< (evelopment 3< A.AP (ictionary (tco+e: SE(( to go to the A.AP (ictionary 'nitial Screen. Step ': >hoose (atabase table and type YXX%8P in the space provided (replacing XX with your 13digit id . !hen clic+ the >reate button.

Page 1

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

"hoose Data%ase Ta%le an+ type ),,E*P in the space provi+e+. Then clic- the "reate %.tton.

Note: !he name o" the table in the A.AP (ictionary does not have to be the same as the name o" the corresponding entity type in the data model. 5owever# in many cases# "or claritys sa+e# it may be logical to ma+e them the same. 5ere# we are naming them the same. Step 3: !he table de"inition screen appears. .egin by entering some o" the tables general attributes- short te$t# (elivery >lass# and whether or not table maintenance is allowed. %nter > "or the (elivery >lass# and clic+ on the !ab.8aint.Allowed "ield. Question 1: *hat is the primary "unction o" the (elivery >lass attribute? *hat does a value o" @> in this "ield indicate? Hint: !urning on the !ab.8aint.Allowed attribute permits the tables data to be edited by S%:A# S%::# ideally you should turn o"" !ab.8aint.Allowed and create a !able 8aintenance =enerator "or the table (See appendi$ to +now about !able 8aintenance =enerator to maintain entries through SAP !able 8aintenance !ransactions such as S8B2 and S8B:.

Page B

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

(. Enter a short +escription /or the ta%le. '. Then0 enter 1"2 the Delivery "lass. 3. 3inally0 select Display/*aintenance Allo4e+

Page C

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Step 4: De$t# enter the name o" the "irst "ield in the table. !his will be the %mployee '( Dumber. >all this "ield %8PE'(. Since this "ield is part o" the primary +ey o" this table (in "act# it is the only "ield in the primary +ey o" this table # clic+ on the Fey attribute.

Enter the /irst /iel+ name 7E*P89D:. Then clic- on the #ey attri%.te.

Hint: (epending on your monitor and depending on the "ont you have selected in SAP# you may not see very many "ields in the "ield de"inition area. Hint: Dotice that names o" customer3created fields do not have to begin with a Y or a Z. ;ields only have meaning within the particular table "or which they are de"ined# and they are not individual objects within the A.AP (ictionary. Dames o" customer3created tables# data elements# and domains# however# must begin with a Y or a Z. !ables# data elements# and domains e$ist as individual objects within the A.AP (ictionary. Step 5: De$t# enter the data element "or this "ield. 'n this case# use a new data element called YXX%8PE'(. 7nce you have entered the data element name# double3clic+ on the name o" the data element.

Enter the name o/ the +ata element 7)XXE*P9D:. Then +o.%le;clic- on the name o/ the +ata element

Step 6: (ouble3clic+ing on the name o" the data element brings up the >reate (ata %lement dialog bo$. >lic+ the green chec+ mar+ to indicate that you wish to continue creating the data element. Step 7: De$t# you see the data element de"inition tab. %nter a short te$t. !his will appear beside the name o" the "ield on the table de"inition screen. !hen# enter YXX%8P'( as the domain name.

Page 9

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

(. Enter a short +escription. '. Then0 enter )XXE*P9D as the +omain name

Step <: De$t# enter the "ield labels in the ;ield label tab. !hese are the labels that will appear on end3user screens when "ields are /painted0 onto those screens "rom the dictionary. ;ill in short# medium and long "ield labels. 't is also advisable to "ill in a /header0 label (which is used i" the "ield is painted into something +nown as a /table control0 .

Page A

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Enter /iel+s2 la%els: short0 me+i.m0 an+ lon 0 an+ a hea+er la%el

Step =: De$t# double3clic+ on the name o" the domain that you entered in Step G. >lic+ the green chec+ mar+ in the >reate (omain dialog bo$ that appears. Step (>: %nter a short te$t# and a data type and length "or the domain. You may see the various data types available by hitting ;C in the (ata type "ield. ;or this domain# use type >5AH and length :2.

Page G

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Enter a short text0 +ata type0 an+ a /iel+ len th

Step ((: Dow you are ready to activate your domain. >lic+ the activation symbol on the application toolbar. You will be prompted to enter a pac+age and a change re4uest. A"ter the domain is activated# you will see a message at the bottom o" the screen# and the status o" the domain change to /Active0 and /Saved0.

Page I

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin


"lic- the activation sym%ol

A/ter enterin a Pac-a e ? a chan e re@.est0 the stat.s o/ the +omain 4ill chan e.

Hint: A.AP (ictionary 7bjects must be activated be"ore they are visible to other objects in the system. A"ter you ma+e changes to a dictionary object# you must re3activate it. A common mista+e is to revise an object and then "orget to re3activate it. Step (': De$t# clic+ the green arrow to return to your data element. Dow that the domain has been activated# you may activate the data element. >lic+ the activation symbol. %nter your pac+age J change re4uest when prompted. You should see a message at the bottom o" the screen saying that the data element was activated# and the status will change to /Active0 and /Saved0. Step (3: >lic+ the green arrow to return to the table de"inition screen. Hint: '" you are unable to complete your wor+ on a table in one sitting# save the table without activating it (ma+e sure you are on the table de"inition screen . !o return to the table later# go to your pac+age. (rill down through (ictionary objects# and then !ables# until you see the name o" your table. (ouble3clic+ on the table name. !his will bring you bac+ to the table de"inition screen. %nter change mode by clic+ing the (isplayK3<>hange button on the toolbar. !o add new "ields to the table# clic+ the @Dew rows button. You may need to reduce the siLe o" your "ont in order "or the "ield display to wor+ appropriately.

Page M

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Display A;B "han e %.tton

To a++ ne4 /iel+s to the ta%le clic- the 1!e4 ro4s 1%.tton .

Page :2

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Step (4: >omplete the de"inition "or table YXX%8P by entering the "ollowing "ields# data elements# and domains. You will create your own data elements "or each "ield. ;or some "ields# you will use pre3de"ined domains# and "or other "ields# you will create your own domains.

3iel+ !ame &AS!EDA8% ;'HS!EDA8% 5&!5EP&AD

Data Element YXX&DA8% YXX;DA8% YXX5&!5P&D

Domain >5AH19 >5AH19 YXX5&!5P&D

Type pre3de"ined pre3de"ined DN8>

Cen th pre3de"ined pre3de"ined C

Note: !he 5&!5EP&AD "ield is to contain the '( o" the health plan the employee has selected. !his "ield will eventually point to the YXX5%A&!5 table. Note: 'n reality# this table would contain more "ields than this. !o save time# you are only creating these three "ields. Step (5: >lic+ the activation symbol. %nter your Pac+age and >hange re4uest when prompted.

Page ::

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Step (6: !he 8aintain !echnical Settings screen will appear. %nter @NS%H as the data class and @2 as the siLe category. Save the technical settings and clic+ the green arrow. You will return to the table de"inition screen# and the tables status will change to /Active0 and /Saved0.

Secon+0 clic- the save icon. Then0 clic- the reen arro4.

3irst0 enter the +ata class an+ siDe cate ory.

Page :1

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Question 2: *hat does the data class control? *hat does a value o" @NS%H indicate? Question 3: *hat does the siLe category control? 'n this case# what does a value o" @2 represent? Step (7: ;rom the table de"inition screen# clic+ the green arrow to return to the A.AP (ictionary- 'nitial Screen.

Exercise '.' "reate A++itional Ta%les


>reate the YXX5%A&!5# YXX57NH&Y# YXXSA&AH'%(# and YXXPAH!D%H tables. Nse the "ollowing "ields# data elements# and domains. !he YOO57NH&Y# YOOSA&AH'%(# and YOOPAH!D%H tables will each have one entry "or every employee assigned to that particular type o" earnings. %ach employee must belong to one and only one type o" earnings table. !he YOO5%A&!5 table has one entry "or each type o" health plan to which the employees could belong. 9mportant !ote: As o/ SAP Release 4.6"0 yo. may not have a ta%le an+ a +ata element 4ith the same name. )XXEEACTE 3iel+ !ame P&ADE'( (%S>H ADDEPH%8 #e y O Data Element YXX5&!5P&D YXX(%S>H YXXADDPH%8 Domain YXX5&!5P&D YXX(%S>H YXXADDPH%8 Type DN8> >5AH (%> Cen th C I2 A

P&ADE'( is the health plan '(. (%S>H is a description o" the health plan. ADDEPH%8 is the annual premium "or belonging to this health plan. )XXE$FRC) 3iel+ !ame %8PE'( 57NHEHA!% #ey O Data Element YXX%8P'( YXX57NHHA! Domain YXX%8P'( YXX57NHHA! Type >5AH DN8> Cen th :2 C

Even tho. h type "FRR 4o.l+ %e more appropriate /or E$FRC)8RAT0 the system 4ill not a+minister a chec- on the /ixe+ val.es that yo. 4ill create in /.t.re exercises. )o. 4ill learn ho4 to per/orm necessary chec-s pro rammatically in the next mo+.le. %8PE'( is the employee '(. 57NHEHA!% is the hourly rate the employee is paid. )XXSACAR9ED 3iel+ !ame #e y %8PE'( O SA&AHY Data Element YXX%8P'( YXXSA&AHY Domain YXX%8P'( YXXSA&AHY Type >5AH (%> Cen th :2 I

%8PE'( is the employee '(. SA&AHY is the annual salary the employee is paid.

Page :B

8arch 1229

Exercises: The ABAP Dictionary


)XXPART!ER 3iel+ !ame %8PE'( DN8ES5AH%S #e y O Data Element YXX%8P'( YXXDN8S5AH

SAP R/3 Release 4.7 SAP Development ABAP Trainin


Domain YXX%8P'( (%>G Type >5AH pre3de"ined Cen th :2 pre3de"ined

%8PE'( is the employee '(. DN8ES5AH%S is the number o" shares the partner owns.

Exercise '.3 Explicitly Cimit Gal.es /or Domains


Palid values "or domains can be restricted two ways- by e$plicitly listing (/hard3coding0 "i$ed values in the domain itsel"# and by speci"ying a value table. 5ourly employees are always paid between Q9.22 and QB9.22 per hour. %$plicitly list this restriction in the domain "or the hourly rate. Step (: ;rom SAP 'nitial Screen 3< =o to !ools 3< A.AP *or+bench 3< (evelopment 3< A.AP (ictionary (tcode- S%:: to go to the A.AP (ictionary 'nitial Screen. Step ': >hoose (omain and type YXX57NHHA! in the space provided (replacing XX with your 13digit id . Step 3: !hen clic+ the >hange button. Step 4: =o to the @Palue range tab. Step 5: %nter 9 as the lower limit and B9 as the upper limit. %nter a short te$t describing the limit.

Step 6: >lic+ the Save icon to save your changes. !hen clic+ the green arrow to return to the primary domain de"inition screen. Step 7: >lic+ the activation symbol to re3activate your domain.

Exercise '.4 Cimit a Domain2s Gal.es %y Fsin a Gal.e Ta%le

Page :C

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

!he only valid employee '(s are the ones contains in the YXX%8P table. >hange the YXX%8P'( domain so that the value table is listed as YXX%8P. Step (: Proceed to the de"inition screen "or domain YXX%8P'(. %nter change mode. Step ': %nter YXX%8P as the value table in the space provided (about hal"way down the screen .

Step 3: He3activate your domain. Similarly# the only valid health plan '(s are those that are listed in the YXX5%A&!5 table. Step 4: 8odi"y domain YXX5&!5P&D so that the value table is YXX5%A&!5. He3activate the domain when you are "inished.

"hapter 3 Exercises
'n the previous e$ercises# you established the basic objects to be used "or a simpli"ied payroll processing system. 'n addition to establishing the tables# data elements# and domains# you also established value tables "or certain domains in order to ensure data integrity within the system. Dow you will ta+e this a step "urther by establishing appropriate "oreign +eys in the A.AP (ictionary.

Exercise 3.( Esta%lish a 3orei n #ey Relationship %et4een the )XXE*P an+ the )XXE$FRC) Ta%les
Step (: Proceed to the dictionary de"inition o" the YXX57NH&Y table. %nter change mode. Step ': %stablish a "oreign +ey relationship to the YXX%8P table on the %8PE'( "ield. .e sure to speci"y the appropriate cardinality and "oreign +ey "ield type Step 3: *hen you are "inished# re3activate the YXX57NH&Y table.

Page :9

8arch 1229

SAP R/3 Release 4.7 Exercises: The ABAP Dictionary SAP Development ABAP Trainin Exercise 3.' Esta%lish 3orei n #ey Relationships /rom Ta%les )XXSACAR)0 )XXPART!ER0 an+ )XXE*P
Step (: %stablish the "ollowing "oreign +ey relationships3rom: Ta%le YXXSA&AH'%( YXXPAH!D%H YXX%8P 3iel+ %8PE'( %8PE'( 5&!5EP&AD To: Ta%le YXX%8P YXX%8P YXX5%A&!5 3iel+ %8PE'( %8PE'( P&ADE'(

"hapter 4 Exercises
!he purpose o" these e$ercises is to give you "amiliarity with manipulating e$isting tables# their structures# and their data.

Exercise 4.( Fse o/ the Ta%le "opy "apa%ility.


7"ten times you must create a table and there is already a similar table on the database. So why reinvent the wheel? 'n the A.AP *or+bench you can create a table then copy the elements o" another table into your new table. Additionally it is possible to copy complete tables and then add "ields. Step (: ;rom SAP 'nitial Screen 3< =o to !ools 3< A.AP *or+bench 3< (evelopment 3< A.AP (ictionary (tcode- S%:: to go to the A.AP (ictionary 'nitial Screen. Step ': >hoose (atabase table and type YXX%8P in the space provided (replacing XX with your 13digit id . Step 3: >lic+ the >opy icon on the application toolbar. 'n the dialog bo$ that appears# enter YXX%8PE>P as the new table name. !hen clic+ the green chec+ mar+. Step 4: %nter your pac+age and change re4uest when prompted. Step 5: =o to S%:: again and open the newly created table YXX%8PE>P and activate it. Question 1: !o what pac+age does the SAP standard table FNDDH belongs?

Exercise 4.' "reatin 9n+exes


Page :A 8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Step (: 'n the employee table (YXX%8P # there is o"ten a need to access records by employee name. !o improve the e""iciency o" this process# create a secondary inde$ on the last name and "irst name "ields. (>reate one inde$ @DA8 that sort by last name# then by "irst name.

Exercise 4.3 A++in Data to )o.r Ta%le


;rom SAP 'nitial Screen go to Tools ;;B ABAP Hor-%ench ;;B $vervie4 ;;B Data Bro4ser (transaction S%:A to add records to your health plan and employee tables. Step (: >reate two "ictitious health plans. =ive them '(s# names (descriptions # and annual premiums. Step ': >reate three "ictitious employees. 8a+e one a partner# one a salaried employee# and one an hourly employee. =ive each one o" them# appropriate pay in"ormation. (You will need to access "our tables- YXX%8P# YXXPAH!D%H# YXXSA&AH'%(# and YXX57NH&Y. Note: 't is also possible to add entries to a table by accessing the table through your pac+age. =o into the A.AP (ictionary- >hange !ableRStructure ;ields screen and choose menu option Ftilities Ta%le contents "reate Entries.

Page :G

8arch 1229

Exercises: The ABAP Dictionary "hapter 5 Exercises

SAP R/3 Release 4.7 SAP Development ABAP Trainin

!he e$ercises "or this chapter will "amiliariLe you with creating and using structures (tables o" type 'D!!A. in SAP.

Exercise 5.( "reate an A++ress Str.ct.re


Your employee table# YXX%8P# does not yet contain in"ormation about employees addresses. .ecause address in"ormation is li+ely to be stored in several tables ("or e$ample# in customer and vendor tables as well as the employee table # you will create a structure to provide the appropriate "ield de"inition. !hat structure can then be included into the employee table# as well as into any other tables where it may be needed in the "uture. Step (: >reate the structure YXXA((H. ('n S%:: select radio button @(ata !ype and select @Structure in the popup that appears. )XXADDR 3iel+ !ame A((H: A((H1 >'!Y H%='7D P7S!E>7(% >7ND!HY Data Element YXXA((H: YXXA((H1 YXX>'!Y YXX%='7D YXXP7S!>( &AD(:E=P Domain >5AH92 >5AH92 >5AH92 >5AH:2 >5AH:9 Pre3de"ined Type Pre3de"ined Pre3de"ined Pre3de"ined Pre3de"ined Pre3de"ined Pre3de"ined Cen th Pre3de"ined Pre3de"ined Pre3de"ined Pre3de"ined Pre3de"ined Pre3de"ined

A((H: is the "irst line o" the address. A((H1 is the second line o" the address. >'!Y is the city. H%='7D is the province or state. P7S!E>7(% is the postal code. >7ND!HY is the country. Step ': Activate the structure Step 3: 'nclude the structure YXXA((H in the table YXX%8P. (o not "orget to re3activate table YXX%8P.

Exercise 5.' A++ Data to )XXE*P Fsin the Str.ct.re


Step (: =o to transaction S%:A. Step ': %nter YXX%8P as the table name and clic+ the (isplay push button on the toolbar. Step 3: A selection screen appears. >lic+ the %$ecute push button on the toolbar (or hit ;I without entering any selection criteria. Step 4: >hoose one o" your entries# and then clic+ the >hange push button on the toolbar.

Page :I

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Step 5: Dotice that you now have additional "ields to enter the employees address. %nter an address# and then save your wor+.

"hapter 6 Exercises
!he purpose o" these e$ercises is to give you e$perience using the A.AP Hepository 'n"ormation System. !his "acility can provide a great deal o" in"ormation on objects created and maintained within SAP.

Exercise 6.( Researchin the Fniversity Data *o+el


SAP provides a sample data model called the Nniversity 8odel. >orresponding dictionary objects have also been created by SAP "or this data model. Step (: >reate and print a list o" all tables in the university model. !ables in this data model all have names beginning with the letter N. !heir delivery class is A. Step ': >hoose one table "rom the result list "or Step :. ;or that table# "ind the list o" all "ields# domains# and data elements used in that table.

Exercise 6.' *iscellaneo.s I.eries


: Search "or all ta%les beginning with the string FDAS. 1 (isplay "ield list "or ta%le FDA:. B (isplay only FDA: /iel+s with the string S>ustomerS in the short description. C (isplay all /iel+s in tables beginning with FDAS# with >5AH data types# lengths less than 12# and S>ustomerS in the short description. 9 (isplay all ta%les that uses the chec+ table NP%HS. A (isplay all search helps that begin with 8S. G ;ind a DN8> +omain o" "ield length C# where the output length is di""erent than the "ield length. I ;ind all +ata elements that use domain DN8>C.

Page :M

8arch 1229

Exercises: The ABAP Dictionary

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Exercise 6.3 3in+in Ta%les that are relate+ to $ne Another


Step (: 'n the customer master tables the country +ey is +ept in table FDA:. ;ind the table where the country descriptionRname is +ept (e.g.# "or country +ey NS 33< Nnited States . Note: !his e$ercise is especially similar to the type o" research you may be re4uired to do on a project. Hints: : >oncentrate on the "oreign +ey relationship. 1 Helated tables are o"ten named with the same base pre"i$ and a di""erent su""i$ !OOO# !OOOA# !OOO. would all be related te$t tables .

(i.e.

Page 12

8arch 1229

Exercises: The ABAP Dictionary "hapter 7 Exercises

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Exercise 7.( "han in a Dictionary Str.ct.re


Step (: Shorten the >ity "ield in your YXXA((H structure. !o do this# navigate to the YXX>'!Y data element. >hange the domain "rom >5AH92 to >5AHA2. Step ': He3activate the YXX>'!Y data element. You may get a warning about the length o" the header label. '" so# hit %nter to navigate past this warning. Step 3: De$t you will see a warning that dependent tables may need to be converted. >lic+ >ontinue. Step 4: De$t you will see a log o" messages "rom the (atabase Ntility. !hese messages will tell you that it was possible to success"ully alterRadjust the YXXA((H structure and the YXX%8P table.

Exercise 7.' "han in a Ta%le Type


Step (: >hange the type o" your table YXX%8PE>P "rom !ransparent to Structure. You may do this by selecting Extras -> Change table category "rom the menu in the table de"inition screen (you must be in change mode . (o not "orget to re3activate the object.

Exercise 7.3 *aintainin Gersions


>hoose one o" your transparent tables and maintain various versions o" the object. He"er to >hapter I in your manual "or additional guidance. Hemember that only temporary versions o" active objects can be stored. !here"ore# in order to have di""erent temporary versions# you will need to : store a temporary version o" your active object# 1 change that active object and reactivate it# B then store another temporary version.

Page 1:

8arch 1229

Exercises: The ABAP Dictionary "hapter < Exercises Exercise <.( "reatin a Gie4

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Hint: ;ollow the step3by3step instructions contained in the appendices in your manual as you complete this e$ercise. Step (: Nsing the Nniversity (ata 8odel# create a view that provides an overview o" courses (identi"ied by course number # the course titles# "aculties that o""er them (need both "aculty number and name # and the pro"essors (identi"ied by pro"essor number responsible "or teaching those courses. (e"ine a view (YXXFN that "ul"ills those re4uirements. >hoose the type o" view care"ully. !he re4uirement calls "or multiple tables to be included in the view. 8aintenance status is /H0 "or read3only. !he tables you will need to use are NFNHS and N;A>5. Step ': Nsing the data that e$ists in the tables# test your view via one o" the "ollowing methods*etho+ (: Fse a simple ABAP pro ram. He"er to Appendi$ on view. *etho+ ': Exec.te the Gie4. =o to S%:A. =ive the name o" the view and clic+ on the table contents push button application toolbar. in the

Page 11

8arch 1229

Exercises: The ABAP Dictionary Exercise <.' "han in a Gie4

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Step (: !he view is now to include course descriptions as well as course titles. You will need to add table NFHS. to your view. !he course descriptions in table NFHS. are languagede!endent. %stablish selection criteria "or the view so that course descriptions are limited to either =erman or %nglish (choose one . Note: >ourse titles# as well as "aculty titles# are not language3dependent# and they only exist in "erman# >ourse descri!tions# however# are in the database in both =erman and %nglish. You must choose which language you would li+e to use in your view.

Page 1B

8arch 1229

Exercises: The ABAP Dictionary "hapter = Exercises Exercise =.( "reatin Search Eelp

SAP R/3 Release 4.7 SAP Development ABAP Trainin

&ets assume your employee table is used in a transaction. 8ore than li+ely# you will need to enter the employee '( number rather than the employee name on a screen. You want to provide the user with the ability to search "or the appropriate employee '( based on the employee name. (esign a search help to attach to the employee '( "ield. Step (: >reate an elementary search help using the wor+bench. Dame your search help YXXES%AH>5E5%&P. !he selection method should be your employee table (YXX%8P . Step ': 'ndicate the dialog type setting that will create a comple$ dialog where you can narrow your search. Step 3: Select the appropriate "ields so that your search help will return the employee '( based on the speci"ied employee last or "irst name. Step 4: &ist the %mployee '( and "ull name on this hit list. Step 5: (o not have %mployee '( appear on the comple$ dialog. Step 6: Activate the search help. Step 7: Attach the search help to your employee '( "ield in the YXX%8P table. Step <: !est your search help using the "ollowing methodExec.te the Ta%le. =o to S%:A. =ive the name o" the table YOO%8P and clic+ on the table contents push button in the application toolbar. !he Selection screen appears. Place the cursor on %mployee '( "ield and hit the ;C "unction +ey. IFEST9$!: 5ow would you design a search help to retrieve an employee '( only i" the employee is salaried?

Page 1C

8arch 1229

Exercises: The ABAP Dictionary "hapter (> Exercises

SAP R/3 Release 4.7 SAP Development ABAP Trainin

Exercise (>.( "reate Data Element Doc.mentation


You will add documentation to your tables YXX%8P and YXX5%A&!5. Pic+ a "ield "rom each table. (%.g. %8PE'( "rom YOO%8P and P&ADE'( "rom YXX5%A&!5 Step (: 8aintain the documentation "or the data elements. (%.g. YOO%8P'( and YOO5&!5P&D Step ': 8aintain supplemental documentation "or the data element. ;ollow instructions in >hapter :: o" your manual to create data element supplemental documentation.

Exercise (>.' "reate a Type Jro.p


Step (: >reate a !ype =roup Y!YXX in the A.AP (ictionary# which contains the "ields shown below. !his type group will be used later in the e$ercises "or the programming portion o" the course. !ype =roup Y!YOO ;ield Dame Y!YOOEPA>FG Y!YOOEPA>FM !ype P P &ength G M ((ecimals T 1

Page 19

8arch 1229

You might also like