02/11/2011

ABAP Interview Question And Answers -2


21. ABAP Query tool is used to:
a) Enquire about a running-program status
b) Automatically generate code for reporting
c) Perform database operations for user-written programs
d) None of the above

Ans: b.
____________________________________________________________________________

22. In ABAP Query tool...
e) Each user can be assigned to several user-groups
f) Each user can be assigned to several functional areas
g) Each functional area can be assigned to several user-groups
h) One user can be assigned only to one user-group.

Ans: a, b, c
____________________________________________________________________________

23. Logical databases must be used to create an ABAP Query
a) True
b) False

Ans: b
____________________________________________________________________________

24. In a BDC program, how would you handle errored records? Would you…
a) Rerun the program
b) Report the errored records
c) Generate a batch-input session with errored records
d) Create an output file, to be run again after corrections

Ans: b, c, d
____________________________________________________________________________

25. What are IDocs?
a) Documentation of executable programs
b) Documents used for data-transport between SAP and non-SAP s/w.
c) Documents used for data-transport between two different SAP systems
d) Documents used for one-time data-migration activities.

Ans: b, c
____________________________________________________________________________

26. For transportation of data from a presentation server into SAP, the function module used is
a) UPLOAD
b) WS_UPLOAD
c) FILE_UPLOAD
d) DATA_UPLOAD

Ans: a, b
____________________________________________________________________________

27. For one-time high volume data-uploads into SAP from non-reliable systems, the following are generally used:
a) BDC
b) LSMW
c) Direct table update
d) Idocs

Ans: a, b
____________________________________________________________________________

28. In an ABAP program, the INITIALIZATION event is invoked
a) Before the AT-SELECTION-SCREEN event
b) After the AT-SELECTION-SCREEN event
c) Could be either way
d) Cannot be predicted

Ans: a
____________________________________________________________________________

29. The statement to check whether an internal table itab_test has no records, is:
IF itab_test is initial.
a) TRUE
b) FALSE

Ans: b.
____________________________________________________________________________

30. The statement used to clear all the contents of an internal table is:
a) CLEAR itab.
b) REFRESH itab.
c) FREE itab.
d) DELETE itab.

Ans: b, c
____________________________________________________________________________

31. The AT-SELECTION-SCREEN event is triggered when…
a) ENTER key is hit on the selection-screen
b) F8 key is hit on the selection-screen
c) Any field on selection-screen is populated
d) F4 key is hit on the selection-screen

Ans: a, b
____________________________________________________________________________

32. What is the transaction-code for viewing batch-runs of a program?
a) SE37
b) SM37
c) SM35
d) SM30

Ans: b
____________________________________________________________________________

33. SY-BATCH can be used to determine whether a program is being run in batch-mode, within the AT-SELECTION-SCREEN event.
a) TRUE
b) FALSE

Ans: b
____________________________________________________________________________

34. The following statements will clear the header-line of an internal table:
a) DELETE ITAB.
b) FREE ITAB.
c) REFRESH ITAB.
d) CLEAR ITAB.

Ans: d
____________________________________________________________________________

35. The SAP Logon password is always case-insensitive.
a) TRUE
b) FALSE

Ans: b 
P.S: From ECC6.0, SAP Logon Password is case-sensitive.


------------------------------------------------------------------
36. Data: BEGIN OF ITAB OCCURS 0,
FIELD1(10),
FIELD2(10),
END OF ITAB.

DO 20 TIMES.
ITAB-FIELD1 = ‘Field1’.
ITAB-FIELD2 = ‘Field2’.
ENDDO.
a) The internal table has 20 entries.
b) The internal table has one entry.
c) The internal table has no entry.
d) Unpredictable.

Ans: c
____________________________________________________________________________

37. READ TABLE ITAB_TEST WITH KEY
VBELN = k_vbeln.
If multiple records in table ITAB satisfy the condition, then
a) All records are fetched
b) The last record is fetched
c) The first record is fetched
d) Compilation error

Ans: c
____________________________________________________________________________

38. If ITAB has 1000 entries, and DBTAB is a large table, which is better in terms of performance?
i) LOOP AT ITAB.
SELECT * INTO ITAB_2 FROM DBTAB WHERE
KEY1 = ITAB-KEY1.
APPEND ITAB_2.
ENDSELECT.
ENDLOOP.
ii) LOOP AT ITAB.
SELECT * INTO TABLE ITAB_2 FROM DBTAB WHERE
KEY1 = ITAB-KEY1.
ENDLOOP.
iii) SELECT * INTO TABLE ITAB_2 FROM DBTAB
FOR ALL ENTRIES IN ITAB WHERE
KEY1 = ITAB-KEY1.
a) (i) is better than (ii), and (ii) is better than (iii).
b) (ii) is better than (iii), and (iii) is better than (i).
c) (iii) is better than (i) and (i) is better than (ii).
d) (iii) is better than (ii) and (ii) is better than (i).


Ans: d
____________________________________________________________________________

39. DATA: BEGIN OF ITAB OCCURS 0,
Fld1 (1),
Fld2 (1),
Fld3 (1),
END OF ITAB.

ITAB has 5 records – [ (1,1,1), (1,1,2), (1,2, 2), (2,2,2), (2,2,3) ].

The code segment:
LOOP AT ITAB.
AT NEW fld3.
WRITE fld3.
ENDAT.
ENDLOOP.
Produces the output:
a) 1 2 2 2 3
b) 1 2 3
c) 1 1 2 2 2
d) 1 1 1 2 2

Ans: a
____________________________________________________________________________

40. TYPES: BEGIN OF TYPE1,
FLD1,
FLD2,
FLD3,
END OF TYPE1.
DATA: ITAB1 TYPE STANDARD TABLE OF TYPE1.

ITAB1-FLD1 = ‘a’.
ITAB1-FLD2 = ‘b’.
ITAB1-FLD3 = ‘c’.
APPEND ITAB1.

a) The table has one record, with values (a, b, c ).
b) The table has no records.
c) Compilation error due to method of declaration of type.
d) Compilation error due to method of declaration of table.

Ans: d