®% Practice Questions
The practice questions below will help you evaluate your understanding of the
topic. The questions shoven are similar in nature to those found on the certtica-
tion examination. Whereas none of these questions will be found on the examPractice Questions Chapter8 233,
itself, they allow you to review your knowledge of the subject. Select the conrect
answers and then check the completeness of your answers in the following solu-
tion section, Remember that you must select all correct answers and only correct
answers to receive credit for the question.
1. Update tasks are the only method of making changes to the database.
O Atme
O BFalse
2. Which statement is true?
(GAA database LUW must be placed within an SAP LUW.
B. An SAP LUW must be placed within a database LUW.
a
Which actions release a database lock?
‘A. COMMIT WORK
BB, ROLLBACK WORK
€.The display of an SAP screen
D. The display of a dialog message type E
E, The display of a dialog message type A
FL ENQUEUE_
G. DEOUEUE_
H, Acall to a function module
LA CALL TRANSACTION
JeA SUBMIT
K. An “/n" in the command field
noooaooaooe »
‘Which actions release a lock object (with a default value for sco)?
A. COMMIT WORK
BB, ROLLBACK WORK
. The display of an SAP screen
D. The display of a dialog message type &
ooo0cas
E. The display of a dialog message type 4224 Chapter 8 SQL Statements Including Update Strategies
ooaes vy ooooaa
oo
ooooos
°
o
F, ENQUEUE_
H. A alll to a function module
TACALL TRANSACTION
J.A SUBMIT
K.An“/n" in the command field
How can you implement a table join other than the using the J01N state-
‘ment? (Fill in the blank)
The data buffered on each application server Is:
A. Always the same
B. Never the same
. Depends on the users
The target structure of 2 S{LECT statement requires the field names to match
the columns selected and to be in the same left-justified order.
A.True
B. False
When is an ENDSELECT not required for a select?
‘A. When the F20H isa view
B. When you specify a join of tables
€. When you do a SELECT SINGLE
D. When you specify into a table
B, When you specify appending a table
The database always uses the primary key when the WHERE clause contains
any of the key fields.
A.True
B. FalsePractice Questions Chapter8 225
10. OpenSQL does not allow you to specify a secondary index during a SELECT.
O Ate
OD B.Fabe
11, You should always buffer database tables that contain fewer than 100
records,
O Ate
O B.Fabse
12. Buifering data can speed up access to deta up to 100 times when compared
to reading it from the database.
0 Atri
OC B.Fabe
13, All Open SQL. commands allow processing on multiple rows,
O A.tne
O B.Fabe
14, The WAIT parameter of a lock object waits for the lock to be successful
DO ATrue
OB. Fabe
45. Itis recommended to place the COMMIT WORK in the update task
OC Atre
OB. False
16. Its possible to PERFORM
DO Atre
OB. False
ibroutine> ON COMMIT in an update task.
17. The correct order for using a lock object is:
GA. Read the data, set the lock, change the data, release the lock
CB. Setthe lock, read the data, change the data, release the lock
D_C. Set the lock, read the data, release the lock, change the data226 Chapter SOL Statements Including Update Strategies
18,
a
a
19,
a
a
Local update tasks are quicker because they stay within the same work pro
cess,
Actus
B. False
V1 update tasks are always non-restartable, whereas V2 update tasks are
always restartable.
A. True
B. False
Practice Question Answers and Explanations
4:
Correct answer: B
In addition to the various types of update tasks, itis also possible to use
inline updates to make changes to the database.
Cortect answer: B
Ifyou encounter an error during the processing of an SAP LUW, it should be
possible to return to the consistent database status that existed prior to
beginning the SAP LUW. This is only possible is if he SAP LUW is placed
within a database LUW.
Correct answers: A, B, G D, E1,J,K
{A database lock is released when the database performs a rollback or data-
base commit. When you execute the ABAP statements R01 (SACK ORK and
COMNIT WORK, you explicitly implement a database rollback or database com-
rit. There are also instances when # database commit is triggered implicitly.
Implicit database commits are always initiated whenever the program has to
walt, such as when the system sends an SAP screen, when the system sends
dialog message, whenever there are synchronous and asynchronous RFC
alls (the question referenced a normal function call, not a Remote Function
Call, or when you use the statements CALL TRANSACTION or SUBMIT
..
Correct answers: A. B. E.G, K
Ia lock isenqueued with a_scope of 2 (the defauld, the lock is released after
‘you execute the ABAP statements FOL BACK WORK and COMITT WORK, or after
4 program termination. program termination is produced after a message10.
1
Practice Question Answers and Explanations Chapter 8
with the type of either 4 or x, with the execution of the statements LAV
PROSRAM and LEAVE TD TRANSACTION, of ifthe user enters */n” in the com-
mand field. The lock can also be released by calling the DE0)EUE function
module or the function module OC OJEUE_ALL.
Correct answer: A database view
‘There are two ways to implement a table join. One is to ereate a database
view in the ABAP Dictionary that corresponds to the table join and use this
view. The other is to define the join directly in your program as an ABAP
Join.
Correct answer: €
SAP table buffers exist separately for each application server, and there is a
limited amount of bulfer space on each. As datais accessed by users, the data
that is contained within the table buffers changes as more recent data
replaces older data. This means that itis normally a very rare occurance that
the contents of the buffers across application servers match.
Correct answer: B
It is not necessary for the field names to match the columns selected. What
is necessary is forthe size and type of the fields to match.
Correct answer: CD, E
‘An ENOSELECT is not required because these SELECT statements do not loop.
‘A SELECT SINGLE statement only returns one record, and both the 1Nv0
TABLE and APPENDING TABLE fil the destination in a block mode. Because
none of these statements isa SELECT loop, the ENOSELECT is not necessary.
Correct answer: B
‘The database optimizer determines which index to use. Under most circum
stances, itis based on the fields provided in the iéRe clause, and which
indexes exist for the database table,
Correct answer: A
This is correct. Open SQL. does not allow you to provide any direction
directly to the underlying database.
Correct answer: B
‘The decision to buffer database tables is more complex than a simple deter-
‘mination based on the expecied size of the table. Again the ideal table is
small, read frequently, rarely changed, and normally accessed directly with
its key fields. However, the decision 10 buffer a database table should be
27228 Chapter8 SQL Statements Including Update Strategies
made by experienced ABAP developers in consultation with the system
administrator.
12. Correct answer: A
A table that is buffered can speed up your access between 10 and 100 times
compared to reading it from the database. The caveat for the speed, how-
ever, is that for the buffer to be used. it must be aSF1 FC7 statement that spec-
ifies the fall buffered key with equalities only.
13. Correct answer: A
All Open SQl. commands allow processing on multiple rows.
14. Comect answer B
The _WAIT parameter defines whether a lock request should be repeated if
the frst lock attempt fais. It does not wait for the lock to become avatlabie.
15. Correct answer: B
You muist not use the explicit ABAP statements OMIT WORK oF ROLLBACK
WOR in the update module,
16. Correct answer: A
The goal in the update task is to execute changes to central tables as late as
possible in the LUW. To achieve this, you can use the PERFORM ON COMMIT
technique in the update. If you encapsulate changes to central tables as form
routines within the appropriate function group of the update module and
then call the routines from within the update module using the PERFORM ON
COMMIT, the form routines will not be executed until the last update module
1s processed.
17, Comect answer: B
‘This order should be natural. Obtain the lock so that you know the data is
not being modified elsewhere and is therefore consistent, read the data to
begin with the current consistent state, make your change, and finally
release the lock to make the data available for others who may be waiting for
the data
18. Correct answer: B
Local updates are quicker because they do not provide updates to the log
table, Because there is less database activity, the process runs quicker. How-
ever, if there is a problem, there is no way of knowing what data was lost
because there are no requests in the log table.
Take Away Chapter8 229
19. Correct answer: B
V1 modules can either be restartable or nion-restartable. V2 tasks are always
restartable.