Interview Questions
Interview Questions
a) ZPBOxxx b) SAPMZxxx
2. You perform an update task using update function modules and detect an error in the
program that calls the update function modules. Which statement can be used to discard
all update requests for the current SAP LUW?
Note: There are 2 correct answers to this question
a) EXIT b) ROLLBACK WORK
c) MESSAGE axxx(nnn) d) MESSAGE exxx(nnn)
e) DELETE UPDATE
4. An executable ABAP program contains a standard selection screen and uses the event
blocks AT SELECTION-SCREEN, AT SELECTION-SCREEN OUTPUT, INITIALIZATION and
START-OF-SELECTION. In which sequence will ABAP runtime call these event blocks?
Note: Please choose the correct answer.
a) 1. AT SELECTION-SCREEN OUTPUT b) 1. INITIALIZATION
2. INITIALIZATION 2. AT SELECTION-SCREEN
3. AT SELECTION-SCREEN 3. AT SELECTION-SCREEN OUTPUT
4. START-OF-SELECTION
c) 1. INITIALIZATION d) 1. INITIALIZATION
2. AT SELECTION-SCREEN OUTPUT 2. AT SELECTION-SCREEN OUTPUT
3. AT SELECTION-SCREEN 3. START-OF-SELECTION
4. START-OF-SELECTION 4. AT SELECTION-SCREEN
A: Remove the spaces from SUM( fld1 ). B: Move SUM( fld1 ) before fld1.
C: Add GROUP BY f1. D: Change to SUM( DISTINCT f1 ).
7. Within the ABAP program attributes, Type = 1 represents:
A: SY-CUCOL B: SY-LILLI
C: SY-CUROW D: SY-LISEL
FREE itab.
WRITE: /1 itab-fval.
A: 2 B: 0
C: blank D: 1
report zabaprg.
DATA: char_field type C.
char_field = 'ABAP data'.
WRITE char_field.
A: ABAP data B: A
C: Nothing, there is a syntax error D: None of the above
report zjgtest1
write: /1 'Ready_'.
PARAMETER: test.
INITIALIZATION.
write: /1 'Set_'.
START-OF-SELECTION.
write: /1 'GO!!'.
A: Set_ GO!! (each on its own line) B: Set_ Ready_ GO!! (all on their own
lines)
C: Ready_ GO!! (each on its own line) D: Ready_ Set_ GO!! (all on their own
lines)
12. If the following code results in a syntax error, the remedy is:
DATA: itab TYPE SORTED TABLE OF rec_type WITH UNIQUE KEY field1
WITH HEADER LINE.
A: True
B: False
LOOP AT itab.
SY-TABIX = 2.
WRITE itab-letter.
EXIT.
ENDLOOP.
A: A B: A B C D
C: B D: B C D
15. Given:
A: Output of only those itab rows with a qty field less than 10
B: Output of the first 10 itab rows with a qty field greater than 10
C: A syntax error D: None of the above
16.
A: 1 B: 2
C: 3 D: 4 E: Sam
17.
What are the contents of itab after executing the above code?
A: A B B: A B
AB AB
BB B
A A
C: A B D: A B
B BA
A A
18. Which system field returns the number of records returned after a select?
A: sy-index B: sy-recno
C: sy-lncnt D: sy-dbcnt
E: sy-tabix
19. Which transaction is used to monitor, release, and reprocess BDC sessions?
A: SM36 B: SE37
C: SE35 D: SP35
E: SM35
20.
Form scope.
Data: f1 type I value 2,
f2 type I value 2.
Add: 1 to f1, 1 to f2.
Write: / f1, f2.
Endform.
A: 1 1 B: 1 1
33 22
44 33
44 11
C: 1 1 D: 1 1
33 22
33 33
33 33
E: 1 1
3 3
3 3
1 1
21.
Form scope2.
Write: / f1, f2.
Endform.
A: 3 3 B: 3 3
11 33
44 44
33 44
C: 3 3 D: 3 3
33 11
33 44
33 11
E: 3 3
0 0
4 4
0 0
22. Which statements are allowed if you are working with an internal table of type
sorted? More than one answer is correct.
A: Append B: Collect
C: Sort D: Read
E: Modify
23. What is the effect when a CLEAR statement is used on an internal table without
header line?
A: The work area is initialized B: All the lines of the table are deleted
PARAMETERS ip TYPE i.
DATA x TYPE i.
DATA y TYPE i.
DATA n TYPE i.
DATA m TYPE i.
y = ip * 2 - 1.
n = ip .
DO y TIMES.
ADD 1 TO m.
IF m <= ip.
DO m TIMES.
WRITE '*'.
ENDDO.
ELSE.
SUBTRACT 1 FROM n.
DO n TIMES.
WRITE '*'.
ENDDO.
ENDIF.
WRITE /.
ENDDO.
a) * c) *
* * **
* ** ***
* *** ****
* ** ***
* * **
* *
b) * * * * d) * * * *
*** ***
** **
* *
** **
*** ***
**** ****
DO ip TIMES.
k = ip.
ADD 1 TO x.
DO ip TIMES.
ADD 1 TO y.
IF y = x.
WRITE '*'.
SUBTRACT 1 FROM k.
ELSE.
WRITE k.
SUBTRACT 1 from k.
ENDIF.
ENDDO.
clear y.
WRITE /.
ENDDO.
a) 4 * 2 1 c) * 3 2 1
4*21 *321
4*21 *321
4*21 *321
b) * 3 2 1 d) 4 3 2 *
4*21 4 3 2 *
43*1 4 3 2 *
432* 4 3 2 *
a) 4 c) 4
3 3 4 3
2 2 2 4 3 2
1 1 1 1 4 3 2 1
b) 1 d) 1
2 1 1 2
3 2 1 1 2 3
4 3 2 1 1 2 3 4
A) Type
b) Fixed values
c) Length
d) Header
30. What are the main event of interactive report? (The answers can be more that 1)
a) Top-of-page during line selection
b) At line-selection
c) At user-command
d) At New