02/11/2011

ABAP Interview Question And Answers -3


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