Upload
naveenvishal
View
228
Download
0
Embed Size (px)
Citation preview
8/14/2019 Abap Interview Set3
1/39
qwertyuiopasdfghjklzxcvbnmqwerty
opasdfghjklzxcvbnmqwertyuiopasdfg
klzxcvbnmqwertyuiopasdfghjklzxcvb
nmqwertyuiopasdfghjklzxcvbnmqwe
yuiopasdfghjklzxcvbnmqwertyuiopa
dfghjklzxcvbnmqwertyuiopasdfghjklz
vbnmqwertyuiopasdfghjklzxcvbnmq
wertyuiopasdfghjklzxcvbnmqwertyu
pasdfghjklzxcvbnmqwertyuiopasdfgh
klzxcvbnmqwertyuiopasdfghjklzxcvbmqwertyuiopasdfghjklzxcvbnmqwer
uiopasdfghjklzxcvbnmqwertyuiopasd
ghjklzxcvbnmqwertyuiopasdfghjklzxvbnmqwertyuiopasdfghjklzxcvbnmrt
uiopasdfghjklzxcvbnmqwertyuiopasd
ghjklzxcvbnmqwertyuiopasdfghjklzx
ABAP Interview Questions & Answers
Set 3
http://abap-tutorials.com
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
2/39
http://abap-tutorials.com 2010
Which one of the following commands is used in drill-down reporting?
END-OF-PAGE
EAVE SCREEN
MODULE SET_SCREEN
ON VALUE-REQUEST
AT LINE-SELECTION
S._______________________
Which INCLUDE contains standard
routines used in BDC programs?
BDCRSSUB
RSSUBBDC
BDCRECXX
RSBDCJOB
S._______________________
Table zinfo Entries:
name
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
3/39
http://abap-tutorials.com 2010
es sales2
d Type
C P P
Smith
0.00 50.00
es 100.00 50.00
Bob 100.00
00
Bob
0.00 50.00
ke 100.00 50.00
Mary 100.00
00
Mary
0.00 50.00
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
4/39
http://abap-tutorials.com 2010
ng the above information, what is the result of
following code?
op at zinfo.
new name.
m.
te: /
fo-id, zinfo-name, zinfo-sales.
dat.
dloop.
a1 Smith 100.00
ones 100.00
Bob 200.00
Mike 100.00
Mary 100.00
a1 Jones 200.00
Bob 200.00
Mike 100.00
Mary 100.00
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
5/39
http://abap-tutorials.com 2010
Mary
0.00
a1 Smith 100.00
ones 100.00
Bob 100.00
Bob
0.00
Mike 100.00
Mary 200.00
a1 Smith 200.00
Bob
0.00
Bob 100.00
Mike 100.00
Mary 200.00
a1 Jones
0.00
Bob 200.00
Mike 100.00
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
6/39
http://abap-tutorials.com 2010
Mary 100.00
S.______________________________
Which return code is associated with a failed
hority check due to lack of user authorization for the chosen action?
0
4
8
12
24
S.______________________________
a: x type I value 5,
ype I value 10.
Do 2 times.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
7/39
http://abap-tutorials.com 2010
Perform calculate using x
nging y.
Enddo.
orm calculate using px like x
nging py like y.
tatics z type I.
y = px + z.
= z + 1.
x = px + 1.
ndform.
at are the values of x, y, and z
er execution?
x = 7, y = 7, z = 2
x = 7, y = 15, z = 2
x = 5, y = 8, z =
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
8/39
http://abap-tutorials.com 2010
x = 5, y = 6, z = 0
x = 5, y =
z = 1
S.______________________________
data: itab1 like itab occurs 0 with header line,
itab2 like itab occurs 0 with header line.
Loop at itab1.
Append itab2.
dloop.
ree: itab2.
Write: itab1, /itab2.
f the Contents of Itab1 =
Header 0
ne 1
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
9/39
http://abap-tutorials.com 2010
at is the output of the above program?
Header 0
ader 0
Header 0
e 1
ader 0
e 1
line 1
Header 0
e 1
Header 0
S.______________________________
Background jobs viewed in SM50 are of which process type?
BTC
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
10/39
http://abap-tutorials.com 2010
SPO
G
DIA
UPD
S.______________________________
a: f1(12)
e c value 'Test Variant',
f2(6) type c,
f3(8)
e c.
Move: f1 to f2,
f2 to
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
11/39
http://abap-tutorials.com 2010
at do f1, f2, and f3 contain after executing the above code?
f1: 'Test Variant'
'ariant'
' Variant'
'Test Variant'
'Test V'
'Test Var'
f1: 'Test Variant'
'ariant'
' ariant'
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
12/39
http://abap-tutorials.com 2010
f1: 'Test Variant'
'Test V'
'Test V '
f1: 'Test Variant'
'Test V'
'st Varia'
S.______________________________
PORT ZTEST.
BLES:
RC.
TA: WERKS LIKE MARC-WERKS.
ich one of the following contains the length
inition of WERKS?
Table MARC
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
13/39
http://abap-tutorials.com 2010
The Domain characteristics
Program
ST
e Data Element definition
e DATA statement
S.______________________________
0. field name module check_validity
nput.
hich statement is correct regarding the above code?
The module is processed during PBO.
The module is processed only if a value has been entered in that field.
The module is processed only if the user presses F4 on that field.
The module is processed if a field in the chain has a value.
e module
rocessed only if the value of the field is not the initial value.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
14/39
http://abap-tutorials.com 2010
S.______________________________
1. data: begin of alpha,
c1 value 'A',
c2 value 'B',
c3 value 'C',
c4 value 'D',
c5 value 'E',
c6 value 'F',
end of alpha.
a wa(1)
e c value 'X'.
3 times varying wa from alpha-c1 next alpha-c3.
te wa no-gap.
ddo.
at is the output of the above code?
F
C
C
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
15/39
http://abap-tutorials.com 2010
A
E
S.______________________________
2.
ich INCLUDE contains standard subroutines used in BDC programs?
BDCINCLUDE
RSBDCSUB
BDCRECXX
RSBDCINC
BDCSUBMIT
S.______________________________
2. Which one of the following is INCORRECT regarding tables for data clusters?
The table is divided into logically related areas, defined
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
16/39
http://abap-tutorials.com 2010
a two-character ID.
The area ID should be named RELID.
The field STRTF2 is the last field in the key.
The table should be a cluster table.
e table ends with the fields
USTR and CLUSTD.
S.______________________________
3.
ata: word(8) value 'ABCDEFGH'.
hift word.
Write: / word.
hift word right.
hift word
ular.
Write: / word.
hat is the Output for this?
S.______________________________
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
17/39
http://abap-tutorials.com 2010
4. data:
gin of itab occurs 3,
field1 type I,
field2(10) type c,
end of itab.
Move: 10 to
b-field1,
'Corp1' to itab-field2.
Append itab sorted by field1.
Move: 5 to itab-field1,
'Corp2' to itab-field2.
pend itab sorted by field1.
Move: 15 to itab-field1,
'Corp3' to itab-field2.
Append itab
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
18/39
http://abap-tutorials.com 2010
ted by field1.
Move: 6 to itab-field1,
'Corp4' to itab-field2.
Append itab
ted by field1.
Move: 10 to itab-field1,
'Corp5' to itab-field2.
Append itab
ted by field1.
Loop at itab.
Write: / itab-field1,
b-field2
Endloop.
at is the output of the above code after
cution?
5 Corp2
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
19/39
http://abap-tutorials.com 2010
orp4
Corp1
p5
Corp3
15 Corp3
Corp1
Corp5
6 Corp4
Corp5
Corp3
15 Corp5
Corp4
orp3
orp2
15 Corp3
orp1
orp4
S.______________________________
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
20/39
http://abap-tutorials.com 2010
5. Which one of the following is an
VALID structure declaration?
data: struc type t_struc.
data: begin of struc,
field1,
field2,
end of struc.
data: struc like line of itab.
data: struc like
ra-matnr.
a: begin of struc.
Include structure s_type.
End of struc.
S.______________________________
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
21/39
http://abap-tutorials.com 2010
6. Your program specs call for you to read the first 10 records from a text
(fname1), and write them out to another text file (fname2).
ich block of code will accomplish the result desired in the above scenario?
open dataset fname1 for input in text mode.
en dataset fname2 for output in text mode.
10 times.
ad fname1 into hold_var.
te hold_var to fname2.
ddo.
open dataset fname1 for output in text mode.
en dataset fname2 for input.
10
es.
ad file fname1 into hold_var.
nsfer hold_var to fname2.
ddo.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
22/39
http://abap-tutorials.com 2010
open file fname1 for input.
en file fname2 for output.
10 times.
ad
fname1 into hold_var.
nsfer hold_var into fname2.
ddo.
open
aset fname1 for output in text mode.
en dataset fname2 for input in text mode.
10 times.
ad
aset fname1 into hold_var.
nsfer hold_var to fname2.
ddo.
en file fname1 for output.
en file fname2 for input.
ad dataset fname1 into hold_var 10 times.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
23/39
http://abap-tutorials.com 2010
nsfer hold_var to fname2.
S.______________________________
7.
TA: carrid LIKE sflight-carrid,
nid LIKE sflight-connid,
e LIKE sflight-fldate.
elect
ght~carrid sflight~connid sflight~fldate
nto (carrid, connid, date) from
flight as sflight INNER JOIN
li as spfli
On sflight~carrid = spfli~carrid
And sflight~connid gt spfli~connid
Where
i~fldate lt '19990101'.
Write: / carrid, connid, date.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
24/39
http://abap-tutorials.com 2010
ndselect.
ich line in the above code contains a syntax error ?
e 1
e
e 4
e 5
e 6
S.______________________________
8. Which one of the following is an
ORRECT form of the WRITE statement?
write x under y
rency us.
write x no-sign.
write
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
25/39
http://abap-tutorials.com 2010
ft-justified no-gap.
write x no-decimals.
write x no-zero.
S.______________________________
9. 1. Tables: ztable.
2. Data: itab like ztable occurs 0 with
ader line.
3. Select * into table itab from ztable.
4. Loop at itab.
5. Itab-field1 = 'XYZ'.
6. Modify itab.
7. Endloop.
8. Update ztable from itab.
nitial state of ztable
----------------------------
field1 field2
----------------------------
ABC 123
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
26/39
http://abap-tutorials.com 2010
XYZ 456
F 123
XYZ 789
GHI 789
en the initial state of itab, how many
dates to ztable will occur after executing the above code?
0
1
2
3
5
S.______________________________
0.
a: field1(4) value 'Test',
d2 type I value 10,
d3(6) value ' Test2'.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
27/39
http://abap-tutorials.com 2010
a: field4 type I value 20.
te: field1, 5 ':', field2,
eld3+1, 5 ':', field4.
at is the output of the above code after execution?
Test: 10
t2:
Test: 10
t2: 20
Test:10
t2:20
Test: 10
t: 20
Test: 10
t:
S.______________________________
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
28/39
http://abap-tutorials.com 2010
1. 1. SUBMIT (PROG) AND RETURN
USING
ECTION-SET 'MASS-MAINT'
WITH CREDAT EQ SY-DATUM
VIA JOB JOB_NAME NUMBER JOB_ID
TO SAP-SPOOL
DESTINATION PRINT_NAME
COPIES 1
MMEDIATELY ' '
COVER TEXT 'MASS MAINT'
EP IN SPOOL 'X'
LINE-COUNT 65
LINE-SIZE 132
LAYOUT 'X_65_132'
INCLUDE SPOOL
NPRO.
e above code is used to submit a program as part of a dynamically created job. Which of
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
29/39
http://abap-tutorials.com 2010
above lines contains a syntax error? (Presuming all used variables are declared correctly.)
e 1
e 4
e 6
e 10
e
S.______________________________
2.
ich one of the following is output to the job log when included in an ABAP program running in the
kground?
print function modules
Submit statements
report parameters
Write statements
ssage statements
S.______________________________
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
30/39
http://abap-tutorials.com 2010
3.
Must use mara-matnr's
version exit
s a required field
Appears as 100 on the selection screen
Check for a valid mara
atnr
ich one of the following is the correct way to define a selection-screen parameter (n) with
above properties?
parameters: n like mara-matnr default 100
igatory.
parameters: n type I default '100'.
parameters:
ype I default 100 required.
selection-screen on n.
ect single * from mara where matnr = n.
y-
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
31/39
http://abap-tutorials.com 2010
rc ne 0.
ssage e000 with 'Incorrect number'.
dif.
ameters: n like mara-matnr default 100 obligatory.
selection-screen on n.
ect single * from mara where
tnr = n.
y-subrc ne 0.
ssage e000(00) with 'Incorrect number'.
dif.
ameter: n type mara-matnr value 100.
S.______________________________
4. 1 TABLES: MARC.
ATA: BEGIN OF ITAB OCCURS 0,
ELD1(5),
ELD2(5),
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
32/39
http://abap-tutorials.com 2010
ND OF ITAB.
EAD ITAB WITH KEY MATNR = '12345'.
SY-SUBRC = 0.
ITE:/ ITAB-MATNR.
NDIF.
which line the syntax error exits.
S.______________________________
5.When referring to the
LLECT statement, which one of the following is correct?
e COLLECT statement will add up ALL fields in an internal table.
When using
LLECT, all of the fields that are not part of the table key must have a numeric type.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
33/39
http://abap-tutorials.com 2010
If an entry with the same key already exists, the COLLECT statement appends a new
e to the table.
When using COLLECT on a sorted table, the system finds
sting lines using a sequential search.
ng COLLECT, you can have duplicate entries in the resulting
b.
S.______________________________
6. Which WHERE clause
uld select all programs that start with 'ZR_'?
where
gram like 'ZR#_%' ESCAPE '#'
where program like 'ZR*_%'
where program = 'ZR_*'
where program =
%_*'
ere program like 'ZR%_%' ESCAPE '%'
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
34/39
http://abap-tutorials.com 2010
S.______________________________
7. To ensure that related lines appear on the same
ge of a report list, which statement would you use?
group
new-page group
reserve
hide
te on-
ck
S.______________________________
8.
op at itab.
te itab.
dloop.
m where is the written line derived in
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
35/39
http://abap-tutorials.com 2010
above loop statement?
sy-subrc
sy-lisel
The table work area
sy-index
e table header
S.______________________________
9.
a: begin of
b occurs 0,
num1 type I,
num2 type I,
num3 type I,
mark,
end of itab.
ete from itab where mark eq 'D'.
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
36/39
http://abap-tutorials.com 2010
b entries:
3 D
4
5 D
6 D
9 d
9 D
en the ITAB entries, what are the contents of ITAB after executing the above code?
2 3 4
5 D
6 D
9 d
9
2 3 4
7 8
9 D
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
37/39
http://abap-tutorials.com 2010
1 2 3 D
4
5 D
6 D
9
2 3 4
9 d
S.______________________________
0. Which statement retrieves data from a LOGICAL database?
SET
LET
SELECT
RETRIEVE
GET
S.______________________________
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
38/39
http://abap-tutorials.com 2010
1. Program specifications ask for error checking on a selection-screen
ch contains a parameter inside a frame. Which event below would you
to ensure the above specification is met?
at selection-screen
at selection-screen on block b1
check selection-screen
selection-screen on field f1
selection-screen check block b1
S.______________________________
2. You press F1(Help), then F9(Technical char) on a screen field to get its parameter ID. Where
he parameter ID linked to the screen field?
The help definition
Table PARAM
The screen definition
The domain
The data element
S.______________________________
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/8/14/2019 Abap Interview Set3
39/39
http://abap-tutorials.com 2010
3. Which one of the following commands is used inside an ABAP program to go into debug mode?
bug
p
ak-point
ak at
S.______________________________
4. Which one of the following statements about Pooled and Cluster tables is correct?
Pooled and Cluster tables can be joined.
All table entries in a Cluster table are stored in field VARKEY.
Pooled and Cluster tables physically exist in the database.
All key fields of a Pooled table must contain integer data types.
oled and Cluster tables share information from multiple tables.
S.______________________________
http://abap-tutorials.com/http://abap-tutorials.com/http://abap-tutorials.com/