ABAPTM Interview Questions

Thanks to all contributors for these questions.

Previous

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
____________________________________________________________________________

41. The fastest way to read a value in an internal table is to:
a) Specify key, and do a binary search
b) Specify the table-keys
c) Directly specify the index value
d) Use a work-area with same structure as the internal table.

Ans: c
____________________________________________________________________________

42. If COLLECT is used on an internal table, which has a non-key character field,
a) The first record’s value is used in the collected version.
b) The last record’s value is used in the collected version.
c) Compilation error
d) Cannot be predicted

Ans: c
____________________________________________________________________________

43. Which is the correct syntax for sorting an internal table?
a) SORT ITAB USING key1 key2.
b) SORT ITAB BY key1 key2.
c) SORT ITAB WITH key1 key2.
d) SORT ITAB key1 key2.

Ans: b
____________________________________________________________________________

44. If we need to fetch all database entries corresponding to a given key, 
X records at a time, the syntax to be used is:
a) SELECT…PACKET SIZE X….
b) SELECT…PACKAGE SIZE X…
c) SELECT…UPTO X RECORDS….
d) This facility is not available in ABAP.

Ans: b
____________________________________________________________________________

45. LOOP AT ITAB_DTL_1.
COLLECT ITAB_DTL_1 INTO ITAB_FINAL.
ENDLOOP.
If the tables contain character fields, which table should be declared with the keys 
Explicitly specified?
a) ITAB_DTL_1
b) ITAB_FINAL
c) Either one will do.
d) Neither needs a key to be specified

Ans: b
____________________________________________________________________________

46. The syntax to concatenate a set of values into one variable is:
a) CONCATENATE source1, source2 INTO target.
b) CONCATENATE source1 source2 INTO target.
c) CONCATENATE source1 and source2 INTO target.
d) None of the above.

Ans: b
____________________________________________________________________________

47. On the selection-screen, if, while using SELECT-OPTIONS, we specify NO INTERVALS,
we can guarantee that the user will not be able to enter a range of values.
a) TRUE
b) FALSE

Ans: b
____________________________________________________________________________

48. ABAP programmers can create their own data types?
a) YES
b) NO

Ans: a
____________________________________________________________________________

49. MOVE can be used to copy:
a) One field’s contents to another field
b) One structure’s contents to another compatible structure
c) One table’s contents to another compatible table
d) A part of one field to another field

Ans: a, b, c, d
____________________________________________________________________________

50. PERFORM ROUTINE1 USING val1.
…..
FORM ROUTINE1 USING temp1.
Temp1 = 10.
ENDFORM.

Is the value of val1 changed?
a) YES
b) NO

Ans. a
____________________________________________________________________________

51. Within an IF-ENDIF block, 
a) ELSE must be used
b) ELSEIF must be used
c) If ELSEIF is used, ELSE must be used
d) None of the above

Ans: d
____________________________________________________________________________

52. The user-list in a given SAP client can be found using transaction
a) STO4
b) SE04
c) SM04
d) None of the above

Ans: c
____________________________________________________________________________

53. The DESCRIBE statement on internal tables is used to:
a) Find the number of lines currently in table
b) Find initial size of the table
c) Find type of the internal table
d) Give the line size, in number of characters, of the table

Ans: a, b, c
____________________________________________________________________________

54. Which of the following statements can work without a corresponding END-statement?
a) DO
b) AT
c) IF
d) SELECT

Ans: d
____________________________________________________________________________

55. In an ABAP program, we can specify a variable to be of HEXADECIMAL type.
a) TRUE
b) FALSE

Ans: a
____________________________________________________________________________

56. In an ABAP program, we can specify a variable to be of OCTAL type.
a) TRUE
b) FALSE

Ans: b
____________________________________________________________________________

57. The default length of a field of type “time”(‘T’) in an ABAP program is:
a) 6
b) 8
c) 14
d) 0

Ans: a
____________________________________________________________________________

58. The various numeric types definable in an ABAP program are:
a) I, F, P, N
b) I, F, P
c) I, F, N
d) I, P, N

Ans: b
____________________________________________________________________________

59. Variables in an ABAP code can be defined as being similar to data-dictionary elements, using:
a) LIKE
b) FOR
c) TYPE
d) None of the above

Ans: a, b, c
____________________________________________________________________________

60. Constants and internal tables are defined using the keywords (respectively):
a) CONSTANTS and TABLES
b) DATA and DATA
c) DATA and TABLES
d) CONSTANTS and DATA

Ans: a
____________________________________________________________________________

61. There are 8 elementary data-types, and hence, 64 possible conversions. Of these,
a) Type D and T cannot be inter-converted
b) None of the other types can be converted into D and T.
c) D and T cannot be converted into any other type.
d) Only C can convert into D/T and vice-versa.

Ans: a
____________________________________________________________________________

62. MOVE f1 TO f2 is equivalent to f2 = f1
a) TRUE
b) FALSE

Ans: a
____________________________________________________________________________

63. If a structure does not contain internal tables as components, we can equate two structures of incompatible types.
a) TRUE
b) FALSE

Ans: a
____________________________________________________________________________

64. For an inequality check between two variables, the symbol used is:
a) NE
b) <>
c) ><
d) NEQ

Ans: a, b, c

____________________________________________________________________________

65. S1 = ‘ABCAB’.
S2 = ‘ABCD ‘.
IF S1 CN S2.
WRITE ‘a’.
ELSE.
WRITE ‘b’.
ENDIF.
Output of above code is:
a) a
b) b
c) Compilation error
d) Blank

Ans: b
____________________________________________________________________________

66. The statement
IF NUM IS BETWEEN 3 AND 7.
Is a valid syntax?
a) TRUE
b) FALSE

Ans: B
____________________________________________________________________________

67. Is it possible to call a subroutine of one program from another program? 
a) True
b) False

Ans: A
____________________________________________________________________________ 

68. Can ABAP control statements be used within a sap script?
a) YES
b) NO

Ans: a
____________________________________________________________________________ 

69. The presentation server is actually the program named SAPGUI.
a) True
b) False

Ans: a
____________________________________________________________________________ 

70. When is Top-of-page event executed

a) Triggered by a New-page statement
b) When the First Write Statement of the program is encountered.
c) Before outputting the first line on a new page.

Ans: b, c

                            Previous | Next                                                   

 

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image