ABAPTM Interview Questions (1)

TolyHuang發表於2007-11-24
Language Constructs[@more@]

1. When using Open SQL statements in an ABAP/4 program, you must ensure the following.
a) The database system being addressed must be supported by SAP.
b) The database tables being addressed must be defined in the ABAP/4 dictionary.
c) Both
d) None

2. What is the difference between the TYPE and LIKE statements in data declaration?
a) LIKE is used to define variables that are similar to the ones previously defined whereas TYPE is used to define variables that exist in data dictionary.
b) LIKE is used to define variables that are similar to the ones previously defined whereas TYPE is used to define variables to refer ABAP internal data elements.
c) LIKE is used to define variables that exist in data dictionary whereas TYPE is used to define variables to refer ABAP internal data elements.
d) Both of them can be used interchangeably, there is no difference.

3. HIDE statement support deep structures?
a) True
b) False
c) Not applicable
d) Not applicable

4. Which of the following are true?
a) ABAP queries are created by associating them to a logical database or through a direct read/data retrieval program.
b) ABAP queries are created from functional areas that are created from a logical database or through a direct read/retrieval program.
c) ABAP queries are created from user groups attached to the functional areas that are created from a logical database or through a direct read/retrieval program.
d) ABAP queries are created through the regular report program.

5. A logical unit of work (LUW or transaction) begins
a) Each time you start a transaction.
b) Each time you end a transaction.
c) When the database changes of the previous LUW have been confirmed (database commit).
d) Before the database changes of the previous LUW have been cancelled (database rollback).

6. A database commit is triggered by
a) ABAP/4 command COMMIT WORK.
b) CALL SCREEN, CALL DIALOG.
c) A Remote Function Call
d) CALL TRANSACTION

7. Open SQL vs. Native SQL
a) A database interface translates SAP’s Open SQL statements into SQL commands specific to the database in use. Native SQL statements access the database directly.
b) When you use Native SQL, the addressed database tables do not have to be known to the ABAP/4 dictionary. In Open SQL, the addressed database tables must be defined in the ABAP/4 dictionary.
c) There is automatic client handling in Native SQL whereas clients must always be specified in Open SQL.
d) None of above

8. The following are true about ‘EXEC SQL’.
a) You can end the Native SQL with a semicolon.
b) You can end the Native SQL with a period.
c) You cannot perform reliable authorization checks using EXEC SQL.
d) Host variables in the Native SQL are identified with a preceding hash (#).

9. What are field symbols?
a) Field symbols are like pointers in C that can point to any data object in ABAP/4 and to structures defined in ABAP/4 dictionary.
b) Field symbols have to be created with type specifications only.
c) You cannot assign one field symbol to another.
d) All operations you have programmed with the field symbol are carried out with the assigned field.

10. EXTRACT statement
a) The first EXTRACT statement extracts the first extract record.
b) The first EXTRACT statement creates the extract dataset and adds the first extract record.
c) Each extract record contains, if specified, the fields of the field group.
d) Each extract record contains, if specified, the fields of the field symbol.

11. You cannot assign a local data object defined in a subroutine or function module to a field group.
a) True
b) False
c) Not applicable
d) Not applicable

12. Which of the following system fields keep track of each pass in LOOP statement?
a) SY-STEPL
b) SY-INDEX
c) SY-TABIX
d) B and C both

13.
data: begin of group1,
f1 type I value 1,
f2 type I value 1,
f3 type c value '1',
f4 type I value 1,
end of group1.

Data: begin of group2,
g1 type I value 1,
f1 type I value 1,
f2 type I value 1,
g4 type c value '1',
end of group2.

Do 2 times.
Add-corresponding group1 to group2.
Enddo.

Write: group2-g1, group2-f1, group2-f2, group2-g4.
What is the output of the above code after execution?
a) 1221
b) 2222
c) 3333
d) 1331

14. Which one of the following SQL statements does NOT lock the affected database entries ?
a) insert
b) modify
c) select single for update
d) select *

15. Which one of the following is an example of an asynchronous update?
a) insert wa into ztable.
b) call function 'update_table' in update task.
c) update ztable from ztable.
d) modify ztable from wa.

16. REPORT ZTEST.

TABLES: MARC.

DATA: ZWERKS LIKE MARC-WERKS.

Which one of the following contains the length definition of ZWERKS?

a) The DATA statement
b) The Data Element used in MARC-WERKS
c) Table MARC
d) The Domain used in Data Element of MARC-WERKS

17.
1. Data: Begin of imara occurs 0.
2. Include structure mara.
3. Data: End of imara.
4 Data: number like mara-matnr value ‘123’.
5. Select * into table imara
6. From mara where matnr = number.
7. If sy-subrc = 0.
8. Write:/ imara.
9. Endif.
10. Endselect.

Which line in the above code contains a syntax error?

a) Line 5
b) Line 6
c) Line 8
d) Line 10

18.
data: f1 type I value 1,
f2 type I value 1.

Write: / f1, f2.

Do 2 times.
Perform scope.
Enddo.

Write: / f1, f2.

Form scope.
Data: f1 type I value 2,
f2 type I value 2.

Add: 1 to f1, 1 to f2.
Write: / f1, f2.
Endform.

What is the output of this program after execution?
a) 1 1
3 3
4 4
4 4

b) 1 1
2 2
3 3
3 3

c) 1 1
3 3
3 3
1 1

d) 1 1
3 3
3 3
3 3

19.
data: begin of period,
f1 type I value 5,
f2 type I value 5,
f3 type I value 5,
f4 type I value 5,
f5 type I value 2,
end of period.

Data: amt type I,
total type I.

do 5 times varying amt from period-f1 next period-f2.
if sy-index <= 4.
add amt to total.
endif.
enddo.

Write: / 'Amt:',amt, 'Total', total.

What is the output of the above code after execution?
a) Amt: 2 Total: 22
b) Amt: 2 Total: 20
c) Amt: 5 Total: 20
d) Amt: 5 Total: 10

20. data: field1(4) type c value 'ABCD'.

if field1 co 'ABCD'.

endif.

If the above statement is evaluated as true, what is the value of sy-fdpos?
a) 0
b) D
c) ABCD
d) A

21.
1 case number.
2 when 1. Write '1'.
3 when 2. Write '2'.
4 when 3. Write: / '3'.
5 when number > 5. Write '>5'.
6 endcase.

Which line in the above code contains a syntax error?

a) Line 2
b) Line 4
c) Line 5
d) Line 6

22. Which of the following are elementary types in ABAP?
a) C,D,F,I,N,P,Q,T
b) C,D,F,I,N,P,T,X
c) A,D,F,H,N,P,T,X
d) A,D,F,I,N,P,T,X

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9437124/viewspace-983762/,如需轉載,請註明出處,否則將追究法律責任。

相關文章