Test 2 WK 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

1.

When you define a field of a database table you references to data element
which normally references to a domain. But it is also possible to define the data
type directly in the data element, without referencing to a domain. Which feature
do you get, if you define the data type by referencing to a domain? Please choose
the correct answer.

● Only then it is possible to define a check table for this table field.
● Only then you can link a search help to this table field.
● Only then you can add this table field to a database view.

2 For a field of an SAP transaction there are two simple search helps A and B (in
a collective search help) provided by SAP. But your users only need the simple
search help A. Your task is it to hide the other simple search help B but without
modify the program / search help. How would you proceed? Please choose the
correct answer.

● You set the hidden flag for the simple search help B directly in the SAP collec-
tive search help.
● You define an append search help for the SAP collective search help, in-
clude the simple search help B and set the hidden flag.
● You have to do nothing. The system administrator can hide the simple search
help B by customizing.

3. For a database table zdepartment you should define the text table zdepartmentt
in the ABAP dictionary where the names of the departments are stored. How
would you design the table zdepartmentt so that it is the text table of the table
zdepartment? There is more than one correct answer to this question. (3)

● The text table zdepartmentt has the same key fields as the table zdepart-
ment plus one additional key field of data type LANG.
● The text table zdepartmentt has one text field which is not a key field.
● The text table zdepartmentt is of type cluster table.
● The text table zdepartmentt is linked with table zdepartment by a foreign
key. For the type of the foreign key fields you choose Key fields of a text ta-
ble.
4. You should implement a search help, where the data of the search help should
be selected via outer join. Which of the following view types you would choose?
Please choose the correct answer.

● The database view.


● The maintenance view.
● The help view.
● The projection view.

5. Dbtab is a transparent table in the ABAP Dictionary. What do you get then with
the following variable definition? DATA myvar TYPE dbtab. Please choose the
correct answer. Q

● An elementary field
● A structure variable (work area)
● An internal table

6. For one ABAP Dictionary field you should define fixed values. Where in the
ABAP Dictionary you have to define the fixed values of a field? Please choose the
correct answer.

● In the Domain of the Field.


● In the Data Element of the Field.
● In The Structure Or The Database Table Where The Field Is Defined.

7. For a new colleague you have to explain the necessary steps for define a data-
base view in the ABAP dictionary. What are the necessary steps for the definition
of a database view in the ABAP dictionary? There is more than one correct an-
swer to this question (3)

● You Have To Name The Database Tables From Which The View Gets The
Data.
● You Have To Define The Join Conditions Between The Tables.
● You Have To Choose The Fields From The Tables Which Should Be Part Of
The View.
● You Have To Define Selection Criteria For The View.

8. You Have To Create A New Database Table. Therefore You Are Thinking Of
Which Table Type You Should Use. In Which Of The Following Table Types Is
There A One-To-One Relationship Between The Table Defined In The Abap Dictio-
nary And The Relevant Physical Table In The Database? Please Choose The Cor-
rect Answer.

● Cluster Table
● Pooled Table
● Transparent Table

9. Some transactions contain SELECT statements in their applications, which


cause very long runtimes. You should now improve the performance without
changing the program. What techniques can be suitable for increasing the perfor-
mance during database table access? There is more than one correct answer to
this question. (2)

● To Put The Appropriate Database Tables In The Special Fast-Access-Ta-


blespace Of The Database.
● To Unit The Appropriate Database Tables In A Pool Table.
● To Define Indexes For The Appropriate Database Tables.
● To Use Table Buffering For The Appropriate Database Tables.

10. You have to define two database tables where in both tables you need the
field’s change_date and change_time (which are no key fields). How would you
proceed? Please choose the correct answer.

● Define the two fields in each database table.


● Define A Structure With These Two Fields And Include This Structure Into
Both Database Tables.
● Define an append structure with these two fields and assign this append struc-
ture to both database tables.

11. In order to write generic programs, which can be used in different contexts
polymorphism is a very strong tool. Which technique is a basic requirement for
polymorphism? Please choose the correct answer.

A) Up-Cast

B) Down-Cast

C) Equal-Cast

12. You have implemented a class cl_customer where you have defined a private
attribute name. From where you can access the attribute name directly? There is
more than one correct answer to this question. (2)

A) You Have Direct Access To The Attribute Name From All Methods Of The Class
Cl_Customer Itself.

B) You Have Direct Access To The Attribute Name From All Methods Of All Sub
Classes Of Cl_Customer.

C) You Have Direct Access To The Attribute Name From All Methods Of A Class
Cl_Friend, Where Cl_Customer Grants Friendship To The Class Cl_Friend.

D) You Have Direct Access to the Attribute Name from the Main Part of the Program

13. When you implement a class you can use most of the procedural ABAP state-
ments within the class. But some statements are forbidden. What is forbidden
within class definitions? There is more than one correct answer to this question.
(3)
A) The Definition of Nested Structures.

B) The Definition of Internal Tables with Header Lines.

C) Typing With Like To Abap Dictionary Types.

D) The Tables Statement.

14. In A Class Cl_Vehicle You Need A Method Get_Fuel, Which Estimates The
Fuel Consumption Of A Vehicle. This Method Should Be Implemented As A Func-
tional Method. How You Define A Functional Method And Where You Can Use The
Functional Method? There Is More Than One Correct Answer To This Question.
(2) Q
A) A Functional Method Can Have Any Number Of IMPORTING And EXPORTING Pa-
rameters

B) A Functional Method Has Exactly One Returning Parameter.

C) You Can Use A Functional Method Directly In An Arithmetic Expression.

D) You Can Use A Functional Method Directly In A WRITE Statement

15. Class A provides friendship to class B. Class B provides friendship to class C.


There is more than one correct answer to this question. (2)
a) A is friend of B and C

b) B is friend of A

c) C is friend of B

d) B and C are friends of A

e) C is friend of A

16. Which statement will create an instance of a class? Please choose the correct
answer

a) Class my_class definition

b) Create object my_object

c) Class my_class implementation


d) Data: my_object TYPE REF TO my_class

17. What syntax provides access to individual components of a class within the
class? There is more than one correct answer to this question. (2) Q

a) Call method ME->

B) Object instance->ME->

c) Call method object instance->ME->

d) ME->

18. What happen when the set handler command is executed? Please choose the
correct answer?
a) The Event is handled

b) An instance of the event is created

c) The Event is triggered

d) The Event Handler Method is registered

19. Which of the following statements are correct? There is more than one cor-
rect answer to this question (2)

a) You can create function module using class builder

b) A global class can contain a local class

c) A global interface can contain a local interface

d) A global class can contain a local interface

e) Using the class builder, a local class can be converted into a global class.

20. Which of the following statements are correct? There is more than one cor-
rect answer to this question (2) Q

a) An abstract class contains no implementation

b) An abstract method contains no implementation

c) A friend of a class is also a friend of its subclasses

d) The subclasses of a class friend are also the class friend

You might also like