0% found this document useful (0 votes)
126 views

Interview Questions

This document contains 27 multiple choice questions related to ABAP programming concepts. The questions cover topics like naming conventions, error handling, event blocks, data types, internal tables, forms, and parameters. The majority of the questions would require an understanding of ABAP syntax and runtime behavior to choose the correct answer.

Uploaded by

rajesh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views

Interview Questions

This document contains 27 multiple choice questions related to ABAP programming concepts. The questions cover topics like naming conventions, error handling, event blocks, data types, internal tables, forms, and parameters. The majority of the questions would require an understanding of ABAP syntax and runtime behavior to choose the correct answer.

Uploaded by

rajesh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

1. Dialog programs have which naming convention?

a) ZPBOxxx b) SAPMZxxx

c) ZDIAxxx d) ZPAIxxx e) Zxxx

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

3. In which modularization units can you use parameters?


Note: There are 3 correct answers to this question
a) Event blocks such as START-OF-SELECTION
b) Function modules
c) Subroutines
d) Dialog modules such as PBO modules
e) Methods

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

5. Which of the following predefined ABAP types is incomplete?


Note: Please choose the correct answer.
a) F b) P
c) XSTRING d) STRING

6. If this code results in an error, the remedy is:


SELECT fld1 SUM( fld1 ) FROM tab1 INTO_

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: INCLUDE program B: Online program


C: Module pool D: Function group
E: Subroutine pool

8. Which system field contains the contents of a selected line?

A: SY-CUCOL B: SY-LILLI
C: SY-CUROW D: SY-LISEL

9. What will be output by the following code?

DATA: BEGIN OF itab OCCURS 0, fval type i, END OF itab.

itab-fval = 1. APPEND itab.


itab-fval = 2. APPEND itab.

FREE itab.
WRITE: /1 itab-fval.

A: 2 B: 0
C: blank D: 1

10. The output for the following code will be:

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

11. The following program outputs what?

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.

itab-field1 = 'Company'. itab-field2 = '1234'. INSERT TABLE itab.


itab-field1 = 'Bank'. itab-field2 = 'ABC'. INSERT TABLE itab.
SORT itab.
LOOP AT itab.
write: /1 itab-field1, itab-field2.
ENDLOOP.

A: There is no syntax error here B: Remove the SORT statement


C: Change INSERT to APPEND D: Add a WHERE clause to the loop

13. Adding a COMMIT WORK statement between SELECT_ENDSELECT is a good method


for improving performance.

A: True
B: False

14. What is output by the following code?

DATA: BEGIN OF itab OCCURS 0, letter type c, END OF itab.

itab-letter = 'A'. APPEND itab. itab-letter = 'B'. APPEND itab.


itab-letter = 'C'. APPEND itab. itab-letter = 'D'. APPEND itab.

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:

DATA: BEGIN OF itab OCCURS 10,


qty type I,
END OF itab.
DO 25 TIMES. itab-qty = sy-index. APPEND itab. ENDDO.
LOOP AT itab WHERE qty > 10.
WRITE: /1 itab-qty.
ENDLOOP.

This will result in:

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.

An internal table ICODE contains the following entries:


field1 field2
--------------
John 12345
Alice 23478
Sam 54321
Bob 10000

IF NOT ICODE[] IS INITIAL.


SORT ICODE BY FIELD1 DESCENDING.
READ TABLE ICODE WITH KEY FIELD1 = 'Sam'.
WRITE: / SY-TABIX.
ENDIF.

What is the output of the above code after execution?

A: 1 B: 2

C: 3 D: 4 E: Sam

17.

data: begin of itab occurs 0,


field1(10),
field2(10),
end of itab.

Move: 'A' to itab-field1,


'B' to itab-field2.
Append itab.
Append itab.
Move: 'B' to itab-field1.
Append itab.
Clear itab.
Move: 'A' to itab-field2.
Append itab.

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.

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 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.

data: f1 type I value 1,


f2 type I value 1.
Do 2 times.
Perform scope.
Enddo.
Form scope.
Statics: f1 type I value 2,
f2 type I value 2.
Add: 1 to f1, 1 to f2.
Write: / f1, f2.
Perform scope2.
Endform.

Form scope2.
Write: / f1, f2.
Endform.

What is the output of the above program after execution?

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

C: All the lines of the table are initialized D: Nothing


24. What is a structured type in the ABAP dictionary that has no physical table definition
in the underlying database referred to as?

A: table B: structured data type

C: structure D: table type

25. What is true about a structure?

a) A physical database table is created for a structure

b) The TABLES statement is used to define a structure in a program

c) The STRUCTURES statement is used to define a structure in a program

d) Structures contain data beyond the runtime of a program.

26. What is the output If parameter input is 4.

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) * * * *
*** ***
** **
* *
** **
*** ***
**** ****

27. What is the output If parameter input is 4.


PARAMETERS ip TYPE i.
DATA x type i.
data y TYPE i.
data k type c.

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 *

27. What is the output If parameter input is 4.


PARAMETERS ip TYPE i.
data x type i.
data y type i.
DO ip TIMES.
ADD 1 TO x.
DO x TIMES.
add 1 to y.
write y.
ENDDO.
clear y.
WRITE /.
ENDDO.

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

28. 1. What is the TCode for ABAP dump analysis?


a) ST22
b) ST02
c) ST20
d) None of the above

29. Which attribute is invalid for a domain?

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

31. Which layer is NOT used in R/3 system?

a) Presentation Layer b) Application Layer


c) Control Layer d) Database Layer

32. What is NOT part of an idoc?

a) Field Record b) Control Record


c) Status Record d) Data Record

32. EDI stands for?


a) Electronic Data Interface b) Electronic Data Interchange

c) Electronic Document Interchange d) None of these

You might also like