Sap Abap
Sap Abap
Language Constructs
1. When using Open SQL statements in an ABAP/4 program, you must ensure the following.
a) The database system being addressed must be supported by SAP.
b) The database tables being addressed must be defined in the ABAP/4 dictionary.
c) Both
d) None
2. What is the difference between the TYPE and LIKE statements in data declaration?
a) LIKE is used to define variables that are similar to the ones previously defined whereas TYPE is used
to define variables that exist in data dictionary.
b) LIKE is used to define variables that are similar to the ones previously defined whereas TYPE is used
to define variables to refer ABAP internal data elements.
c) LIKE is used to define variables that exist in data dictionary whereas TYPE is used to define variables
to refer ABAP internal data elements.
d) Both of them can be used interchangeably, there is no difference.
11. You cannot assign a local data object defined in a subroutine or function module to a field group.
a) True
b) False
c) Not applicable
d) Not applicable
12. Which of the following system fields keep track of each pass in LOOP statement?
a) SY-STEPL
b) SY-INDEX
c) SY-TABIX
d) B and C both
Do 2 times.
Add-corresponding group1 to group2.
Enddo.
14. Which one of the following SQL statements does NOT lock the affected database entries ?
a) insert
b) modify
c) select single for update
d) select *
TABLES: MARC.
DATA: ZWERKS LIKE MARC-WERKS.
Which one of the following contains the length definition of ZWERKS?
a) The DATA statement
b) The Data Element used in MARC-WERKS
c) Table MARC
d) The Domain used in Data Element of MARC-WERKS
Form scope.
Data: f1 type I value 2,
f2 type I value 2.
b) 1 1
22
33
33
c) 1 1
33
33
11
d) 1 1
33
33
33
if field1 co 'ABCD'.
endif.
a) Line 2
b) Line 4
c) Line 5
d) Line 6
Tables
24. Can a transparent table exist in data dictionary but not in the database physically?
a) True
b) False
c) Not Applicable
d) Not Applicable
25. Which statement is used to get the number of lines in an internal table?
a) DESCRIBE table
b) LINES
c) LINE
d) All of the above
26. If CHECK statement is outside the loop structure and if the condition fails?
a) Subsequent statements in the current processing blocks are executed
b) Subsequent statements in the current processing blocks are not executed
c) Program gets terminated
d) There is an error message
29. It is always faster to use the Into Table version of a Select statement than to use Append statements?
a) True
b) False
c) Not Applicable
d) Not Applicable
30. From the performance point of view, if you want to process the data only once, which of the following
will you use?
a) Selecting the data into an internal table and then LOOP through internal table.
b) Do the processing in SELECT..END SELECT
c) Select the records in the loop and then process each individually
d) Each of the above will be equally efficient
32. Which of the following will happen if you write ‘DELETE itab’ statement in your program?
a) All entries of Internal table will be deleted
b) Only the header line will be deleted
c) The row corresponding to header line will be deleted from the internal table
d) The program will give syntax error.
34. Which of the following will happen if you write ‘DELETE itab’ statement?
a) All entries of Internal table will be deleted
b) Only the header line will be deleted
c) The row corresponding to header line will be deleted from the internal table
d) The program will give syntax error.
36.
data: begin of itab occurs 0,
num1 type I,
num2 type I,
num3 type I,
mark,
end of itab.
Itab entries:
123D
234
345D
456D
789d
789D
Given the ITAB entries, what are the contents of ITAB after executing the above code?
a) 2 3 4
345D
456D
789d
789D
b) 1 2 3 D
234
345D
456D
789d
c) 2 3 4
789d
d) 2 3 4
Which of the following statements define internal tables with a header line?
Do 3 times.
Append initial line to itab.
Append 'X' to itab.
Enddo.
From where is the written line derived in the above loop statement?
WRITE / TEXT.
ENDLOOP.
42. Can you create a table with fields not referring to data elements?
a) Yes
b) No
c) Not Applicable
d) Not Applicable
43. Which transaction code is used for deleting entire table contents?
a) SE17
b) SE30
c) SE14
d) SE09
45. Which database object is used for storing the system variables?
a) SYST table
b) SYST structure
c) SYSTEM table
d) SYSTEM structure
47. From the list below which is not a data class in the Dictionary?
a) Master Data
b) Organizational Data
c) Project Data
d) System Data
49. When using SAP Buffering on database tables, which statement does NOT result in database
access?
a) select distinct..
b) select single..
c) using (Is null) in the where clause
d) using aggregate functions in the select clause
50. A structured type in the ABAP dictionary that has no physical table definition in the underlying
database is referred to as :
a) Table
b) Table Type
c) Structured Type
d) Structure
54. You have added an append structure to a standard SAP table. What happens to the standard table
when a new version of table is imported during an SAP version upgrade:
a) The standard table is returned to standard. Therefore, the append structure must be manually re-
applied
b) The append fields are automatically appended to the table upon activation but you must still convert
the table
c) All append structures are deleted. A new append structure must be created and added to the standard
table
d) When the standard tables are activated, the append structure is automatically added to the standard
table
55. Which of the following are TRUE for SQL trace utility (tcode ST05) in SAP -
a) SQL trace utility traces database access for a specific program
b) SQL trace utility traces database access for all transactions by a specific user
c) SQL trace result shows details of queries on database tables
d) SQL trace result can show details of queries on internal tables
56. A table ztest has the following secondary index: tnum, tcode.
Why does a SQL trace confirm that the secondary index is NOT used in the code above?
a) Client is not in the where clause
b) NE invalidates the use of an index
c) Variables must be used, NOT literals
d) Indexes are not allowed on Z tables
59. Which SAP table stores the BDC session queue information?
a) APQD
b) APQL
c) APQQ
d) APQI
60. Which program can be used to release BDC sessions within a job?
a) RSBDCSUB
b) RSBDCJOB
c) RSSUBBDC
d) BDCRECXX
61. Which one of the following is output to the job log when included in an ABAP program running in the
background?
a) Write statements
b) message statements
c) report parameters
d) Submit statements
62. Your program specs call for you to read the first 10 records from a text file (fname1), and write them
out to another text file (fname2).
Which block of code will accomplish the result desired in the above scenario?
a) Open dataset fname2 for input in text mode.
Do 10 times.
Read dataset fname1 into hold_var.
Transfer hold_var to fname2.
Enddo.
63. sy-dynpro is
a) screen no
b) program
c) table
d) field name
71. What happens if we write COMMIT WORK is written within SELECT..END SELECT.
a) All the transactions will be committed.
b) The first transaction is committed and the program exits the loop.
c) Program will create a short dump
d) A runtime error will occur.
72. How many function modules can be present in a function group?
a) 30
b) 49
c) 99
d) There is no such limit
73. Can you call a subroutine of one program from another program, which is not an include program?
a) True
b) False
c) Not Applicable
d) Not Applicable
75. SAP Memory and ABAP/4 memory refer to the same memory space?
a) True
b) False
c) Not Applicable
d) Not Applicable
76. Which statement is INCORRECT when referring to SAP memory or ABAP memory?
77. Which one of the following are true about a function module?
a) Function modules CANNOT be created by a programmer.
b) Function modules are locally accessible objects.
c) Function modules use a memory area separate from calling program.
d) Function modules have inbound and outbound parameters.
IDOC
79. Read the 2 statements below and pick the right answer choice
A. Archived files can be analyzed without reloading the file
B. An archived IDOC can be reloaded and then archived
81. An IDOC contains data for 3 purchase orders (type ORDERS01, with 1 mandatory segment, 11 other
segments which are permitted to be multiple). Read the following statements which could describe the
content of the idoc, and pick the right combination:
A. It will have 3 control records
B. It will have 1 control record
C. It will have a minimum of 3 data records
D. It will have a minimum of 1 data record
E. It will have a minimum of 48 data records
F. It will have at least 1 status record
G. It will have at least 3 status records
a) A, C, F
b) B, C, F
c) B, C, G
d) A, E, G
84. The control record field which determines the direction of the IDoc can have values
e) ‘X’ and ‘ ‘ (space)
f) ‘1’ and ‘2’,
The meaning of the values is
C. X inbound, space outbound
D. X outbound, space inbound
E. 1 inbound, 2 outbound
F. 1 outbound, 2 inbound
Pick the right combinations of statements, which are true
a) A, C
b) A, D
c) B, E
d) B, F
85. The area menu from which EDI tools can be accessed is
a) WALE
b) WEDI
c) SALE
d) SEDI
Report Programming
a) SE38
b) SA38
c) SM38
d) All of the above
90. Which of the following additions for SELECT-OPTIONS would disable the ranges on selection
screen?
a) NO-RANGES
b) NO INTERVALS
c) NO RANGES
d) NO-INTERVALS
91. What is the structure for the following select-options? Select-options: zname like ztable-name.
a) zname-sign
zname-value
zname-low
name-high
b) zname -sign
zname-option
zname-low
zname-high
c) zname -include
zname-pattern
zname-range
d) zname-sign
zname-option
zname-low
92. Following properties are given:
· Must use mara-matnr's conversion exit
· Is a required field
· Appears as 100 on the selection screen
· Check for a valid mara-matnr
Which one of the following is the correct way to define a selection-screen parameter (n) with the above
properties?
a) parameters: n type I default '100'.
b) parameters: n like mara-matnr default ‘100’ obligatory.
At selection-screen on n.
Select single * from mara where matnr = n.
If sy-subrc ne 0.
Message e000(00) with 'Incorrect number'.
Endif.
c) parameters: n like mara-matnr default 100 obligatory.
d) parameters: n type I default 100 required.
At selection-screen on n.
Select single * from mara where matnr = n.
If sy-subrc ne 0.
Message e000 with 'Incorrect number'.
Endif.
93. Report specs call for a selection screen with 1 parameter inside a frame. Which code block will
accomplish this?
94. Which return code is associated with a failed authority check due to lack of user authorization for the
chosen action?
a) 0
b) 4
c) 8
d) 12
95. You are required to create a selection screen with 1 input parameter: A date range which defaults to
the last 1 week (today-7,today)
Initialization.
Move: sy-datum to s_date-high,
sy-datum - 7 to s_date-low.
Append s_date.
Initialization.
Move: sy-datum - 7 to s_date-low,
sy-datum to s_date-high.
Append s_date.
96. Which one of the following statements is a valid use of the write command?
a) write text(3)(4).
b) write text(3)4.
c) write text+(3)(4).
d) write text+3(4).
97. When using an edit mask, which one of the following fields will be output with a leading sign?
a) field1 using edit mask '**_LLV'
b) field1 using edit mask 'RR__,_'
c) field1 using edit mask 'LL__,_'
d) field1 using edit mask 'V__'
a) 1,2,3,4, 5
b) 1,2,3,5, 4,
c) 1, 2, 4, 5, 3
d) 1, 3, 5, 4, 2
General
101. If a break-point statement is written in an ABAP program and the program is run in the background
mode, which of the following is true.
a) Break-point statement will be ignored and program will complete the execution.
b) System generates a Sys log message
c) Program will create a short dump
d) None of the above
102. When a program is created and transported the selections texts are always transported along with
the program.
a) True
b) False
c) Not Applicable
d) Not Applicable
a) SM37
b) SM35
c) SM36
d) SM38
a) Yes
b) No
c) Not Applicable
d) Not Applicable
109. Which transaction code is used for deleting the user lock on tables?
a) SE12
b) SE11
c) SM12
d) SM11
113. Which one of the following statements are FALSE about Inactive objects in SAP?
a) Development Objects are always saved as inactive versions.
b) An inactive version of a Development Object is written to developer’s pc
c) In DISPLAY mode, other users can NOT access the code of inactive version of a developer
d) Generating a runtime object is same as activating a development object.
Dialog Programming
114. Program specs call for screen 100 to appear in a modal dialog box.
module do_something.
If field1 = 'X'.
Call screen '0100'.
Endif.
Endmodule.
115. Which one of the following statements would occur in the PBO of a dialog program using table
control?
a) module user_command.
b) set screen '0100'.
c) loop at itab.
d) loop at itab with control itab_tc.