Practice Question Answers and Explanations Chapter 3 75

and only correct

ITTP requests data
Application Server

Lse.

•	D. All work processes communicate with the dispatcher.
E. A work process can communicate directly with an external system through a Remote Function Call.
F. It is possible to have multiple enqueue work processes on an SAP NetWeaver Application Server.
G. It is possible to have multiple spool work processes on an ABAP application server.
Practice Question Answers and Explanations
1.	Correct answer: B
Beginning with SAP NetWeaver 6.10, new technologies based on highly scalable infrastructure were implemented to process HTTP requests directly from the Internet or to send them as HTTP client requests to the Internet. The SAP kernel was enhanced to include a process known as the Internet Communication Manager (ICM) to achieve this functionality.
1.	Correct answer: B
Different SAP NetWeaver components require the SAP NetWeaver Application Server to be run with certain stacks configured. It is possible to install both the ABAP and Java stacks, but depending on the use of the server, it is possible to use just ABAP or just Java.
1.	Correct answer: C
All of the work processes of an ABAP application server use a common main memory area called shared memory to save contexts or to buffer constant data locally. The resources that all work processes use, for example programs and table contents, are contained in shared memory. Memory management in the AS ABAP ensures that the work processes always address the correct context.
4.	Correct answers: A, D
Each individual work process works independently, which makes them suitable for a multiprocessor architecture.
When you start up an AS ABAP, each ABAP application server registers its work processes with the database layer and receives a single dedicated channel for each. While the SAP NetWeaver Application Server is running, each work process is a user (acting as a client) of the database system (acting as a

~n the SAP NetWeaver
the SAP NetWeaver
atabase LUW abase LUW
i be performed. Which
of the SAP NetWeaver

Practice Questions Chapter 4 105
,-t Organizer. They	1. The Object Navigator incorporates a total of 10 browsers.
)rganizer. You can	 A. True
via the menu path	 B. False
2. The Repository Browser is started by default when you execute Transaction SE80 for the Object Navigator.
•	A. True
B. False
3. You can list a maximum of six browsers in the Object Navigator.
•	A. True
B. False
4. You can maintain SAPscript forms and SAP Smart Forms within the ABAP Workbench.
•	A. True
B. False

requests or include or task based on difmodifications in the	5. Which of the following about the Object Navigator are true statements?
•	A. ABAP programs can be displayed and edited in the Object Navigator.
B. Screens can be displayed and edited in the Object Navigator.
C. Menus can be displayed and edited in the Object Navigator.
D. You can create BAdI implementations in the Object Navigator.
E. You can create customer projects (Transaction CMOD) in the Object Navigator.
•	F. The ABAP Dictionary can be maintained in the Object Navigator.	

understanding of the
[)und on the certifica-	6. The Repository Information System is a useful tool to search for customer
will be found on the	exits/function exits and BAdIs in the SAP system.
he subject. Select the
•	A. True
[nswers in the follow-
rest answers and only• B.False

1o6 Chapter 4 ABAP Workbench Usage

7. Enhancement definitions and implementations can be displayed in the Enhancement Information System.
•	A. True
B. False
8. Which of the following is a true statement? There can be more than one correct answer.

•	A. All customer repository objects have to be assigned to a package.
•	B. Packages use interfaces and visibility to make their elements visible to other packages.
•	C. The transport layer is a mandatory input field for the package.
D. A package can be nested.

9. The software component for a customer package can be	
•	A. HOME
B. Any SAP software component (i.e., SAP—AP P L, SAP—BAS I S, SAP_HR, etc.).

10. Which of the following is a true statement? There can be more than one correct answer.
•	A. All transportable objects have to be assigned to a package.
B. Local repository objects can be transported.
•	C. Repository objects and cross-client customization objects are assigned to the workbench request.
D. Client-specific customization objects are assigned to the customizing request.
•	E. Inactive objects can be transported.
11. Which of the following is true? There can be more than one correct answer.
•	A. The repository objects and cross-client customization objects are recorded in a task belonging to a local change request if there is no consolidation route leading from the current system defined in the Transport Management System for the transport layer.

Practice Question Answers and Explanations Chapter 4 107

e displayed in the

more than one cor‑

,o a package. elements visible to

package.

e

ASIS, SAP_HR, etc.).
e more than one cor‑
ickage.
bjects are assigned to
I to the customizing

n one correct answer.

nization objects are if there is no consoliin the Transport Man‑

•	B. The repository objects and the cross-client customization are recorded in a task belonging to the transportable request if the consolidation route is defined in the Transport Management System.
12. There are	versions of the ABAP Editor.
•	A. 3
B. 4
C. 2
Practice Question Answers and Explanations
1 Correct answer: B
The Object Navigator has a total of nine browsers, and in earlier releases it was less than nine. The following are the object browsers available in the ABAP Workbench:
4	Repository Browser
Repository Information System
Transport Organizer
MIME Repository
Tag Browser
Test Repository
Enterprise Service Browser
Web Dynpro. Text Browser
Enhancement Information System
2.	Correct answer: A The Repository Browser is the default browser for the ABAP Workbench.
Correct answer: B You can display up to eight browsers in the ABAP workbench
Correct answer: B
You cannot maintain SAPscript forms or SAP Smart Forms in the ABAP Workbench.

"S Chapter 4 ABAP Workbench Usage

5.	Correct answer: A
You can search for enhancements including Business Add-Ins and customer exits with the Repository Information System.
5.	Correct answers: A, B, C, F
You can edit or display ABAP programs in the ABAP Workbench in the ABAP Editor. You can display or edit screens within the ABAP workbench in the screen painter. You can display and edit menus within the ABAP workbench in the Menu Painter. The BAdI implementation tool is not integrated within the Object Navigator, so it's not possible to create BAdI implementations in the Object Navigator. The customer project (CMOD) is not integrated within the ABAP Workbench, so it's not possible to create customer projects with the ABAP Workbench. The ABAP Dictionary is integrated within the ABAP Workbench, so it can be maintained in ABAP Workbench.
5.	Correct answer: A
Enhancement definitions and implementations can be displayed in the Enhancement Information System.
5.	Correct answers: B, D
You can create a local object, but you have to assign the object to a package if you want to transport the object from one system to other. A package has to define a package interface and visibility to make its elements visible to other packages. The transport layer is not a mandatory input field for the package. The transport layer is assigned to the package if it is defined for the system. A package can be nested.
5.	Correct answer: A
The software component of the customer package should always be HOME.
5.	Correct answers: A, C, D
The repository object has to be assigned to the package to transport the object to another system within the system landscape. You cannot transport a local repository object. Repository objects and cross-client customization objects are assigned to a workbench request. Client-specific customization objects are assigned to the customization request and are not assigned to the package. Inactive objects can be transported.
5.	Correct answers: A, B
A local change request is created if the consolidation route is not defined; otherwise, a transportable change request is created if the consolidation route for the transport layer is defined.

Take Away Chapter 4 log

Ans and customer

bench in the ABAP workbench in the ABAP workbench t integrated within mplementations in it integrated within Dmer projects with
d within the ABAP h.
e displayed in the

object to a package ether. A package has elements visible to , input field for the "it is defined for the

A always be HOME.

12. Correct answer: C
There are three modes of ABAP Editor: the new Front-End Editor, the old Front-End Editor, and the Back-End Editor.
Take Away
You should now understand the ABAP Workbench features and be able to navigate within it. You should be able to use the available browsers within the ABAP Workbench and complete your development in an efficient manner. You should know how to configure the ABAP workbench and the various development tools.
To be a successful developer you should know about all the available development tools and their uses. It is important to understand the features of the new ABAP Editor because it will be very helpful for your application development and will increase the productivity of your development team.
Finally, you should understand the package concept and the use of the Transport Organizer. You should understand the concept of the transport request and the different types of transport request and its use for the migration of development objects from the development environment to the production environment.
Refresher
Table 4.2 shows key concepts about the ABAP Workbench.
Key Concept	Definition

tge to transport the you cannot transport client customization ecific customization 'e not assigned to the

The ABAP Workbench is an integrated development environment for the ABAP developer.
The Repository Browser is a tool within the Object Navigator and is used by the developer to access the repository objects and workbench tools to create repository objects.

ABAP Workbench
Repository Browser

route is not defined; if the consolidation

Repository Information	The Repository Information System Browser is a
System	search tool to search for repository objects.
Table 4.2 Key Concept Refresher

Practice Questions Chapter 5 131

nple, the editor, are ndow. It is also posiews and where the :ode tool.

tion section. Remember that you must select all correct answers and only correct answers to receive credit for the question.
1. The Debugger displays a maximum of eight data objects at one time.
•	A. True
B. False
2. A watchpoint stops program execution every time the condition specified is met.
•	A. True
B. False

3. Both the classical Debugger and the new Debugger can be used on all ABAP code without restriction.
•	A. True

A 	—	Li B.raise

kpoint and awatch
reakpoint relates to

- whereas a watch-	4. Under which circumstances will the classical Debugger start as the De
(Select	bug-
Select all that apply.) ,rtant to understand	gerr ,
,ints.	 A. None. The new Debugger will always start as the Debugger.
°n an external mode	 B. When five modes already exist for this logon session.
escribes the number	 C. When the number of debugging sessions exceeds half the number of dia‑
usive mode is what	log sessions.
r. Remember thata
L_J D. When you specify the default as the classical Debugger in the settings of Debugger and may
the Object Navigator.

•	E. If you manually switched to the classical Debugger during your last session.

nderstanding of the and on the certiflca611 be on the exam ct. Select the correct k the following solu‑

5. A non-exclusive debugging mode means? (Select all that apply.)
•	A. A roll-out is forced in the application after each Debugger view.
B. Someone else is debugging the same source code.
C. Debugging is not possible between the statements SELECT and ENDSE LECT because the database cursor needs to be closed using a COMMIT.

I

132 Chapter 5 ABAP Debugger Program Usage
•	D. Debugging is not possible for conversion or field exits.
•	E. Owing to the commit, inconsistent datasets can occur in the database.
•	F. It may be used anywhere in the landscape.
6. What is the maximum number of watchpoints that can exist at one time?
•	A. 8 1:1 B. 10
•	C. 16
D. No limit
7. Setting breakpoints for a method or function module within the Debugger allows the use of I F4 (value help) to find the correct name.
•	A. True
B. False
8. All breakpoints are valid for the entire Debugger session, and all can be changed by the Debugger.
•	A. True
B. False
9. It is possible to make multiple changes to data objects at the same time in the Debugger.
•	A. True
B. False
10. When starting the Debugger, what circumstance causes the runtime error
DEBUGGING—NOT—POSSIBLE?
•	A. Starting a non-exclusive mode in a productive system.
B. When more than five sessions are already associated with this login user.
•	C. When the number of debugging sessions on the server exceeds the value
defined by the profile parameter rdi sp/wpdbug_max_no.

Practice Question Answers and Explanations Chapter 5 133

11. There are — work areas available in the Debugger.

El El El El

A.	7
9
11
15

n the database.

Kist at one time?

sion, and all can be
s at the same time in
[ses the runtime error

tem.
ed with this login user. ~rver exceeds the value -no.

12. What button undoes layout changes to the Debugger? (Fill in the blank.)

Practice Question Answers and Explanations
1.	Correct answer: A
The classic Debugger only allowed a maximum of eight data objects. The new Debugger allows an unlimited number (restricted only by font and window size) to be displayed at the same time.
If you encounter a question discussing an ability or limitation of the classic Debugger, you should assume that the question refers to the classic Debugger and answer accordingly. If the question references the new Debugger, the answer would be false.
1.	Correct answer: B
Whereas it is triie that if a condition is specified, the watchpoint will not stop until the condition is true, the watchpoint will not be triggered until the variable contents change. Therefore if you set a watchpoint that is already true, the watchpoint will not be triggered.
1.	Correct answer: B
The classic Debugger cannot analyze conversion exits or field exits. It also has side effects with search help (F1), value help (F4), and list output.
1.	Correct answers: B, D
When you already have five external modes in use (or more accurately when you only have one external mode remaining), the classic Debugger is automatically started when starting another external mode would prevent further sessions from being created. Ifyou have the default Debugger specified as the classic, it will always start with this version.

rithin the Debugger Me.

134 Chapter 5 ABAP Debugger Program Usage
5.	Correct answers: A, C, D, E
A non-exclusive mode means the session is not locked into a work process and will be rolled out and rolled in between steps. The roll-out forces a COM -MIT WORK between steps, which means the database cursor will be lost, causing a short dump if it occurs between a SELECT and ENDSELECT. Because database commits occur without regard to logical units of work, the database may become inconsistent. The Debugger prevents this inconsistency in a production environment.
5.	Correct answer: B
Only 10 watchpoints can exist at one time with the classic Debugger. The new Debugger has no limit.
If you encounter a question discussing an ability or limitation of the classic Debugger, you should assume that the question refers to the classic Debugger and answer accordingly. If the question references the new Debugger the answer would be option D.
5.	Correct answer: A
With the new Debugger executing in a separate mode, it has access to search helps that may be used for setting breakpoints.
If you encounter a question discussing the absence of an ability of the classic Debugger, you should assume that the question refers to the new Debugger and answer accordingly.
5.	Correct answer: A
Breakpoints set in the editor can be changed in the Debugger. Local breakpoints can be converted to either session or external breakpoints.
5.	Correct answer: A
If you open up multiple data objects for change, the	key will accept all changes to all objects.
5.	Correct answer: A
Ifyou attempt to start the Debugger on a production system and an exclusive mode is not available, the system will produce the runtime error DEBUGGINGNOTPOSS I B LE. On a non-productive system you would receive the indication of a non-exclusive mode in the title, but owing to the potential for inconsistent data, this mode is not allowed on production systems.
11.	Correct answer: C There are 11 desktop areas currently available for use.

o a work process -out forces a C OM - will be lost, caus.CT. Because data‑		Take Away Chapter 5 135
12. Correct answer: Back
The BACK button undoes the layout changes you have made to each desktop. Using the BACK button multiple times will undo each layout change.	

)rk, the database 	Take Away
iconsistency in a

You should now be able to examine the runtime behavior of ABAP programs
using the ABAP Debugger. By examining data objects within the Debugger, it is possible to determine why a program behaves correctly or incorrectly. If you

is Debugger. The 	determine the cause of a problem in the program, it is easier to provide a correc‑

tion or a solution to the issue.

Lion of the classic	TCA ,	with	identifying 
yvu 1-3 design programs	eye	issues during testing through
he classic Debug	the use of assertions and checkpoint groups, your programs will be easier to
yew Debugger the
maintain and produce fewer issues once they are in production.

access aL33 to search	Refresher

You must understand watchpoints and breakpoints — both their use and how to 

dlity of the classic define them. You need to understand how to define and use assertions and he new Debugger
checkpoint groups in your program.

The final thing you should take away from this unit is the differences between
the classical Debugger and the new Debugger. You should understand the archi

,ger. Local break- tecture of each, what limitations exist, and why the limitations exist. It is also ,points.
important to understand the tools and what options exist within the different 

tools.

key will accept all	Table 5.3 shows the key concepts of the Debugger.

Key Concept	Definition

i and an exclusive	Architecture of the	The classic Debugger shared the same external mode roll
error DEBUGG I NG	Debugger	area as the executing program, whereas the new Debug‑
!ceive the indica-	ger runs in its own external mode.
the potential for
r	-F	n. L,+	and their tools The desktops  ; +k Debugger and how the	tools 
. _F ..	I —	in the ~ ur'5— a. u" u various
systems.	function in the Debugger.

Table 5.3 Key Concepts Refresher

156 Chapter 6 ABAP Types and Data Objects

1. Data types store data and occupy memory.
•	A. True
B. False
2. A data object is concretely defined by means of data type and occupies memory. It contains data with which ABAP programs work at runtime.
•	A. True
B. False

3. The predefined data types are defined locally in the ABAP program.
•	A. True
B. False

4. The default length of the type C data type is:
•	A. I
B. 10
C. 1-65535

5. If data objects of type I are being used to store the result of a calculation, the decimals will be truncated.
•	A. True
B. False

6. The default length of the type P data type is:
•	A. 8
B. 1
C. 1-16

7. A variable-length structure is called:
•	A. Nested structure
•	B. Deep structure
C. Flat structure

Practice Questions Chapter 6 157
8. Local data objects can be defined using ABAP Dictionary types.
•	A. True
•	B. False 

rid occupies mem-	9. Global data types defined in SAP systems are:
runtime.	defined  	t-	that	1-1 	1-
A. Datain the program at is visible to the all the routines/state‑
ments within the ABAP program
•	B. ABAP Dictionary types
•	C. Date types defined in the program using ABAP Dictionary types I program.
10. Which of the following are incorrect statements:
•	A. TYPES: carrid_ty LIKE spf] i -s-carr—id.
•	B. TYPES: werks TYPE C LENGTH 4.
•	C. TYPES: date_ty TYPE D LENGTH 10.
D. TYPES: Str TYPE STRING LENGTH 20.

)f a calculation, the	11. What is the result of the following arithmetic operation.
DATA: i nt TYPE I. int = 5	3	10 ).
•	A. I
•	B. 2
C. 1.5
•	D. 0	

12. What is the result of the following arithmetic operation:
DATA : int TYPE I int = 5 / 10.

158 Chapter 6 ABAP Types and Data Objects
Practice Question Answers and Explanations
1.	Correct answer: B
A data type is just the description and does not occupy memory.
1.	Correct answer: A
A data object is an instance of the data type and does occupy memory. Data types define the technical attributes of the data object.
1.	Correct answer: B
Predefined data types are provided by the ABAP runtime environment and are available system-wide.
1.	Correct answer: A
The default length of the character data type C is one. If you want the data object to be more then one character, then you have to specify the length.
TYPES: varl TYPE C.	"is a character data type "of length 1.
TYPES: var2(10) TYPE C.	"is a character data type "of length 10.
TYPES: var2 TYPE C LENGTH 15. "is a character data type "of length 15.
1.	Correct answer: B The type I data objects round the value and do not truncate.

DATA:	intl
int2
int3	TYPE	I,
TYPE	I,
TYPE	I.				
intl	=	4/10.	"value	of	intl	= 0	
int2 =	5/10	"value	of	int2	= 1	
int3 =	16/10.	"value	on	int3	= 2	

6.	Correct answer: A
The default length of the type P data type is eight. If you want to have more or less than eight, then you can specify the length with the length keyword or in parentheses after the name of the data object or data type.
7.	Correct answer: B
The variable-length structure is called a deep structure. Any structure that has a variable-length component is called a deep structure. For example, a structure with an internal table as one of its components is a deep structure, as is a structure with a component of type STRING.

Take Away Chapter 6 159

ons

memory.

occupy memory. Data

ime environment and

8.	Correct answer: A
Local data objects can be defined using ABAP Dictionary objects.
9.	Correct answer: B
Global data types are ABAP Dictionary objects, like data elements, Dictionary structures, tables, table types, and type pools.
10.	Correct answers: C, D
Data type D is a fixed-length predefined data type and does not require a length specification. The data type S T R I N G is a dynamic-length data type and does not require a length specification.
11.	Correct answer: D

The correct answer is 0:

If you want the data o specify the length.
ata type

intl = 5 * ( 3/10).
intl = 5 * ( 0 ) "because 3/10 = 0, due to integer rounding intl = 0.

ata type
ata type

12.	Correct answer: A
The correct answer is 1 because the integer data type I rounds the number during the arithmetic operation.

uncate.

Take Away
You should understand the ABAP data types and data objects. You should understand the meaning of ABAP predefined standard data types, local data types, and global data types. It is important that you know the differences between local data types and global data types, and between flat structures, nested structures, and deep structures. All this will help you write more efficient code. Finally, you should understand the scope and validity of the data objects within the ABAP program.

you want to have more ith the length keyword data type.

Refresher

Any structure that has
For example, a struc‑
s a deep structure, as is

Table 6.3 repeats the key concepts of this chapter in short form.

190	Chapter 7 Internal Table Definition and Use
tion examination, but whereas none of these questions will be found on the exam itself, they allow you to review your knowledge of the subject. Select the correct answers and then check the completeness of your answers in the following solution section. Remember thatyou must select all correct answers and only correct answers to receive credit for the question.
1. How many kinds of internal table are supported in the ABAP language?
•	A. 2
B. 3
C. 1
2. Which of the following statements are true? There can be more than one true statement.
•	A. Standard tables can be accessed by index.
B. Standard tables cannot be accessed by index.
C. A sorted table is always accessed by a unique key.
D. Hashed tables are always accessed by index.
•	E. Hashed tables are accessed by a unique key.
3. The OCCURS statement is required to define an internal table with a header line.
•	A. True
B. False
4. You can use the APPEND statement to fill a sorted internal table.
•	A. True
B. False
5. You cannot use the INSERT statement to insert lines into a standard internal table.
•	A. True 1:1 B. False

Practice Questions Chapter 7 191

is will be found on the of the subject. Select the it answers in the follow-correct answers and only

~ the ABAP language?

re can be more than one
:Y‑
ternal table with a header
eternal table.
es into a standard internal

6. You can use a table with a header line for object-oriented programming.
•	A. True
B. False
7. An internal table line type with a deep or nested structure can be defined for internal tables with a header line.
•	A. True
B. False
8. Internal tables cannot have a deep or nested structure in their line type.
•	A. True
B. False
9. The READ statement with the addition BINARY SEARCH for a sorted internal table is better for performance.
•	A. True
B. False
10. The READ statement with the BI NARY SEARCH addition cannot be used for a sorted internal table.
•	A. True
B. False
11. The B I NARY SEARCH addition cannot be used with the READ statement for the HASHED table.
•	A. True
B. False
12. Which of the following is a true statement:
•	A. A sorted table can have a unique or a non-unique key.
B. A standard table should always have a unique key.
•	C. A hashed table should always have a unique table key.

192	Chapter 7 Internal Table Definition and Use

13. You can empty the body of the internal table i t a b with a header line using the CLEAR i to b statement.
•	A. True
B. False

14. You can modify an internal table by using the UPDATE statement.
•	A. True
B. False

15. Internal tables can also be modified after executing the READ statement with the addition ASSIGNING.
•	A. True
B. False
16. You cannot use a SORT statement for a sorted internal table.
•	A. True
B. False

Practice Question Answers and Explanations
1.	Correct answer: B
There are three types of internal tables: standard, sorted, and hashed.
1.	Correct answers: A, E
A standard table can be accessed by the index or the key. A hashed table is accessed by the unique key, and it used to hash algorithms to access the table record. A sorted table can be accessed by the index or the key. A sorted table can have a unique or a non-unique key.
1.	Correct answer: B
You require an OCCURS addition to declare a internal table with a header line, but you can define an internal table with header line using the WITH HEADER LINE addition.

	Practice Question Answers and Explanations Chapter 7 193	

vith a header line using	4. Correct answer: B

Sorted tables should not be filled using the APPEND statement. Instead, they should be filled with the INSERT statement. You cannot use the A P P E N D statement because the table is stored in a sorted order. APPEND always adds the record as the last entry in the table, so sorted tables use the I N S E RT statement to insert table records in the internal table.
5.	Correct answer: B
You can use the INSERT statement to insert records in a standard internal table, the record will be added to the end of the table.
5.	Correct answer: B
You cannot use an internal table with a header line in object-oriented programming.
5.	Correct answer: B
You cannot define an internal table with a header line that has a deep or nested structure.
5.	Correct answer: B
You can define internal tables with deep or nested structure line types, but the internal table must be one without a header line.
5.	Correct answer: B
BINARY SEARCH does not have any effect on the sorted internal table. Sorted internal tables always use a binary search to read the table records with the READ statement.

1, and hashed.	10. Correct answer: B

You can use the BINARY SEARCH with the READ statement for sorted tables, but it does not have any effect.
11.	Correct answer: A
You cannot use BINARY SEARCH with the READ statement to read hashed internal tables. Hashed internal tables require a unique key to read the internal table record, and they use a hash algorithm to find the table record.
11.	Correct answers: A, C
The standard internal table can have a non-unique key, and the hashed internal table must always have a unique key.
The sorted table can have a unique or a non-unique key.

E statement.
le READ statement with
table.
)ns

y. A hashed table is is to access the table key. A sorted table

with a header line,
ng the WITH HEADER

194 Chapter 7 Internal Table Definition and Use
13.	Correct answer: B
You cannot clear an internal table with a header line with the CLEAR i t a b statement. To empty the table body you have to use the C L EA R i t a b [ I statement.
13.	Correct answer: B
The UPDATE statement cannot be used to modify the internal table. You use the MODIFY statement to modify the internal table.
13.	Correct answer: A
You can modify internal tables using the ASS I GI N I NG statement because the ASS I GI N I NG points to the memory address of the table record or field.
13.	Correct answer: A
A sorted internal table is sorted by default, and hence you cannot use the SORT statement to sort a sorted internal table.
Take Away
You need to understand the syntax to create internal tables, be able to define a data type, and use it to define an internal table in the program. You need to understand the difference between internal tables with header lines and without header lines, and you should know how to define such a table in the program. You also must be aware that the internal table with header line is not supported in ABAP Objects programming. You should be able to differentiate between the different kinds of internal table such as standard, sorted, and hashed and be able to use them in a program. You should also be able to populate internal tables with the APPEND and INSERT statements and be able to perform various operations on the internal table. You should know the syntax to update, modify, delete, and read individual records from the internal table.
Refresher
You should now be able to describe internal tables and their use in the ABAP programming language. You should know the keywords and the syntax to define and access the internal table. You should be able to use internal tables in a program to store data temporarily and be able to process the data in the table.
Table 7.2 repeats the key concepts of this chapter in short form.

Summary Chapter 7 195

with the CLEAR itab CLEAR itab[] state‑

ternal table. You use

Definition
An internal table is a local program variable-data object and is used to store multiple structured data records temporarily in memory.
There are three kinds of internal tables: standard table, sorted table, and hashed table.
Standard tables can have a unique or a non-unique key and can be accessed with the key or an index. They can be filled with the APPEND or INSERT statement, or you can use the select statement to populate them from the database (see Chapter 9, Basic ABAP Programs and Interface Creation)
Sorted tables can have a unique or a non-unique key. The table records are stored in a sorted order, and by default are sorted in ascending order. You fill the sorted internal table with the INSERT statement.

:atement because the record or field.
you cannot use the

Key Concept Internal table
Kinds of internal table
Standard internal table
Sorted internal table
Hashed internal table

Hashed internal tables must have a unique key that you must use to access the table record. A hash algorithm is used to read the hashed internal table.

s, be able to define a rogram. You need to der lines and without table in the program. line is not supported !rentiate between the A hashed and be able pulate internal tables ,rform various opera, to update, modify,

use in the ABAP pro-the syntax to define vernal tables in a prolata in the table.

form.

Table 7.2 Key Concept Refresher
Summary
You have learned in detail the concepts of internal tables, the different kinds of internal table, and the valid operations on each kind of internal table. You should know the syntax to define internal tables, access internal tables and process the table records in the internal table. This knowledge will allow you to easily pass this topic on the certification examination.

Practice Questions Chapter 8 223

there is an update ted by restartable restart V2 update
ase physically locks ie database commit Nith SELECT ... FOR for the duration of without locks. You ,ble for performance
3 inline changes and
! the least impact on
)erformance. Generf few users.
f possible, within an short a time as pos‑
I tables (those tables usly by several users) his is to use the PERilate changes to cengroup of the update ~odule using the PER-until the last update ita within these form

nderstanding of the and on the certificafound on the exam

itself, they allow you to review your knowledge of the subject. Select the correct answers and then check the completeness of your answers in the following solution 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.
•	A. True
B. False
2. Which statement is true?
•	A. A database LUW must be placed within an SAP LUW.
B. An SAP LUW must be placed within a database LUW.

3. Which actions release a database lock?
•	A. COMMIT WORK
B. ROLLBACK WORK
C. The display of an SAP screen
D. The display of a dialog message type E
E. The display of a dialog message type A
•	F.ENOUEUE_<]ock_object>
G.DEQUEUE_<1ock_object>
H. A call to a function module
•	I. A CALL TRANSACTION
J. A SUBMIT
K. An "/n" in the command field

4. Which actions release a lock object (with a default value for —SCOPE)?
•	A. COMMIT WORK
B. ROLLBACK WORK
C. The display of an SAP screen
D. The display of a dialog message type E
E. The display of a dialog message type A

224 Chapter 8 SQL Statements Including Update Strategies
•	F.ENQUEUE_<1ock_object>
G.DEQUEUE_<lock_object>
•	H. A call to a function module
•	I. A CALL TRANSACTION
•	J. A SUBMIT
•	K. An "/n" in the command field
5. How can you implement a table join other than the using the JOIN statement? (Fill in the blank.)

6. The data buffered on each application server is:
•	A. Always the same
•	B. Never the same
•	C. Depends on the users
7. The target structure of a SELECT statement requires the field names to match the columns selected and to be in the same left-justified order.
•	A. True
B. False
8. When is an E N D S E L E C T not required for a select?
•	A. When the PROM is a view
•	B. When you specify a join of tables
•	C. Whenyou do a SELECT SINGLE
•	D. When you specify into a table
E. When you specify appending a table
9. The database always uses the primary key when the WHERE clause contains any of the key fields.
•	A. True
B. False

Practice Questions Chapter 8 225

? using the JOIN state‑
ie field names to match fled order.	10. Open SQL does not allowyou to specify a secondary index during a SELECT.
•	A. True
B. False
11. You should always buffer database tables that contain fewer than 100 records.
•	A. True
B. False
12. Buffering data can speed up access to data up to 100 times when compared to reading it from the database.
•	A. True
B. False
13. All Open SQL commands allow processing on multiple rows.
•	A. True
B. False
14. The —WAIT parameter of a lock object waits for the lock to be successful.
•	A. True
B. False	

15. It is recommended to place the COMMIT WORK in the update task.
•	A. True
B. False
16. It is possible to PERFORM <s ub rout i ne> ON COMMIT in an update task.
1:1 A. True
•	B. False
WHERE clause contains
17. The correct order for using a lock object is:
•	A. Read the data, set the lock, change the data, release the lock
B. Set the lock, read the data, change the data, release the lock
•	C. Set the lock, read the data, release the lock, change the data

226 Chapter 8 SQL Statements Including Update Strategies

18. Local update tasks are quicker because they stay within the same work process.
•	A. True
B. False

19. V1 update tasks are always non-restartable, whereas V2 update tasks are always restartable.
•	A. True

•	B. False

Practice Question Answers and Explanations

1.	Correct answer: B
In addition to the various types of update tasks, it is also possible to use inline updates to make changes to the database.
1.	Correct 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 the SAP LUW is placed within a database LUW.

3.	Correct answers: A, B, C, D, E, I, J, K
A database lock is released when the database performs a rollback or database commit. When you execute the ABAP statements ROLLBACK WORK and COMMIT WORK,,you explicitly implement a database rollback or database commit. There are instances when a database commit is triggered implicitly. Implicit database commits are always initiated whenever the program has to wait, such as when the system sends an SAP screen, when the system sends a dialog message, whenever there are synchronous and asynchronous RFC calls (the question referenced a normal function call, not a Remote Function
Call), or whenyou use the statements CALL TRANSACTION <tcode> or SUBMIT
<program>.
4.	Correct answers: A, B, E, G, K
If a lock is enqueued with a —scope of 2 (the default), the lock is released after you execute the ABAP statements ROLLBACK WORK and COMMIT WORK, or after a program termination. A program termination is produced after a message

Practice Question Answers and Explanations Chapter 8 227

the same work pro‑

V2 update tasks are

ns
also possible to use

P LUW, it should be hat existed prior to SAP LUW is placed

s a rollback or data‑
ROLLBACK WORK and
.ck or database comtriggered implicitly. the program has to En the system sends asynchronous RFC a Remote Function
I <tcode> or SUBMIT

ock is released after
)MMIT WORK, or after
ced after a message

with the type of either A or X, with the execution of the statements LEAVE
PROGRAM and LEAVE TO TRANSACTION, or if the user enters "/n" in the com‑
mand field. The lock can also be released by calling the DEQUEUE function module or the function module D E 0 U E U E—A L L.
5.	Correct answer: A database view
There are two ways to implement a table join. One is to create 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.
5.	Correct answer: C
SAP table buffers exist separately for each application server, and there is a limited amount of buffer space on each. As data is accessed by users, the data that is contained within the table buffers changes as more recent data replaces older data. This means that it is normally a very rare occurance that the contents of the buffers across application servers match.
5.	Correct answer: B
It is not necessary for the field names to match the columns selected. What is necessary is for the size and type of the fields to match.
5.	Correct answer: C, D, E
An ENDSELECT is not required because these SELECT statements do not loop. A SELECT SINGLE statement only returns one record, and both the INTO TABLE and APPENDING TABLE fill the destination in a block mode. Because none of these statements is a SELECT loop, the ENDSELECT is not necessary.
5.	Correct answer: B
The database optimizer determines which index to use. Under most circumstances, it is based on the fields provided in the WHERE clause, and which indexes exist for the database table.
5.	Correct answer: A
This is correct. Open SQL does not allow you to provide any direction directly to the underlying database.
5.	Correct answer: B
The decision to buffer database tables is more complex than a simple determination based on the expected 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 to buffer a database table should be

228 Chapter 8 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, however, is that for the buffer to be used, it must be a SE LECT statement that specifies the full buffered key with equalities only.
12.	Correct answer: A All Open SQL commands allow processing on multiple rows.
12.	Correct answer: B
The —WAIT parameter defines whether a lock request should be repeated if the first lock attempt fails. It does not wait for the lock to become available.
12.	Correct answer: B
You must not use the explicit ABAP statements COMMIT WORK or ROLLBACK WORK in the update module.
12.	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. Ifyou 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 is processed.
12.	Correct 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.
12.	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. However, 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 Chapter 8 229

ith the system
) and 100 times he speed, how,ment that spec‑
S.

'd be repeated if ecome available.
pRK or ROLLBACK
I tables as late as
RFORM ON COMMIT
al tables as form ate module and
g the PERFORM ON
,t update module
know the data is , read the data to .nge, and finally lnay be waiting for
updates to the log uns quicker. How,vhat data was lost

19. Correct answer: B
V1 modules can either be restartable or non-restartable. V2 tasks are always restartable.

Take Away
You should now be able access fields from a database table or tables efficiently. You should also be able to describe the difference between an SAP LUW and a database LUW. You should also understand why update tasks need to be bundled. You must understand the different types of Open SQL SELECT statements and what improves or decreases access performance.

Refresher
You will need a thorough understanding of the different types of update, commit, and rollback strategies. You must also understand efficient data access. You must understand when to choose a type of update strategy and why it is the best solution. You must understand the concept of logical units of work and how SAP LUWs and database LUWs work together. Table 8.3 shows the key concepts for the SQL statements and update strategies.

Key Concept	Definition
SELECT	Defines how to retrieve data from a single database table or
multiple database tables efficiently
Bundling updates	Defines what types of asynchronous and synchronous update tasks may be performed
Commit and rollback	Defines how the commit and rollback provides a consistent database
Locks	Defines how locks should be used to synchronize users' access to data
Table 8.3 Key Concepts Refresher

Practice Questions Chapter 9 273

[nderstanding of the and on the certificafound on the exam ct. Select the correct
.i the following solu‑

tion section. Remember thatyou must select all correct answers and only correct answers to receive credit for the question.

1. ABAP is a programming language that:
•	A. Executes on all three levels of the three-tier architecture
•	B. Controls the business logic
•	C. Processes and formats data
D. Interacts with the user
•	E. Separates program code from language text

2. Which events can exist in all types of programs that actually contain executable statements?
•	A.LOAD-OF-PROGRAM E-1 B. INITIALIZATION
•	C.START-OF-SELECTION
•	D. AT LINE-SELECTION
•	E. AT USER-COMMAND
F. AT PF##

3. Dynpros can be placed in which program types?
•	A. Executables
•	B. Module pools
C. Function groups
D. Class pools

4. A change request is part of a task?
•	A. True
•	B. False

5. Which statements about ABAP are true?
•	A. Each statement must begin with a keyword.
•	B. Each statement must end with a period.
•	C. ABAP keywords and additions must be in uppercase.

t a section after the rhich the data types, mr can be declared.
that cannot be sepamodules, and event control structures in
V program is part of mal parameters and

ual parameter to the own memory space. the calling program. the calling program
he actual parameter, irameter is passed to parameter if the pro‑
erface declared using nt. We discussed the in Chapter 14, ABAP event handlers, and ks. An event block is fined in every ABAP ~rface pools — and is nment occurs. It beext modularization.

274 Chapter 9 Basic ABAP Programs and Interface Creation

6. A development object can be assigned to only one package.
•	A. True
B. False

7. A development object can be assigned to only one change request.
•	A. True
B. False

8. Each ABAP program:
•	A. Is divided into processing blocks

•	B. Assigns every executable statement to a processing block regardless of it being in a processing block
•	C. Only assigns executable statements in a processing block to a processing block
D. Uses event blocks to trigger events in ABAP
E. Has declarative statements outside of processing blocks which are considered local
F. has declarative statements inside of processing blocks which are consid

ered local
•	G. Can be tested from the ABAP Workbench by pressing

9. Which modularization units can raise an exception?
•	A. Function modules
B. Methods
C. Subroutines (FORM routines)

10. Which types of programs or parts of programs can be tested directly from the ABAP Workbench or ABAP Editor?

•	A. REPORT
•	B. PROGRAM
•	C.FUNCTION-POOL
•	D. FUNCTION MODULE
E. CLASS-POOL

F81

Practice Questions Chapter 9 275

:age.

ige request.

ested directly from

•	F. METHOD
•	G.INTERFACE-POOL
H.TYPE-POOL
1:1 LINCLUDE
11. Which method of passing parameters is preferred for its performance?
1:1 A. Pass by reference
•	B. Pass by value
12. Which modularizations units are global?
•	A. Function modules
B. Subroutines (FORM routines)
•	C. Methods within a local class in the program
D. Methods within class pools
13. FORM routines (subroutines) can be used in which type of program:
•	A. Executables
•	B. Module pools
C. Function groups
D. Class pools
E. Interface pools
•	F. Subroutine pools
G. Type groups
14. You can use the logical expression I S SUPPLIED for any formal parameter passed to which modularization unit?
•	A. Subroutine (FORM routine)
B. Function module
C. Static method
D. Instance method

clock regardless of it
lock to a processing
zs which are consid‑
,s which are consid‑
9 I F8 )

276 Chapter 9 Basic ABAP Programs and Interface Creation

15. A selection screen can only be defined in an executable program.
1:1 A. True
•	B. False

16. Subroutines provide which types of parameters?
•	A. Input
B. Output
C. Input/output (changing)
•	D. Return values
•	E. Exceptions

17. Function modules provide which types of parameters?
•	A. Input
B. Output
•	C. Input/output (changing) E:1 D. Return values
•	E. Exceptions

18. Methods provide which types of parameters?
•	A. Input
B. Output
C. Input/output (changing)
•	D. Return values
•	E. Exceptions

19. It is not possible to test a function module if another function module of the same function group contains a syntax error.
•	A. True
B. False

	Practice Question Answers and Explanations Chapter 9 277	

de program.	20. Each button on a Dynpro (screen) requires the assignment of a function 

code. This function code:

•	A. Is used to define global variables that receive a value when the button is clicked

•	B. Can be used to identify when the button is clicked by looking for the function code in the screen's OK CODEfield
•	C. Prevent the function code from be assigned to a menu item

21. Which message types behave the same regardless of the context in which they are called?

1:1 A. A
•	B. E
•	C. I
D. S
E. W
F. X

Practice Question Answers and Explanations
1. Correct answers: B, C, D, E
ABAP does not, however, execute on the database server. Although it can be considered to interact with the database through the database interface, it does not execute on the database level. Nor does it actually execute on the presentation server. It interacts with the presentation server normally through the SAP GUI, but the only execution occurs on the application servers.

2.	Correct answer: A
The only event common to all executable programs is LOAD - OF - PROGRAM.
2.	Correct answers: A, B, C
Dynpros are not possible in methods or classes.
2.	Correct answer: B
A change request holds a task.

action module of the

278 Chapter 9 Basic ABAP Programs and Interface Creation

5.	Correct answer: B
All ABAP statements must end with a period. Whereas it is certainly true that ABAP requires the statement to begin with a keyword, there are cases where the keyword is optional. The most obvious is the COMPUTE keyword, which we have never seen coded in a program (though it certainly helps to know the keyword exists when you are trying to find help on an arithmetic function while in the editor). ABAP does not care if the case of the statements is upper, lower, or mixed.

6.	Correct answer: A
A development object can only be assigned to a single package. It can be reassigned to a different package, but it is only ever assigned to one package at a time.

7.	Correct answer: B
A development object can only be assigned to multiple projects or change requests. Only one project or change request can be active at a time, but over time, it is common for development objects to be assigned to different projects and change requests, and they are changed.
5.	Correct answers: A, B, F
A program is divided into processing blocks, and every executable statement is assigned to a processing block either explicitly or implicitly. Any statement not explicitly included in a processing block is implicitly included in STARTOF-SELECTION. Declarative statements inside a modularization unit are considered local, whereas those outside the modularization units are considered

global. Event blocks are called when the ABAP runtime triggers them.
Whereas almost every ABAP program can be tested simply by pressing 

while in the editor, one type (a module pool) cannot be started from the editor or ABAP Workbench directly. Module pools (dialog programs) must start with a particular screen, and the only way is to run the transaction code that associates the first screen to process. To be able to test in the ABAP Workbench, you must first navigate to the transaction code, which you can then 

execute by pressing

9.	Correct answers: All options
It is currently possible to raise a class-based exception from all three of these modularization units.

I F81

I FBI

Practice Question Answers and Explanations Chapter 9 279

'reas it is certainly true that ,ord, there are cases where 11111E keyword, which we Vainly helps to know the
on an arithmetic function 3f the statements is upper,

le package. It can be reasgned to one package at a

tiple projects or change tctive at a time, but over e assigned to different

y executable statement .Plicitly. Any statement
t1Y included in S TART -
arization unit are conn units are considered ' triggers them.
nPJy by pressing Cff] started from the ediprograms) must start transaction code that `in the ABAP Work-which you can then

~m all three of these

10.	Correct answers: A, D, E, F
Reports, function modules, classes, and methods can all be executed and tested directly. Programs (module pools) can be indirectly tested by testing their corresponding transaction code. Function groups, interface pools, type pools, and includes cannot be tested independently.
10.	Correct answer: A
Pass by reference is always preferable when performance is an issue, whereas pass by value is more suitable for situations where robustness and data consistency are important.
10.	Correct answers: A, D
Any modularization that can be reused is considered global. A method defined within a program cannot be reused, nor should a subroutine (form routine). Both function modules and methods defined in a class pool are considered global.
13.	Correct answers: A, B, C, F
Subroutines cannot be used in classes. Interface pools and type pools cannot have any executable code.
14.	Correct answers: B, C, D
Subroutines do not have optional parameters, and therefore the logical expression IS SUPPLIED cannot be used.
15.	Correct answer: B
Selection screens can be defined in any program that allows screens. Originally, only one selection screen was allowed in an executable program (screen 1000), but with later releases it is now possible to define as many as you want. This capability is why it is possible to place selection screens in programs other than just executable programs.
16.	Correct answers: C, E
Subroutines technically only provide input/output (changing) types of parameters (through USING and CHANGING) and exceptions.
17.	Correct answers: A, B, C, E
Function modules provide input (IMPORTING), output (EXPORTING), and input/output (CHANGING) types of parameters and exceptions (EXCEPTIONS).

28o Chapter 9 Basic ABAP Programs and Interface Creation

18.	Correct answers: All options
Methods provide input (IMPORTING), output (EXPORTING), input/output (CHANGING), and return value (RETURNING) types of parameters and exceptions (EXCEPTIONS).
18.	Correct answer: A
ABAP looks at the whole program during both generation and execution. A syntax error in any part will prevent it from executing.
18.	Correct answer: B
The function code of any menu, button, or Function key is always placed into the OK C0DE field associated with the screen. It can also be found in the system variable S Y - U C 0 M M.
18.	Correct answers: A, F
The abort or terminate message type always causes a program termination, and control returns to last area menu. The exit message type always triggers a runtime error with short dump.

Take Away
You will need to understand how transports are organized. Remember that a change request is commonly called a transport and contains tasks assigned to specific developers. It is also important to recognize the various types of programs: Executable programs, also known as reports, module pools, also known as dialog programs, function groups, which contain function modules, and class pools, which contain methods, are the primary program types you need to understand. Within each of these, you need to understand the types of modularization and how events are triggered.
You also need to be able to distinguish which types of screens, when displayed, use the SAP GUI versus a Web browser. Classical screens, or Dynpros, and selection screens use the SAP GUI, whereas Web Dynpro and Business Server Pages, for example, use a Web browser. Web Dynpro is discussed in detail in Chapter 20, User Interfaces (Web Dynpro). You are expected to be able to identify how a classic screen (Dynpro) handles fields and buttons and their use in function modules. Included with this classic screen handling are both selection screens and modal dialog boxes.

Take Away Chapter 9 281

JING), input/output rameters and excep‑

ion and execution. A

key is always placed i also be found in the

program termination, e type always triggers

You will need to understand the use of authorization checks and modularization units. This includes how to call them and options for providing data.
Last is how messages work in different contexts. You will need to understand where messages are displayed and the behavior of the program following the message production.
Refresher
You must understand various types of modularization blocks. Events, subroutines, methods, function modules, and dialog modules will all play a part in the certification examination. You must know how they are defined, how they are called including their interface or signature, and how they behave with the production of a dialog message. You must have a thorough understanding of the techniques of both pass by value and pass by reference.
Classical screen (Dynpro) handling is also essential knowledge. You must understand how screens are called, what distinguishes a screen from a modal dialog box and from a selection screen. You should understand how to define all three and in which types of programs they can be produced.
Table 9.9 shows the key concepts of basic ABAP programs and interfaces creation.
Key Concept	Definition
Modularization units	The procedural modularization units of an ABAP program are its processing blocks.
Dynamic program	A dynamic program consists of a screen image or layout
(Dynpro)	and its underlying flow logic.
The main components of a screen are:
4	Attributes: such as screen number and next screen
Layout: the arrangement of texts, fields, and other elements
Element attributes: definitions of the properties of individual elements
4	Flow logic: calls of the relevant ABAP modules Table 9.9 Key Concepts Refresher

:ed. Remember that a ains tasks assigned to various types of proule pools, also known ,on modules, and class m types you need to l the types of modular‑
Teens, when displayed, Dr Dynpros, and selecBusiness Server Pages, ed in detail in Chapter able to identify how a ~r use in function mod-selection screens and

316 Chapter 10 ABAP Dictionary

Practice Questions
The practice questions below will help you evaluate your understanding of the topic. The questions shown are similar in nature to those found on the certification examination, but whereas none of these questions will be found on the exam itself, they allow you to review your knowledge of the subject. Select the correct answers and then check the completeness of your answers in the following solution section. Remember that you must select all correct answers and only correct answers to receive credit for the question.

1. A Transparent table can include a deep structure.
•	A. True
B. False

2. ABAP data types can be used for a domain definition.
1:1 A. True
•	B. False

3. Which of the following statements are true?
•	A. A conversion routine can be assigned to a domain.
B. A conversion routine can be assigned to a data element.
C. You define the value range in the data element.
•	D. You can enter documentation for the data element in the ABAP Dictionary.

4. F1 Help on the screen field displays the data element documentation.
•	A. True
B. False

5. Which of the following are true statements?
•	A. The technical attributes of the data element can be defined by a domain,
that is, the data type, the field length, and the number of decimal places.
B. You can also select predefined data types to define the data type of the data element.

Practice Questions Chapter 10 317

x understanding of the found on the certificawill be found on the f the subject. Select the r answers in the follow)rrect answers and only

•	C. Reference data types can be used to define the data type of the data element.
•	D. Field labels are defined for the domain.
6. You can define search helps and parameter IDs for a data element.
•	A. True
B. False

7. The line type for a table type can contain a flat, nested, or deep structure.
•	A. True
B. False

n.
n.
cement.
ent in the ABAP Dictio‑
rit documentation.
be defined by a domain, ber of decimal places.
I
,me the data type of the	8. Which of the following are true statements?
•	A. Table fields can be assigned to a data element.
B. Table fields can be assigned to an ABAP Dictionary data type directly.
C. Search helps can be defined for a table field that is assigned to a predefined data type.
D. A reference table and field are required for fields with the data types OU AN and CURB.
9. Which of the following is a true statement regarding search helps?
•	A. You can use a maintenance view for the search help selection method.
B. You can use a database view for the search help selection method.
C. Help views can also be used for the selection method for search help. 1:1 D. You can use transparent tables for the search help selection method.
10. Which of the following regarding search helps is a true statement?
•	A. The interface for the search help is defined by the IMP (import) and EXP (export) flag of the search help parameter.
B. The LPos parameter defines the position of the search help parameter in the search hit list.
C. The SPos parameter defines the position of the input field on the dialog screen.	

318 Chapter 10 ABAP Dictionary

•	D. The text table for the selection method is automatically populated if the text table is attached to the database table being used as the selection method.

11. Which of the following are true statements?
•	A. A database view is implemented as an inner join.
B. A maintenance view is implemented as an outer join.
C. A database view is implemented as an outer join.
D. A maintenance view is implemented as an inner join.

12. Which of the following are true statements?
•	A. The tables included in the maintenance view should have foreign key relationships.
B. The tables included in the help view should have a foreign key relationship.
C. Projection views can have more than one table included for the view definition.

•	D. You cannot use a pooled or cluster table for database view.
13. You can create projection views for pooled or cluster tables.
•	A. True
B. False

Practice Question Answers and Explanations
1 Correct answer: B
Transparent tables can include flat structures only. A deep structure is not allowed.
2. Correct answer: B
You can use ABAP Dictionary data types for domain definition. ABAP data types cannot be used for the domain definition.

Practice Question Answers and Explanations Chapter 10 319

!ally populated if the sed as the selection

n.

yin.

uld have foreign key
foreign key relation‑
uded for the view def‑
e view.
tables.

ons

deep structure is not

definition. ABAP dalM

I Correct answers: A, D
A conversion routine can be assigned to the domain and cannot be assigned to a data element. The value range is assigned to the domain during its definition and not to the data element. However, the data element inherits the value range if it's assigned to a domain with a value range definition. You provide the documentation for the data element during the definition.
4.	Correct answer: A
F1 help displays the data element documentation.
4.	Correct answers: A, B, C
The technical attributes of the data element are defined by the domain if the domain is used for the data type definition for the data element. The data type for the data element can be a predefined ABAP Dictionary type or domain or a reference data type. Field labels are, defined for the data element only and not for domain.
4.	Correct answer: A You can define a search help and parameter ID for the data element.
Correct answer: A
The line type for the ABAP Dictionary table type can be a complex structure. It can be a flat, deep, or nested structure.
4.	Correct answers: A, B, D
Table fields can be assigned to the data element or the predefined type directly. Search helps cannot be defined for a table field assigned to the predefined data types. Search helps can be defined for fields assigned to the data element. The reference table and field are required for the table field assigned to data types QUAN and CURB. The reference type field should be UNIT and CUKY.
4.	Correct answers: B, C, D
The selection method for the search help can be a transparent table, database view, or help view. You cannot have a maintenance view as a selection method for the search help.
4.	Correct answers: A, B, C, D
The interface for the search help is defined by the import and export parameter of the search help parameter. I-Pos defines the position of the parameter on the hit list, whereas SPos defines the position of the parameter on the

32o Chapter 10 ABAP Dictionary

input screen. The text table is automatically assigned to the selection method if it is assigned to the selected transparent table of the selection method.
11.	Correct answers: A, B
A database view is implemented as an inner join, whereas a maintenance view is implemented as an outer join.
11.	Correct answers: A, B, D
Tables included in a maintenance view and help view should have a foreign key relationship. You cannot use pooled and cluster tables for the database view. Projection views can include only one table for the view definition and can include pooled or cluster tables for the view definition.
11.	Correct answer: A A projection view can include pooled or cluster tables for view definition.
Take Away
You should now understand the various ABAP Dictionary objects and services. You should be able to explain the concept of domains, data elements, table types, structures, tables, indexes, and views. You should be able to distinguish between different types of view supported by the SAP system and their uses.
You must also understand the lock object concept and its definition and the use of search helps. It is important to know which type of object can be used for the selection method of the search helps. You should also know the difference between the elementary search help and collective search help and the steps to create the search help.
Lock objects are important for any application development, and you should be able to create lock objects and use them in your application.
Refresher
You must understand ABAP Dictionary objects and the supported services, that is, lock objects and search helps. You should be able to define domains, data elements, structures, table types, and transparent tables. You should know the supported data types for domain and data element definition and the concept of a value table and value range and its use in the domain definitions. It is important

Summary Chapter 10 321

to understand which Dictionary objects can be used in the ABAP program and their scopes.
You also must understand the difference between outer join and inner join and which type of join is implemented in different types of view.
Table 10.4 shows the key concepts of the ABAP Dictionary.

Key Concept	Definition
Domain Domains are used to manage technical properties of the data object centrally and cannot be used in the program directly. A domain can use an ABAP Dictionary data type only for its definition.

I to the selection method he selection method.
whereas a maintenance
!w should have a foreign -r tables for the database r the view definition and ,fi
, inition.
les for view definition.
I

Data elements

A data element is a complete description of a field. Data elements provide F1 help for the screen field and field label for the screen.

iary objects and services. ata elements, table types, le to distinguish between ad their uses.

ABAP Dictionary table

Its definition and the use )bject can be used for the lso know the difference Bch help and the steps to

'ment, and you should be ation.

~ supported services, that define domains, data elerou should know the suption and the concept of a Definitions. It is important

Tables are defined in the ABAP Dictionary independently of the underlying database. A physical table definition is created in the database upon activation of the ABAP Dictionary table.

Table 10.4 Key Concepts Refresher

Summary
You should now be able to define ABAP Dictionary objects and use them in your program or application. You should also know how to lock tables or the table record within an application. Lastly, you should be able to define elementary search helps and collective search helps and know how to enhance a standard search help. The knowledge of the ABAP Dictionary and its function will easily allowyou to pass this topic on the certification examination.

Important Terminology Chapter 11 339

Important Terminology
Elementary data objects of types x and x s t r i n g are byte type, and the following elementary data objects are considered character type: c, d, n, t, string. Structures in Unicode are grouped by components of the same or similar data types, which produces a fragment view. Fragments can also be based on alignment gaps.
Practice Questions
The practice questions below will help you evaluate your understanding of the topic. The questions shown are similar in nature to those found on the certification examination, but whereas none of these questions will be found on the exam itself, they allow you to review your knowledge of the subject. Select the correct answers and then check the completeness of your answers in the following solution section. Remember that you must select all correct answers and only correct answers to receive credit for the question.
1. Unicode checks can be made:
•	A. In any system (after Release 6.10) by specifying the program has Unicode checks active
B. By running Transaction UCCHECK
C. Only in a Unicode system or as part of a conversion to a Unicode system
D. Cannot be enforced
2. Memory requirements are identical in a non-Unicode system and in a Unicode system.
•	A. True
B. False
3. A difference between a Unicode and non-Unicode program is:
•	A. Byte-type data objects cannot be assigned to character-type data objects.
B. Byte-type data objects cannot be compared to character-type data objects.

mutable in a non-Unintax rules for the file ng data access in Uniprograms.
explicitly using OPEN tin. In a non-Unicode led using the standard o an open file in non-ice within a program. storage must be spec‑
NGJUPDATE and [LEG‑
lust be used to specify
Y MODE, the byte order
In non-Unicode pro-standard settings. An

read. In non-Unicode ;e files.
icter-type data objects type and numeric data
East Asian characters: match the number of full-width characters).
c with length 1) are 8 code systems. In Unicharacters) fit in one ke up two screen col‑
i only one screen col‑

340 Chapter 11 Unicode

•	C. Offset positioning in a Unicode structure is restricted to character data objects.
•	D. Offset positioning in a Unicode structure is restricted to flat data objects.
4. Two structures in Unicode programs are only compatible if all alignment gaps are identical on all platforms.
•	A. True
B. False

5. The enhancement category for a database table or structure:
•	A. Makes a table Unicode compliant
B. Specifies the types of changes that can be made to the structure
C. Can produce warnings at incompatible points for the structure
D. Can identify where program behavior may change

6. In a Unicode system when opening a file in TEXT MODE, you must specify:
•	A. The ENCODING addition
•	B. The byte order
C. The code page

7. Ina non-Unicode system when opening a file in TEXT MODE, you should specify:
•	A. The ENCODING addition
B. The byte order
C. The code page

Practice Question Answers and Explanations
1. Correct answers: A, B
SAP provides the tools to perform or enforce the Unicode checks prior to your actual conversion. The ability to enforce Unicode checks exists in any release after Release 6.10 (when Unicode was supported) without the need to actually convert to Unicode. The recommendation is to turn the check on as

Take Away Chapter 11 341

icted to character data
ted to flat data objects.
)atible if all alignment
ructure:
the structure the structure
I D E, you must specify:
MODE, you should spec‑
Jons
nicode checks prior to ic checks exists in any
?d) without the need to to turn the check on as

soon as possible to minimize the amount of changes to developed programs. It is better to develop new programs correctly rather than possibly introduce an issue when going back to make a change to the program later.
2.	Correct answer: B
No, memory requirements will always be larger on a Unicode system owing to the increased size of the characters. Depending on the method of encoding, the increase may be slight, but it will be larger.
2.	Correct answers: All options
Owing to the enforcement of byte-type and character-type rules, on a Unicode system only byte-type fields may be assigned or compared to other byte-type fields. The same is true for character-type fields. Offset positioning is restricted to flat data objects or a character data objects.
2.	Correct answer: A
Two structures in Unicode programs are only compatible when all alignment gaps are identical on all platforms. This applies in particular for alignment gaps that are created by included structures.
2.	Correct answers: B, C, D
The enhancement category makes it possible to recognize and handle problems related to structure enhancements. This classification is used during the program check to create a warning at all points where it works with structures, and where later structure enhancements can cause syntax errors or changes in program behavior.
2.	Correct answer: A
In a Unicode system you must specify the ENCODING addition when opening a file (dataset). '
2.	Correct answers: B, C
In a non-Unicode system you must specify both the byte order and the code page when opening a file (dataset).
Take Away
You will need to understand what Unicode is and why it is necessary in a global environment. You should have knowledge of differences between data objects in a non-Unicode system and data objects in a Unicode system. You should have an

342 Chapter 11 Unicode

understanding of what additions to statements exist and what changes to syntax validation are enforced in Unicode.
Refresher
You need to understand the different data object types that produce either a byte-type data object or a character-type data object or a structure and how the fragment view restricts certain assignments or comparisons. You will also need to understand what restrictions for file processing exist with Unicode.
Table 11.3 lists the key concepts of Unicode.

Key Concept	Definition
Byte type	Elementary data objects of types x and xstri ng are byte type.
Character type	The following elementary data objects are now character type: c, d, n, t, string.
Fragment view	A fragment is a grouping of structure components of the same or similar data types.
Table 11.3 Key Concepts Refresher

Tips
Whereas the vast majority of the concepts presented in this chapter should be second nature, especially if you have programmed on SAP Release 6.20 or later, it is important that you understand the behavior differences of assignments, comparisons, and file processing.

Summary
You should now be able to make an ABAP program Unicode compliant. You should have an understanding of the potential issues related to data objects and file processing. This knowledge will enable you to successfully pass this portion of the certification examination.

384 Chapter 12 Classical Screens

correct answers and then check the completeness of your answers in the following solution section. Remember that you must select all correct answers and only correct answers to receive credit for the question.

1. Which of the following is correct:
•	A. The screen attributes can be modified in the PROCESS AFTER INPUT event block.
B. The screen attributes can be modified in the PROCESS BEFORE OUTPUT event block.
•	C. The screen attributes can be modified in the PROCESS BEFORE OUTPUT and PROCESS AFTER INPUT event blocks.
D. None of the above

2. The static sequence of the default next screen can be established by the value in the screen attribute "next screen."
•	A. True

•	B. False

3. If you enter the value "0" or blank (" ") as the next screen, then the system resumes processing from the point at which the screen was initiated, assuming the next screen attribute is overridden dynamically in the program.
•	A. True
B. False

4. The next screen attribute can be temporarily overwritten by the set screen statement, that is, SET SCREEN 200.
•	A. True
B. False

5. The FIELD statement does not have any effect in the PBO event block, and it should not be used in the PBO event block.
•	A. True
•	B. False

Practice Questions Chapter 12 38E

r answers in the follow)rrect answers and only

6. The FIELD statement with the ON INPUT addition is used to conditionally call the ABAP dialog module. The ABAP dialog module is called if the value of the screen field is other than the initial value.
•	A. True
B. False

CESS AFTER INPUT event
-SS BEFORE OUTPUT event
CESS BEFORE OUTPUT and

7. The FIELD statement with the ON REQUEST addition calls the ABAP dialog module if any value is entered in the screen field.
•	A. True
B. False

established by the value

8. You can call a module for the FIELD statement to validate user entry on the input field. You can validate the entry on the input field and send an error or a warning message from an ABAP dialog module.
•	A. True
B. False

t screen, then the system -een was initiated, assumically in the program.

9. If an error or warning message is sent from the ABAP dialog module for the FIELD statement within the CHAIN and E N D C H A I N statements, then all of the fields within CHAIN and E N DCHA I N are ready for user input again.
•	A. True
B. False

written by the set screen

10. The user interface consists of the GUI status and GUI title.
•	A. True
B. False

e PBO event block, and it

11. A menu bar can have at most 10 menus.
•	A. True
B. False

12. The application toolbar can have up to — buttons on the screen.
•	A. 20
B. 30

386 Chapter 12 Classical Screens

•	C. 10
•	D. 35
E. None of the above

13 A menu can have up to — menu items on the screen including functions, separators, and submenus.

•	A. 15
•	B. 10
•	C. 15 1:1 D. None of the above

Practice Question Answers and Explanations

1.	Correct answer: B
The screen attributes can be modified in the PROCESS BEFORE OUTPUT event block.
1.	Correct answer: A
The screen sequence can be determined from the content of the next screen attribute field, but it can be overridden.

3.	Correct answer: A
If the next screen attribute is not specified, then the system will resume processing from the point at which the screen was initiated. Basically, a next screen of 0/s p ac e terminates the screen sequence. This may result in the user exiting the application.
4.	Correct answer: A
The next screen attribute can be overwritten temporarily by using the SET SCREEN statement.

5.	Correct answer: A
The F I E L D statement is used in conjunction with the module statement in the PAI event block to validate user input or to delay the transport of a field value from the screen to the ABAP program. The ABAP dialog module is called only if the value of the field is changed depending on whether the addition ON
INPUT or ON REQUEST is used.

Take Away Chapter 12 387

ncluding functions,

ns

EFORE OUTPUT event

at of the next screen

tem will resume pro-,ed. Basically, a next nay result in the user

rily by using the SET

~dule statement in the nsport of a field value module is called only !ther the addition ON

6.	Correct answer: A
The FIELD statement used in conjunction with the module statement with the ON INPUT addition is used to conditionally execute the ABAP dialog module if the input value of the field is other than the initial value according to the data Tv P E of the input field.
6.	Correct answer: A
The ON REQUEST addition for the FIELD statement calls the ABAP dialog module onI y if a value is entered in the screen field.
6.	Correct answer: A
You call a module for the FIELD statement to validate user entry on the input field. The entry on the input field associated with the FIELD statement is validated with the dialog module, and accordingly, you can send an error or warning message. The input field is ready for re-input if the dialog module sends an error or warning message for the user input on the screen field.
6.	Correct answer: A
If an ABAP dialog module called with the FIELD statement within CHAIN and E N D C HA I N sends an error or warning message, then all of the fields within the CHAIN and EN DC HA I N are ready for user input.
6.	Correct answer: A
The user interface for a screen consists of the GUI status and the GUI title.
6.	Correct answer: B
The menu bar can have up to eight menus including the system and help menu, which means six can be defined by the developer.
6.	Correct answer: P The application toolbar can have up to 35 buttons per screen.
Correct answer: A
A menu can have up to 15 entries including functions, separators, and sub-menus.
Take Away
You should be able to describe the steps required to write a dialog transaction. You need to create screens, design the screen layout, create screen flow logic, and write an ABAP program for dialog programming. You also need to create a GUI

410 Chapter 13 Selection Screens

 AT SELECTION-SCREEN ON VALUE-REQUEST FOR <Field>
This event is triggered when the user calls value help (F4) on the screen field. The value help displays the possible values from the ABAP Dictionary if no corresponding event block for this event is developed; otherwise, it displays the possible value from the event block. We want to see ABAP Dictionary help if the input field refers to an ABAP Dictionary data type.
Important Terminology
You will need to understand ABAP statements to create selection screens. You should have a good understanding of ABAP statements to create selection screens and the statements for screen layout design.
You can use simple ABAP declarative statements such as PARAMETERS and SELECT-OPTIONS to create input fields for selection screens. You can also use SELECTION -SCREEN statements to design selection screen layout. The selection screen events allow you to control the display of a screen or react to user actions on screen. You can also program F1 help and possible F4 values for input fields on the selection screen by programming the F1 and value help in the event
blocks AT SELECTION-SCREEN ON VALUE-REQUEST and AT SELECTION-SCREEN ON HELP-REQUEST.
4 ictice Questions
The practice questions below will help you evaluate your understanding of the topic. The questions shown are similar in nature to those found on the certification examination, but whereas none of these questions will be found on the exam itself, they allow you to review your knowledge of the subject. Select the correct answers and then check the completeness of your answers in the following solution section. Remember that you must select all correct answers and only correct answers to receive credit for the question.
1. The default selection screen number for the ABAP program is:
•	A. 1000
B. 100

Practice Questions Chapter 13 411

(F4) on the screen field. e ABAP Dictionary if no
°d; otherwise, it displays to see ABAP Dictionary lata type.

,our understanding of the )se found on the certifica)ns will be found on the of the subject. Select the fur answers in the follow~ correct answers and only

program is:

•	C. 1100
•	D. None of the above
2. You can have only one selection screen for an ABAP program.
1:1 A. True
•	B. False
3. The declarative statements used to define the selection screen are:
•	A.PARAMETERS
B.SELECT-OPTIONS
C.SELECTION-SCREEN
•	D. None of the above
4. You use the addition OBLIGATORY to define the input field of a parameter as a required field.
•	A. True
B. False
5. Which of the following statements are correct:
•	A. The SELECT-OPTIONS statement creates an internal table with a header line. The internal table is also known as the selection table.
B. The structure ofthe selection table created with SELECT-OPTIONS has four components: SIGN, OPTION, LOW, and HIGH.
•	C. You can use the addition NO-DISPLAY to hide the input field on the selection screen.
D. You can only specify default values for the LOW and HIGH fields of the SELECT-OPTIONS input field.
6. Your selection screen can be modified at the event:
•	A. AT SELECTION-SCREEN OUTPUT
B. AT SELECTION-SCREEN
•	C. AT SELECTION-SCREEN on <field—name>
•	D. None of the above

to selection screens. You cents to create selection
uch as PARAMETERS and
creeps. You can also use een layout. The selection en or react to user actions F4 values for input fields value help in the event
AT SELECTION-SCREEN ON

412 Chapter 13 Selection Screens

7. Which of the following statements is correct regarding the event AT SELEC‑
TION-SCREEN on HELP-REQUEST FOR <FIELD>?
•	A. Will display F1 help for the input field on the selection screen.
B. This event will display self-defined F1 help for the input field programmed in the event block and will override any help possibly defined in the ABAP Dictionary for the field.
C. None of the above

8. You can define multiple elements in a single line by defining the element
within the block SELECTION-SCREEN BEGIN OF LINE and SELECTION-SCREEN END OF LINE.

•	A. True
•	B. False

9. The addition NO- EXTENSION for SELECT-OPTIONS will allow only one line in
the selection table.
•	A. True
B. False

10. The addition NO- INTERVALS for SELECT-OPTIONS will allow only single fields
on the selection screen.

•	A. True
•	B. False

11. You can define a selection screen as a subscreen or tabstrip control.
•	A. True
B. False

Practice Question Answers and Explanations
1. Correct answer: A
The default selection screen number is 1000. You can define any number of user-defined screens with other numbers.

Practice Question Answers and Explanations Chapter 13 413

rigtheeventAT SELEC‑

ection screen.
)r the input field proielp possibly defined in

)y defining the element .and SELECTION- SCREEN

ill allow only one line in
ill allow only single fields
tabstrip control.
Ltions

2.	Correct answer: B
You can have more than one selection screen within an ABAP program. You can have one default selection screen and any number of user-defined selection screens.
2.	Correct answers: A, B, C
You use PARAMETERS and SELECT-OPTIONS to define the input fields on the selection screen, andyou use the SELECTION- SCREEN statement to format the layout of the selection screen.
2.	Correct answer: A
You use the addition OBLIGATORY to define the input field PARAMETERS and SELECT–OPTIONS as required fields.
2.	Correct answers: A, B, C
The SELECT-OPTIONS statement creates an internal table with a header line. The name of the internal table is the same as the SELECT-OPTIONS variable name. The row type of the internal table is a structure with the four components SIGN, OPTION, LOW, and HIGH. You can hide the input field with the addition NO-DISPLAY, and you can define default values for each of the structure components of the selection table.
6.	Correct answer: A
The selection screen can be modified in the event block AT SELECTION -SCREEN OUTPUT.

7.	Correct answer: A
The event AT SELECTION-SCREEN on HELP-REQUEST FOR <FIELD> displays the F1 help for the input field. It displays F1 help from the ABAP Dictionary if F1 help is not programmed in the event block.
2.	Correct answer: A
You can define multiple elements on the same line by defining the elements within the blocks SELECTION-SCREEN BEGIN OF LINE and SELECTION-SCREEN END OF LINE.

in define any number of

9.	Correct answer: A
The addition NO-EXTENSION for the SELECT-OPTIONS hide the button for multiple selection. As a result, the user cannot specify more than one line for the selection criteria.

414 Chapter 13 Selection Screens

10.	Correct answer: A
The addition NO INTERVALS hides the second input field (HIGH) for the SELECT- OPTIONS statement. Asa result a user can only enter a value for a single input field (LOW) or range of value for the single input field. The user will see a single input field, but he will get the button for multiple selection. When you select the multiple selection dialog box, you can enter ranges, multiple ranges, multiple single values, and so on.
10.	Correct answer: A
You can define the selection screen with a subscreen or tabstrip control using the ABAP language declarative statement.
Take Away
You should be able to describe the use of selection screens in ABAP programming. You need to understand how to define the selection screen and should know the keywords and the syntax to define the selection screen. It is important to know the formatting options available to design the selection screen layout and to know the various events available for selection screens.
You should also be able to design standard selection screens, tabstrips on selection screens, and subscreens for use on these tabstrips within the ABAP program and be able to dynamically modify or validate the user input on the screen or provide the possible entries for the fields within the appropriate event blocks.
Refresher
Table 13.2 shows the key concepts for selection screen.
Key Concept	Definition

Selection screen	A selection screen is an interface between the user and the program. You can define a selection screen by using the ABAP
language declarative statements such as PARAMETERS and
SELECT-OPTIONS, and you can design the screen layout with the declarative statement SELECTION-SCREEN without using the Screen Painter or Menu Painter.	

Table 13.2 Key Concepts Refresher

Practice Questions Chapter 14 447

= cliff.

ON

e OF counter

S.

Practice Questions
The practice questions below will help you evaluate your understanding of the topic. The questions shown are similar in nature to those found on the certification examination, but whereas none of these questions will be found on the exam itself, they allow you to review your knowledge of the subject. Select the correct answers and then check the completeness of your answers in the following solution section. Remember that you must select all correct answers and only correct answers to receive credit for the question.
1. Which of the following is a true statement:
•	A. Static attributes can be declared only in the private visibility section of the class.
B. Static attributes are declared with the CLASS -DATA statement.
C. A static attribute is the same across all instances of the class. There is only one static attribute across all instances of the class.
D. Static attributes cannot be changed by an object.
2. Private components of the class cannot be addressed directly from outside the class except when the friendship concept applies.
•	A. True
B. False
3. Subclasses can access the private components of the parent class.
•	A. True
B. False
4. Subclasses inherent all the components of the parent class.
•	A. True
B. False
5. Public methods can access the private attributes of the same class.
•	A. True
B. False

id Registration
! called in the sequence in

448 Chapter 14 ABAP Object-Oriented Programming

6. Protected attributes can be accessed by methods of the class and its subclasses.
•	A. True
B. False

7. You cannot use the LIKE statement to define an attribute in a class.
•	A. True
B. False

8. The READ-ONLY addition for the attribute declaration can be used in the private and public visibility section.
•	A. True
B. False

9. The READ-ONLY attribute cannot be addressed outside the class.
•	A. True
B. False

10. Which of the following are correct statements?
•	A. Class methods assigned to the public visibility section can be accessed
outside the class using the static component selector and the class name.
B. Static methods can be defined in both the public and private visibility section of the class.
C. Only public methods can be addressed outside the class.
D. You can call private methods within the public methods without reference to the object or class.
E. None of the above

11. The constructor method is called automatically when you create an instance of the class.
•	A. True
•	B. False

Practice Question Answers and Explanations Chapter 14 449

e class and its sub‑

12. The class constructor method is called automatically when you access the class for the first time.
•	A. True
B. False

to in a class.

13. The constructor method is always defined in the private visibility section of the class.
•	A. True
B. False

in be used in the pri‑
the class.
ection can be accessed and the class name.
Rd private visibility sec‑

14. You can call the constructor method directly.
•	A. True
B. False

15. Object or class events can trigger any number of handler methods.
•	A. True
B. False

e class.
paethods without refer‑

Practice Question Answers and Explanations
1.	Correct answers: B, C
Static attributes can be defined in the private and public visibility sections of the class. Static attributes are defined with the C LASS -DATA statement in the definition part of the class. Static attributes exist once per class and are the same for all of the runtime instances of the class. If you change the static attribute of the class, this change will apply for all of the instances of the class. Static attributes can be changed by an instance of the class. All of the objects of the class can access the static attribute of the class.

I you create an instance

2.	Correct answer: A
Private attributes cannot be addressed outside the class, but a class that is a friend overrides this principle and can access the private attributes of the class.

450 Chapter 14 ABAP Object-Oriented Programming

3.	Correct answer: B
Subclasses inherit all components of the parent class but can only directly access public and protected components. However, the class also inherits the public methods from the superclass, which will indirectly allow access to the inherited private attributes. If a subclass inherits a private component, this private component cannot be accessed directly. Private means private; this is why we have protected sections — so that when we have a subclass, it can access inherited components.
3.	Correct answer: A
The subclass inherits all components from the superclass, but can then add additional components or can redefine inherited methods. Refer to Chapter 17, Class Identification Analysis and Design, for more information on this.
3.	Correct answer: A Public methods can access all of the attributes of the class.
3.	Correct answer: A
Protected components can be accessed by the class and subclass. They cannot be addressed directly outside the inheritance tree.
3.	Correct answer: B
The L  KE statement is allowed only for local data objects (for example, within a method) or system variables.
3.	Correct answer: B
READ -ONLY attributes are defined in the public section and can be accessed outside the class. The value of the READ-ONLY attributes cannot be changed.
3.	Correct answers: A, B, C, D These are correct for the following reasons:
4	Class methods or static methods assigned to the public visibility section of the class can be accessed outside the class with reference to the class because you do not need to instantiate the class to be able to work with them.
Static methods can be defined in both the public and the private visibility section of the class. You can access the static public methods outside the class, but not the static methods assigned to the private visibility section.
4	Only the methods assigned to the public visibility section can be addressed outside the class.
Private methods of the class can be called within the public methods of the same class without reference to the class or object.

Take Away Chapter 14 451

can only directly s also inherits the [low access to the component, this ins private; this is a subclass, it can

but can then add Refer to Chapter rmation on this.

iclass. They cannot
or example, within
id can be accessed nnot be changed.

10.	Correct answer: A
The constructor method is called automatically every time you instantiate the class, that is, every time a new object is created.
11.	Correct answer: A
The class constructor method is called automatically when you access the class for the first time, that is, when creating an object, calling a static method, and so on.
12.	Correct answer: B
The constructor method and the class constructor method are always defined in the public visibility section.
13.	Correct answer: B
You cannot call the constructor method directly; it is called automatically.
14.	Correct answer: A
When an instance or class event is triggered, any number of handler methods can be called. Only the handler methods registered for the triggering event are called when the event is triggered.
Take Away
You should be able to explain the basic object-oriented programming concepts. You should be able to explain the key components of an ABAP class such as attributes, methods, and events and be able to use them for object-oriented application development. You should be able to differentiate between instance components and static components. By nowyou should also have a good understanding about the visibility concepts in ABAP Objects and be able use them appropriately to create an ABAP class.
Refresher
Table 14.1 shows key concepts for ABAP Objects.

visibility section of nce to the class be-to work with them.
he private visibility iethods outside the - visibility section.
)n can be addressed
iblic methods of the

48o Chapter 15 ALV Grid Control

Event	Description
PRINT-END-OF-PAGE	Print mode: END_OF_PAGE in list processing
PRINT_TOP_OF_LIST	Print mode: TOP _OF–LIST of classic ALV
PRINT-TOP-OF-PAGE	Print mode: TOP_OF_PAGE in list processing
RIGHT-CLICK	Right mouse button clicked on control
SIZE-CONTROL	Control resized
SUBTOTAL-TEXT	Edit subtotals text
TOOLBAR	Toolbar
TOOLBAR_BUTTON_CLICK	Toolbar button chosen
TOOLBAR-MENU-SELECTED	Toolbar menu entry selected
TOOLBAR_MENUBUTTON_CLICK	Toolbar menu button chosen
TOP_OF_PAGE	Top of page
TOTAL-CLICK-ROW-COL	Click on totals line
USER-COMMAND	User command
Table 15.7 Events for CL_GUI_ALV_GRID (cont.)
Practice Questions
The practice questions below will help you evaluate your understanding of the topic. The questions :shown are similar in nature to those found on the certification examination, but whereas none of these questions will be found on the exam itself, they allow you to review your knowledge of the subject. Select the correct answers and then check the completeness of your answers in the following solution section. Remember that you must select all correct answers and only correct answers to receive credit for the question.

1. What is the best order to provide an event handler for an ALV:
•	A. Create the ALV, write the handler, register for the event, display the ALV
B. Register for the event, write the handler, create the ALV, display the ALV
C. Write the handler, register for the event, create the ALV, display the ALV

Practice Questions Chapter 15 481

E in list processing	
	
r of classic ALV	2.	
in list processing		
(ed on control		

acted

iosen	3. To reserve an area on the screen for an ALV Grid Control you must:
•	A. Create an object (instantiate the object) of the class CL—GUT—CUSTOM—CON‑
TAINER
•	B. Create an object (instantiate the object) of the class CL—GUI—ALV—GRID
C. Create an object (instantiate the object) of the class CL_SALV_TABLE
D. Use the Screen Painter

ur understanding of the e found on the certificaS will be found on the if the subject. Select the r answers in the followDrrect answers and only

or an ALV:
event, display the ALV e ALV, display the ALV ! ALV, display the ALV	4. You must call a method to actually display the contents of the display table after you create an ALV.
•	A. True
B. False

5. The field catalog allows you to:
•	A. To add a field to the display
B. To specify the sort order of the display table
•	C. To produce a striped pattern for the display lines
•	D. To change the title of a column
E. To change the display order of a column	

D.	Write the handler, create the ALV, register for the event, display the ALV
E.	Write the handler, create the ALV, display the ALV, register for the event

The differences between displaying in a full screen and in a container are:
A.	The full screen requires dynpro, programming.
A.	The container requires the use of an additional object (a container control).
The only difference is that the container name must be specified when creating the ALV object.

•	D. Only a full-screen ALV allows the use of event handling.
•	E. Only an ALV in a container allows the use of event handling.
•	F. Any type of ALV allows the use of event handling.

482 Chapter 15 ALV Grid Control

6. Which class is used to define a reference for an instance of the ALV Object Model:
•	A. Class CL_GUI_CUSTOM_CONTAINER
B. Class CL_GUI_ALV_GRID
C. Class CLSALV—TABLE

7. You use the CREATE OBJECT statement to create both types of ALV.
•	A. True
B. False

8. The ALV Object Model:
•	A. Is a group of classes that describe the ALV grid as a whole and inherit from a single class
B. Is a group of hierarchal classes that describe the ALV grid as a whole but do not inherit from a single class

Practice Question Answers and Explanations
1 Correct answer: D
You should write the handlers, create the ALV, and then register the events of the ALV you just created before you actually display the ALV.
2.	Correct answers: B, F
The container requires the use of an additional object to link the control that exists on the presentation server to the program running on the application server. A container control provides this function and is produced from the
class CL_GUI_CUSTOM_CONTAINER.
2.	Correct answer: D
To allocate an area on the screen you use the Screen Painter to "draw" the container on the screen and name it. Later when the program creates the object for the container, this name is used to assist in linking the control in the SAP GUI with the application program.
2.	Correct answer: A
This is true for both versions of ALV. In both cases you create the ALV and then call a display method for that object. The method for the ALV Grid Con‑

Take Away Chapter 15 483

of the ALV Object

ies of ALV.

[ whole and inherit
grid as a whole but

ns

t register the events ie ALV.

link the control that on the application produced from the

driter to "draw" the )rogram creates the eking the control in

create the ALV and r the ALV Grid Con‑

trol is SET—TAB LE—FOR—F I RST—D I SP LAY of the class C L — GUI — ALV—GRI D, and for the ALV Object Model the method is D I S P LAY from the class C L—SA LVTAB L E.
5.	Correct answers: A, D, E
The field catalog allows you to add a column to the display, hide a column from the display, change the title of a column, or place the columns in a different order. The ALV Grid Control expects different parameters to provide information for sorting, filtering, changing the layout, or providing variants.
5.	Correct answer: C
The ALV Grid Control uses the class C L G U I A L V_G R I D, and the ALV Object Model uses the class CL—SALV—TABLE.
5.	Correct answer: B
The CREATE OBJECT statement is only used to instantiate the ALV Grid Control. The FACTORY method of the class C L — SALV — TABLE is used to instantiate an ALV Object Model ALV grid. The CREATE OBJECT is in fact inside the FACTORY method, so an object is created for you, and then the reference is passed back out of the method.
5.	Correct answer: B
The classes of the ALV Object Model are not superclasses and subclasses in the sense of object-oriented ABAP; that is, the classes lower in the hierarchy here do not inherit the properties of the classes higher in the hierarchy. The terms hierarchy, superobject, and subobject should rather illustrate how all objects together represent the ALV as a whole.
Take Away
You will need to understand the field catalog: how to produce one and how to modify it. You need to know the process for producing an ALV in a full screen and in a container, in both versions of the ALV. You also need to know about event handling for an ALV. You need to know the steps: write the handler, register the event, and where to identify what events can be triggered.
Refresher
You must understand the steps necessary to place an ALV grid in a container: from allocating space in the screen using Screen Painter to creating the container

Practice Questions Chapter 16 505

Meaning
These are optional. Can be used to encapsulate subfunctions of the component controller.
Only one configuration controller can exist in any component. It is only necessary if the corresponding component implements special configuration and personalization functionality.

ngular part of a page fins Ul elements such
ssible combination of

Is located -
lobal data of control‑

Dnnect to the inbound ; are part of the conned to one view.
interface view. The ynpro application so L URL.

ie user in the view. -ontroller.
outside the compo‑
;a Web Dynpro compo‑

tre used to communiDne controller to trigger er. Only one exists per ce. It drives the func‑

Only one per window. Can be used to process the data passed via the inbound plug when reused as a child controller.

A component that uses functionality (consumes) in another component (the used component).
A component that has functionality used by another component (the consumer component).

Table 16.2 Definitions for Web Dynpro (cont.)

Practice Questions

The practice questions below will help you evaluate your understanding of the topic. The questions shown are similar in nature to those found on the certification examination, but whereas none of these questions will be found on the exam itself, they allow you to review your knowledge of the subject. Select the correct answers and.then check the completeness ofyour answers in the following solution section. Remember thatyou must select all correct answers and only correct answers to receive credit for the question.

1. Each component has an interface. This interface consists of‑
0 A. Interface view
•	B. Interface context
C. Interface controller

kponent. You should lumber possible.

the Ul and the Web

Term

Custom controller

Configuration controller

Window controller

Consumer component

Used component

5o6 Chapter 16 User Interfaces (Web Dynpro)

2. A plug:
•	A. Can be defined as inbound, outbound, or both
•	B. Forms the basis of navigation within a Web Dynpro
•	C. Can be defined as default inbound
•	D. Can be defined as a startup
•	E. Can be defined as an exit
•	F. Can be assigned to multiple views
G. Can be defined as outbound controlling multiple inbound plugs
H. Can be defined as inbound and be controlled by multiple outbound plugs

3. A Web Dynpro component contains:
•	A. Multiple views within a window
•	B. UI elements
•	C. Component controller
•	D. A context
•	E. Exactly one interface controller

4. A view can:
•	A. Contain other views
B. Be contained in a window
C. Contain windows
•	D. If entered by an inbound plug cause an event handler method to be called
•	E. Contain a view controller

5. Identify the types of controller:
•	A. Component controller
•	B. Custom controller
C. Consumer controller
•	D. Configuration controller
•	E. View controller
F. Window controller

Practice Question Answers and Explanations Chapter 16 507

I plugs )utbound plugs

thod to be called

6. Identify the types of layout managers:
•	A. Flow Layout
B. Row Layout
C. Column Layout
D. MatrixLayout
E.GridLayout
F. TreeLayout
7. The binding between a UI element and a context attribute is a two-way relationship.
•	A. True
B. False
8. Identify the ways to map context structures:
•	A. Direct context mapping
B. External context mapping
•	C. Dynamic context mapping
9. The Web Dynpro programming model is based on:
•	A. Classic Dynpro programming
B. Business Server Pages (BSP)
•	C. Model View Controller (MVC)
•	D. Internet Transaction Server (ITS)

Practice Question Answers and Explanations
1 Correct answers: A, C
Each interface component is composed of two parts: the interface view and interface controller.
2. Correct answers: B, D, E, H
A plug is either inbound or outbound; it cannot be both. The view is defined as a default, but the plug is defined as a startup. Each plug can only be

5o8 Chapter 16 User Interfaces (Web Dynpro)

assigned to one view. Each outbound plug can only navigate to a single inbound plug. However, an inbound plug can be triggered by multiple outbound plugs.
3.	Correct answers: A, C, E
UI elements are placed within a view of the component. Although there is a context, it is actually part of either the component controller or a view controller. Therefore, the context is not directly part of the component, but of a subcomponent.
3.	Correct answers: B, C, D, E
A view can contain a window, which can contain another view, but a view can not be placed into another view.
3.	Correct answers: A, B, D, E, F
There is no consumer controller.
3.	Correct answers: A, B, D, E
Col umn Layout and Tree Layout are not valid layout managers.
3.	Correct answer: A
It is a two-way relationship, which is how data can be displayed in the browser and be retrieved from user input.
3.	Correct answers: A, B
Direct context mapping and external context mapping are the only ways to map context structures.
3.	Correct answer: C
The Web Dynpro programming model is based on the Model View Controller paradigm to ensure a clear division between the definition of the user interface and the implementation of the application logic.
Take Away
You will need to understand how Web Dynpro functions. Remember that it is a paradigm shift from existing types of dynpros. It is important to recognize the Model View Controller paradigm and what is available in each controller or view. It is important to understand how plugs allow navigation and the application to start or to exit. You will need an understanding of views and how they

53o	Chapter 17 Class Identification Analysis and Design

correct answers and then check the completeness of your answers in the following solution section. Remember that you must select all correct answers and only correct answers to receive credit for the question.

1. Given the code in the exhibit (see Figure 17.11) and the knowledge that both
1 cl–truck and 1 cl –ca r inherit from 1 cl_vehicle, what statements are true?

TYPES: llt-vehicle ltt_vehicle

DATA:
lr_vehicle It-vehicle lr-truck lr-car

FIELD-SYMBOLS:
<vehicle>	TYPE REF TO lcl vehicle,
TYPE STANDARD TABLE OF Ilt vehicle.
TYPE REF TO Icl_vehicle, TYPE ltt-vehicle,
TYPE REF TO lcl-truck, TYPE REF TO lcl-car.
TYPE REF TO lcl vehicle.	

CREATE OBJECT lr_vehicle.
CREATE OBJECT Irtruck.
CREATE OBJECT lr-car.
APPEND INITIAL LINE TO It vehicle ASSIGNING <vehicle rvehicle> = lr_vehicle.
APPEND INITIAL LINE TO lt_vehicle ASSIGNING -:vehicle -'vehicle, = lr_truck.
APPEND INITIAL LINE TO lt-vehicle ASSIGNING :vehicle:. ,vehicle> = Ir-car.
lr-truck ?= lr_vehicle-I

Figure 17.11 Question 1 Exhibit
•	A. The code is not syntactically correct.
•	B. The table 1 t–v e h i c I e contains three vehicles.
•	C. The code will produce a runtime error.
D. The code shows three valid up casts.
•	E. The code shows two valid up casts.
•	F. The code shows no valid up casts.

2. What is unique about a singleton?
•	A. It must be instantiated using a private instance constructor.
•	B. It must be instantiated using a public instance constructor.

Practice Questions Chapter 17 531

•	C. It must be instantiated using a protected instance constructor.
•	D. It must be instantiated using a static private constructor.
E. It must be instantiated using a static public constructor.
•	F. It must be instantiated using a static protected constructor. 1:1 G. It must be defined as FINAL.
H. It cannot be defined as FINAL.

in the follow,vers and only
edge that both tatements are
±tor. tor.

3. What statements are true about a class that has granted friendship to another class:
•	A. The friend has access to private attributes.
B. The friend has access to protected attributes.
C. The friend has access to public attributes.
•	D. All of classes the friend has granted friendship access status to also have the same access.
E. All classes that inherit from the friend (subclasses) also have the same access.
4. There can only be one level in the inheritance tree.
•	A. True
B. False
5. What statements are true regarding ABAP inheritance:
•	A. You can access the superclass component with the prefix SUPER - X
B. The instance constructor can be overwritten as part of inheritance.
C. The static constructor can be overwritten as part of inheritance.
•	D. Overloading allows a method to have several definitions with different signatures.
E. Instance constructors must call the superclass's constructor.
F. Static constructors do not need to call the superclass's constructor.
1:1 G. Polymorphism requires the developer to specify which method to use with inheritance.

532	Chapter 17 Class Identification Analysis and Design

6. Which statements are considered obsolete and cannot be used in ABAP objects:
F-1 A. TABLES
•	B. DATA... TYPE... OCCURS
C. DATA... BEGIN OF ... OCCURS
D. INTYPES
•	E. RANGES
•	F. LEAVE
G. ON CHANGE OF
H. SEARCH
I. LOOP AT dbtab

7. You can simulate multiple inheritance with:
•	A. REDEFINITION
•	B. INHERITING FROM
C.INTERFACES

8. What is unique about a functional method?
•	A. It must contain a returning parameter.
•	B. It can contain an importing parameter.
•	C. It can contain an exporting parameter.
•	D. It can contain a changing parameter.
•	E. It can be used in logical expressions.
•	F. It can be used in SELECT statements. 1:1 G. It must be a singleton.

Practice Question Answers and Explanations
1. Correct answers: B, C, E
The table I t—v e h i c I e does contain three vehicles: one vehicle, one truck up cast as a vehicle, and one car up cast as a vehicle. This also provides the correct number of up casts, which is two (the third is just an assignment of one vehi‑

Practice Question Answers and Explanations Chapter 17 533

used in ABAP

cle to another vehicle). The code will produce a runtime error (MOVE_CAST_ ERROR) on the down cast. The reason for the error is simple: 1 r_vehi c I e contains a vehicle, not a truck, and it cannot be down cast to either a truck or a car. If we took the second record in the table, we could down cast it because it started as a truck and was up cast to a vehicle. The other two records in the table would produce the same error as 1 r_vehi cl e.
The code is actually syntactically correct and can be executed (up to the down cast, which aborts the program). As we have already discussed, two is the correct number of up casts — not three and not zero.
2. Correct answers: D, G
A singleton must be instantiated using a static private constructor. The reasons for this combination are: static so it is only called once and private so it cannot be called from anywhere else. It must be defined as FINAL so that it cannot be inherited.

3.	Correct answers: A, B, C, E
Friends have access to private, protected, and public attributes. The friend attribute is inherited: Classes that inherit from friends and interfaces containing a friend (as a component interface) also become friends.
3.	Correct answer: B
There can be many levels of specialization in the inheritance tree.
5.	Correct answers: A, B, E, F
You can access the superclass by using the prefix SUPER - >. You can override the instance constructor, but not a static constructor, because it is shared between all inherited objects. Overloading is not possible in ABAP Objects. Instance constructors need to call the superclass's constructor to make sure that everything is created correctly. Static constructors do not need to explicitly call the superclass's constructor because it is called automatically by the runtime system. Polymorphism does not require the developer to do anything; the runtime system automatically determines which method to call.
6.	Correct answers: A, B, C, D, E, F, G, H, I All of theses variations are obsolete.

le, one truck up 'des the correct ent of one vehi‑

7.	Correct answer: C Multiple inheritance can be simulated with interfaces.

534	Chapter 17 Class Identification Analysis and Design
8. Correct answer: A, B, E
A functional method must contain a returning parameter (it is what makes it a functional method), but cannot contain either changing or exporting parameters. It can contain an importing parameter. The functional method can be used in logical expressions, such as the source in an assignment, a computation, and case statements.
Take Away
You will need to understand the fundamentals of object-oriented programming. This includes the different types of classes and how the visibility of components affects use outside of the class or method. You will need to understand what makes a singleton or a returning method, when a class should inherit from a superclass, and how to specify the inheritance. You should know how interfaces can be used and how they can be addressed. Lastly, you will need an understanding of polymorphism and how both up casting and down casting are used.
Refresher
You must understand inheritance and polymorphism. Singletons, returning methods, friendship, and casting will all play a part in the certification examination. You must have an understanding of differences between instantiated objects and static objects. Also, you must have an understanding of obsolete statements.
Table 17.2 shows the. key concepts of class design.
Key Concept	Definition
Inheritance Inheritance allows you to derive a new class from an existing class so that one class (the subclass) adopts the structure and behavior of another class (superclass), possibly also adapting or extending it.
Polymorphism	This is when instances of different classes respond differently to the same method calls.
Table 17.2 Key Concepts Refresher

Practice Questions Chapter 18 569

the changes made een modifications ut it. Modification can restrict object screen (see Figure	With SAP Notes Assistant, you no longer need to enter the registration key. SAP Notes Assistant automatically imports the correction without the Modification Assistant. You no longer have to maintain the source code manually, thereby saving time and reducing the likelihood of errors. Notes Assistant downloads the notes automatically from the SAP Service Marketplace directly using an RFC connection and reads the correction before applying the notes to the system. Notes Assistant also recognizes the dependencies between different notes. The system checks for the prerequisites and dependencies for other notes. It ascertains whether a note has a prerequisite note with it, and loads the prerequisite note if there is one. It displays the list of prerequisites in the dialog box, and you implement the note in the correct order as displayed in the list. You have the option to implement all of the selected notes at once, or you can implement each note individually. You also have the option to undo the note implementation if it has been implemented with Notes Assistant.	

Practice Questions
The practice questions below will help you evaluate your understanding of the topic. The questions shown are similar in nature to those found on the certification examination, but whereas none of these questions will be found on the exam itself, they allow you to review your knowledge of the subject. Select the correct answers and then check the completeness of your answers in the following solution section. Remember that you must select all correct answers and only correct answers to receive credit for the question.

modification made

ich are corrections
as introduced, sys- th the help of the e SAP Notes Assisrct before you can

1. Which of the following is a true statement?
•	A. An access key is required to implement Business Add-Ins.
B. An access key is required to modify SAP repository objects.
C. An access key is required to enhance an SAP application using a user exit.
D. An access key is required to implement an implicit enhancement point.
2. SAP enhancement for customer exits are managed by transaction:
•	A. Transaction SMOD
B. Transaction CMOD
C. None of the above

57o Chapter 18 Enhancements and Modifications

3. Customer exits provide program exit, screen exit, and menu exit enhancement.
•	A. True
B. False

4. The CALL CUSTOMER- FUNCTION 'nnn' statement, where nnn is a three-digit
number is used in SAP programs for one of the following types enhancement.
•	A. Customer exits
B. Business Add-Ins
C. User exits
D. New BAdIs

5. How would you find out if an application program offers a program exit?
•	A. Search for the character string CUSTOMER- FUNCTION.
B. Use the Repository Information System.
C. Use the Application Hierarchy.
•	D. Look for a customer exit in the SAP reference IMG within an application area.

6. A Business Add-Ins can have multiple active implementations at a time.
•	A. It can have multiple active implementations if the MULTIPLE USE checkbox is selected.
•	B. It cannot have 'a multiple active implementation.
•	C. It can have multiple implementations if the FILTER-DEPEND. checkbox is selected.

7. The statement CALL BADI and GET BADI is used for following type of Business Add-Ins:
•	A. Classical BAdI
B. New BAdI
•	C. None of the above

Practice Questions Chapter 18 571

iu exit enhance‑

in is a three-digit g types enhance‑

~ a program exit?

ithin an application

ations at a time.
LTIPLE USE checkbox

1EPEND. checkbox is

owing type of Busi‑

8. Explicit enhancement points and sections are defined by the SAP application programmer.
•	A. True
B. False
9. Code within an explicit enhancement section can be replaced by the customer,
•	A. True
B. False
10. Code within an explicit enhancement point can be enhanced but cannot be replaced.
•	A. True
B. False
11. Which of the following are correct statements:
•	A. An enhancement spot can contain explicit an enhancement point and an enhancement section.
B. An enhancement spot can contain an explicit enhancement point, explicit enhancement section, and new BAdI.
•	C. An enhancement spot can contain either an explicit enhancement point and enhancement section or a new BAdI only, but all three cannot be in the same enhancement spot.
•	D. An enhancement spot can contain one or more simple or composite enhancements.
12. Which of the following is a true statement:
•	A. An implicit enhancement point can be used to insert code in an SAP program and is always available to the customer.
B. Implicit enhancement options allow you to enhance interface parameters for function modules and methods without modifying the repository object.
C. Implicit enhancement can be used to enhance SAP objects developed prior to SAP NetWeaver 7.0.
•	D. None of the above

572 Chapter 18 Enhancements and Modifications

Practice Question Answers and Explanations
1. Correct answers: B, C
These answers are correct for the following reasons:
4	An access key is not required to implement Business Add-Ins because you provide the Business Add-In definition for the customer or partner to insert additional functionality for the application.
An access key is required to modify SAP repository objects. You need to register the repository object in the SAP Service Marketplace to generate the object key and have to enter it to modify the repository object.
An access key is required to enhance user exits because technically, user exit implementation is the system modification. User exits are included in the special Include program that is attached to the module pool program. SAP does not deliver any new version of Include, so user exit enhancement does not impact the upgrade even though it's a modification of the SAP repository object.
Implicit enhancement does not require an access key. It's an enhancement that does not modify the SAP repository object.
2.	Correct answer: A
SAP manages customer exist enhancement via Transaction SMOD. Transaction CMOD is used to manage customer enhancement projects.
2.	Correct answer: A
Customer exits provide program exit, screen exit, and menu exit enhancement.

4.	Correct answer: A.
You use the CALL CUSTOMER- FUNCTION 'nnn' statement to define a customer exit with an SAP application. You also create function modules and groups in the system, but you would have to insert additional functionality within the function module as a part of customer exit implementation via SAP Transaction CMOD.

5.	Correct answers: A, B, C, D
You search for a customer exit by searching for the character string CUSTOMER-FUNCTION or via the Repository Information System, Application Hierarchy, or SAP Reference IMG.

Practice Question Answers and Explanations Chapter 18 573

e a customer nd groups in y within the SAP Transac‑

6.	Correct answers: A, C
Business Add-Ins can have multiple implementations if the MULTIPLE USE checkbox is selected. A Business Add-In can have multiple implementations, one for each filter value, if the FILTER-DEPEND. checkbox is selected.
6.	Correct answer: B
The CALL BADI and GET BADI statements are used for new BAdI as of SAP NetWeaver 7.0.
6.	Correct answer: A
Explicit enhancement points and sections are defined by the SAP application programmer.
6.	Correct answer: A Code with an explicit enhancement section can be replaced by customer.
Correct answer: A Code within an explicit enhancement point can be enhanced.
10.	Correct answers: A, C, D
These answers are correct for the following reasons:
4	Enhancement spots can contain one or more explicit enhancement points and explicit enhancement sections.
Enhancement spots cannot have explicit enhancement points, explicit sections, and new BAdIs together. They can have one or more explicit enhancement points and explicit sections or one or more new BAdIs.
Composite enhancement spots can have one or more enhancement spots or composite enhancement spots.
12. Correct answers: A, B, C
These answers are correct for the following reasons:
4	Implicit enhancement points are used to insert additional code with the SAP program without modifying the application.
Implicit enhancement options are used to enhance the interface parameters for function modules and methods.
Implicit enhancement points and options are available for SAP objects developed prior to SAP NetWeaver 7.0. Implicit enhancement point and options are always available to the customer and can be used to enhance SAP applications without modification.

ecause you partner to
'ou need to to generate eject.
iically, user included in of program. ahancement
i of the SAP
nhancement
)D. Transac‑
!xit enhance‑

gCUSTOMER‑
n Hierarchy,
Ob

574 Chapter 18 Enhancements and Modifications

Take Away
You should be able to explain various enhancement techniques such as user exits, customer exits, Business Add-Ins, and enhancement techniques in SAP NetWeaver 7.0. You should be able to explain the features of each of the above enhancement techniques and be able to use them to enhance SAP applications.
You should know the tools used to implement customer exits such as program exits, menu exits, and screen exits to insert your own functionality. You should understand the difference between Transactions SMOD and CMOD. Similarly, you should be able to create BAdI enhancements, both the classical BAdIs and new BAdIs.

You should understand the tools and techniques to search various enhancements for SAP applications. You should be able to use the Application Hierarchy with the Repository Information System to search for customer exits, Business Add-Ins, composite enhancements, or enhancement spots for an application object.
Finally, you should be able to explain the difference between enhancement and modification. You should know the tools to list the system modification in your system and be able to use SAP Notes Assistant to apply notes to the SAP system.

Caution

You should try not to modify SAP objects unless it is absolutely required because modification can cause problems during upgrade. You should try to adjust the SAP objects by using one of the enhancement techniques and only modify the system if SAP has not provided you with one of the enhancement options to adjust the standard SAP objects.

Refresher
Table 18.1 shows the key concepts for enhancing SAP applications.

Key Concept	Definition
Enhancement	Enhancement techniques are used to insert additional customer‑
concepts	specific functionality to SAP applications without modifying SAP repository objects.

Table i&i Key Concept Refresher