ABAP QOptions 02

21
1) Which one of the following events is assigned to the "Choose" function (F2 or "Pick") often used for drill- down in report lists? Choice 1 at PFxx Choice 2 at user-command Choice 3 at new-line Choice 4 at line-selection Choice 5 at selection 2) Which transaction is used to monitor, release, and reprocess BDC sessions? Choice 1 SE37 Choice 2 SP35 Choice 3 SM35 Choice 4 SE35 Choice 5 SM36 3) Which one of the following statements would occur in the PBO of a dialog program using table control? Choice 1 set screen '0100'. Choice 2 loop at itab. Choice 3 module user_command. Choice 4 module exit at exit-command. Choice 5 loop at itab with control itab_tc. 4) Sample Code Data: pos like sy-index, index(1). do 10 times. Check sy-index between 2 and 6. Add 1 to pos. Move sy-index to index. Write at pos index. Enddo.

description

Preguntas ABAP Certificacion 2

Transcript of ABAP QOptions 02

Page 1: ABAP QOptions 02

1) Which one of the following events is assigned to the "Choose" function (F2 or "Pick") often used for drill-down in report lists?

Choice 1 at PFxx Choice 2 at user-command Choice 3 at new-line Choice 4 at line-selection Choice 5 at selection

2) Which transaction is used to monitor, release, and reprocess BDC sessions?

Choice 1 SE37 Choice 2 SP35 Choice 3 SM35 Choice 4 SE35 Choice 5 SM36

3) Which one of the following statements would occur in the PBO of a dialog program using table control?

Choice 1 set screen '0100'. Choice 2 loop at itab. Choice 3 module user_command. Choice 4 module exit at exit-command. Choice 5 loop at itab with control itab_tc. 4) Sample Code

Data: pos like sy-index, index(1).

do 10 times. Check sy-index between 2 and 6. Add 1 to pos. Move sy-index to index. Write at pos index. Enddo.

What is the output of the above code after execution?

Choice 1 178910 Choice 2 23456 Choice 3 26 Choice 4 1789 Choice 5 132578910

Page 2: ABAP QOptions 02

5) Scenario You are required to create a selection screen with 2 input parameters: 1) A date range which defaults to the current week (today-7,today) 2) A checkbox

Which is the correct block of code for the above request?

Choice 1 select-options: s_date type d default sy-datum - 7, sy-datum. Parameters: p_box type checkbox.

Choice 2 select-options: s_date type date. Parameters: c_box as checkbox.

Initialization. Move: sy-datum to s_date-high, sy-datum - 7 to s_date-low. Append s_date.

Choice 3 select-options: s_date for sy-datum. Parameters: c_box as checkbox.

Initialization. Move: sy-datum - 7 to s_date-low, sy-datum to s_date-high. Append s_date.

Choice 4 select-options: s_date type d default sy-week. Parameters: c_box type checkbox.

Choice 5 select-options: s_date for sy-datum default sy-week, p_box as checkbox.

6) Which extension of the open statement is used to read in raw data, such as a picture file (.jpg)?

Choice 1 in picture mode Choice 2 in raw mode Choice 3 in binary mode Choice 4 in ASCII mode Choice 5 in text mode

7) Which return code is associated with a failed authority check due to lack of user authorization for the chosen action?

Page 3: ABAP QOptions 02

Choice 1 0 Choice 2 4 Choice 3 8 Choice 4 12 Choice 5 24

8) Specifications Program specifications ask for error checking on a selection-screen which contains a parameter inside a frame.

Which event below would you use to ensure the above specification is met?

Choice 1 at selection-screen on block b1 Choice 2 at selection-screen Choice 3 selection-screen check block b1 Choice 4 selection-screen on field f1 Choice 5 check selection-screen

9) Which one of the following statements about TRANSPARENT database tables is correct?

Choice 1 Foreign key fields in Transparent tables use key tables as a reference. Choice 2 Transparent table fields only reference data elements. Choice 3 Transparent tables must contain a primary key. Choice 4 Transparent tables do not have to contain indexes. Choice 5 Structures cannot be included in Transparent tables.

10) Which one of the following statements is a valid use of the write command?

Choice 1 write text(3)(4). Choice 2 write text+(3)(4). Choice 3 write text+3(4). Choice 4 write text(3)4. Choice 5 write text(3)+4.

11) Sample Code

1 case number. 2 when 1. Write '1'. 3 when 2. Write '2'. 4 when 3. Write: / '3'. 5 when number > 5. Write '>5'. 6 endcase.

Which line in the above code contains a syntax error?

Page 4: ABAP QOptions 02

Choice 1 Line 1 Choice 2 Line 2 Choice 3 Line 4 Choice 4 Line 5 Choice 5 Line 6

12) Which of the following are elementary types in ABAP?

Choice 1 C,D,F,H,I,N,P,T Choice 2 A,D,F,H,N,P,T,X Choice 3 A,D,F,I,N,P,T,X Choice 4 C,D,F,I,N,P,Q,T Choice 5 C,D,F,I,N,P,T,X

13) Which one of the following commands is used in drill-down reporting?

Choice 1 ON VALUE-REQUEST Choice 2 AT LINE-SELECTION Choice 3 END-OF-PAGE Choice 4 MODULE SET_SCREEN Choice 5 LEAVE SCREEN

14) Dialog programs have which naming convention?

Choice 1 ZDIAxxx Choice 2 ZPAIxxx Choice 3 SAPMZxxx Choice 4 ZPBOxxx Choice 5 Zxxx

15) A GUI status is composed of which of the following?

Choice 1 Menu Bar and Checkboxes Choice 2 Menu Bar, Tool Bar, and Checkboxes Choice 3 Tool Bar and Checkboxes Choice 4 Menu Bar, Tool Bar, and Title Choice 5 Tool Bar, Title, and Checkboxes

16) Scenario

1. Must use mara-matnr's conversion exit 2. Is a required field

Page 5: ABAP QOptions 02

3. Appears as 100 on the selection screen 4. 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?

Choice 1 parameters: n type I default '100'. Choice 2 parameters: n like mara-matnr default 100 obligatory. Choice 3 parameter: n type mara-matnr value 100.

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

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

17) Sample Code data: f1(12) type c value 'Test Variant',

f2(6) type c, f3(8) type c.

Move: f1 to f2, f2 to f3.

What do f1, f2, and f3 contain after executing the above code?

Choice 1 f1: 'Test Variant' f2: 'Test V' f3: 'st Varia'

Choice 2 f1: 'Test Variant' f2: 'ariant' f3: ' ariant'

Choice 3 f1: 'Test Variant' f2: 'Test V' f3: 'Test V '

Page 6: ABAP QOptions 02

Choice 4 f1: 'Test Variant' f2: 'Test V' f3: 'Test Var'

Choice 5 f1: 'Test Variant' f2: 'ariant' f3: ' Variant'

18) What transaction is used to create background jobs?

Choice 1 SM30 Choice 2 SM35 Choice 3 SM36 Choice 4 SM37 Choice 5 SM38

19) Dialog programs are of which type?

Choice 1 Type * Choice 2 Type S Choice 3 Type 1 Choice 4 Type B Choice 5 Type M

20) Field-symbols are defined in which of the following ways?

Choice 1 field-symbols [f1]. Choice 2 field-symbols <f1> like f1. Choice 3 field-symbols {f1}. Choice 4 field-symbols f1 for f1. Choice 5 field-symbols (f1) like f1.

21) Simple Code

REPORT ZTEST NO STANDARD PAGE HEADING LINE-COUNT 20 LINE-SIZE 80.

DATA: BEGIN OF ITAB OCCURS 80, F1,

END OF ITAB.

DO 80 TIMES. APPEND 'x' TO ITAB. NEW-PAGE. ENDDO.

Page 7: ABAP QOptions 02

LOOP AT ITAB. WRITE: / ITAB. ENDLOOP.

What is the value of sy-pagno after executing the above code?

Choice 1 0 Choice 2 1 Choice 3 4 Choice 4 40 Choice 5 80

22) Which dictionary structure contains system fields?

Choice 1 SYTAB Choice 2 SYS Choice 3 SYST Choice 4 SY Choice 5 SYSTEM

23) Which statement regarding LDB is FALSE?

Choice 1 Any change to a logical database is reflected in all reports using that LDB. Choice 2 Logical databases use a tree structure. Choice 3 More than one logical database can be used in a report. Choice 4 Logical databases simplify and encapsulate data retrieval. Choice 5 Logical databases use a standard selection-screen for selection criteria.

24) Sample Code

Data: number type i.

while number < 10. Add 1 to number.

If number < 8. Continue.

Else. Add 4 to number. Endif.

Endwhile.

Write number.

Page 8: ABAP QOptions 02

What does NUMBER equal after executing the above code?

Choice 1 4 Choice 2 8 Choice 3 10 Choice 4 12 Choice 5 14

25) Which program can be used to release BDC sessions within a job?

Choice 1 BDCRSSUB Choice 2 RSBDCJOB Choice 3 RSSUBBDC Choice 4 BDCRECXX Choice 5 RSBDCSUB

26) To ensure that related lines appear on the same page of a report list, which statement would you use?

Choice 1 hide Choice 2 group Choice 3 reserve Choice 4 new-page group Choice 5 write on-block

27) Which one of the following statements creates a GUI status in a dialog program?

Choice 1 set screen '0100'. Choice 2 set status '0100'. Choice 3 set gui-status '0100'. Choice 4 set pf-status '0100'. Choice 5 set gui-status = '0100'.

28) When referring to the COLLECT statement, which one of the following is correct?

Choice 1 When using COLLECT on a sorted table, the system finds existing lines using a sequential search.

Choice 2 Using COLLECT, you can have duplicate entries in the resulting itab.

Choice 3 When using COLLECT, all of the fields that are not part of the table key must have a numeric type.

Choice 4 If an entry with the same key already exists, the COLLECT statement appends a new line to the table.

Page 9: ABAP QOptions 02

Choice 5 The COLLECT statement will add up ALL fields in an internal table.

29) Sample Code

data: begin of itab occurs 3, field1 type I, field2(10) type c, end of itab.

Move: 10 to itab-field1, 'Corp1' to itab-field2. Append itab sorted by field1.

Move: 5 to itab-field1, 'Corp2' to itab-field2. Append itab sorted by field1.

Move: 15 to itab-field1, 'Corp3' to itab-field2. Append itab sorted by field1.

Move: 6 to itab-field1, 'Corp4' to itab-field2. Append itab sorted by field1.

Move: 10 to itab-field1, 'Corp5' to itab-field2. Append itab sorted by field1.

Loop at itab. Write: / itab-field1, itab-field2 Endloop.

What is the output of the above code after execution?

Choice 1 5 Corp2 6 Corp4 10 Corp1 10 Corp5 15 Corp3

Choice 2 15 Corp5 10 Corp4 6 Corp3 5 Corp2

Page 10: ABAP QOptions 02

Choice 3 15 Corp3 10 Corp1 10 Corp5

Choice 4 6 Corp4 10 Corp5 15 Corp3

Choice 5 15 Corp3 6 Corp1 5 Corp4

30) Background jobs viewed in SM50 are of which process type?

Choice 1 SPO Choice 2 BTC Choice 3 DIA Choice 4 UPD Choice 5 BKG

31) Sample Code

Table ztest has the following secondary index: tnum, tcode.

Select * from ztest where tnum = '123' or tcode = '456'.

Why does a SQL trace confirm that the secondary index is NOT fully used?

Choice 1 The group-by addition is missing. Choice 2 The select must be sorted. Choice 3 Only the index fields must be selected. Choice 4 Using OR in a where clause disqualifies the index. Choice 5 Client is not in the where clause.

32) Sample Code

data: field1 type I value 10.

End-of-selection. Subtract 2 from field1. Write: / 'field1 =', field1.

Start-of-selection. Add 5 to field1.

Page 11: ABAP QOptions 02

Write: / 'field1 =', field1.

Initialization. Field1 = 5. Write: / 'field1 =', field1.

What is the result after executing the above code?

Choice 1 field1 = 8 field1 = 14 field1 = 5 Choice 2 field1 = 5 field1 = 3 field1 = 8 Choice 3 field1 = 8 field1 = 14 Choice 4 field1 = 5 field1 = 10 field1 = 8 Choice 5 field1 = 10 field1 = 8

33) Tabstrips must contain which one of the following?

Choice 1 PAI Choice 2 menu Choice 3 GUI Choice 4 PBO Choice 5 subscreen

34) Sample Code

Data: field1(4) value 'Test', field2 type I value 10, field3(6) value ' Test2'.

Data: field4 type I value 20.

Write: field1, 5 ':', field2, / field3+1, 5 ':', field4.

What is the output of the above code after execution?

Choice 1 Test: 10 Test2: Choice 2 Test: 10 Test2: 20 Choice 3 Test: 10 Test: 20 Choice 4 Test: 10 Test: Choice 5 Test:10 Test2:20

35) Which one of the following commands is used in drill-down reporting?

Choice 1 END-OF-PAGE Choice 2 LEAVE SCREEN Choice 3 AT LINE-SELECTION

Page 12: ABAP QOptions 02

Choice 4 ON VALUE-REQUEST Choice 5 MODULE SET_SCREEN

36) Information

Itab consists of field1 and field2.

Which one of the following is the fastest way to fill an internal table given the information above?

Choice 1 select * from ztable where field1 = '10'. Append itab. Endselect.

Choice 2 select * from ztable where field1 = '10'. Move ztable to wa. Append itab from wa. Endselect.

Choice 3 select * into corresponding-fields of itab from ztable where field1 = '10'.

Choice 4 select * into table itab from ztable where field1 = '10'.

Choice 5 select field1 field2 into (itab-field1, itab-field2) from ztable where field1 = '10'. Append itab. Endselect.

37) Which of the following are internal table types?

Choice 1 nested and sorted Choice 2 nested and hashed Choice 3 nested, sorted, and hashed Choice 4 standard, sorted, and hashed Choice 5 standard, nested, and sorted

38) Sample Code

Loop at itab. Write itab.

Page 13: ABAP QOptions 02

Endloop.

From where is the written line derived in the above loop statement?

Choice 1 sy-index Choice 2 The table header Choice 3 sy-subrc Choice 4 The table work area Choice 5 sy-lisel

39) When using an edit mask, which one of the following fields will be output with a leading sign?

Choice 1 field1 using edit mask 'V__' Choice 2 field1 using edit mask 'LL__,_' Choice 3 field1 using edit mask 'RR__,_' Choice 4 field1 using edit mask '**_LLV' Choice 5 field1 using edit mask '__:__' 40) After what EVENT would you code a page header in a report list?

Choice 1 START-OF-SELECTION Choice 2 AT HEADER Choice 3 TOP-OF-PAGE Choice 4 BEGIN-OF-PAGE Choice 5 START-OF-PAGE 41) Sample Code

data n type i.

do 5 times. If n > 0 and n < 5. n = n + 1. elseif n = 5. n = n - 5. else. n = n - 1. endif. enddo. Write: / n.

If n = 3, what is the output of this code after execution?

Choice 1 2- Choice 2 1-

Page 14: ABAP QOptions 02

Choice 3 0 Choice 4 3 Choice 5 5

42) What is the structure for the following select-options?

Select-options: zname like ztable-name.

Choice 1 zname-include zname-pattern zname-range

Choice 2 zname-sign zname-option zname-low zname-high

Choice 3 zname-sign zname-option zname-low

Choice 4 zname-low zname-high zname-pattern

Choice 5 zname-sign zname-value zname-low zname-high

43) You are required to open an existing file (fname) on the application server and write 5 lines to that file. Which block of code will accomplish this?

Choice 1 open dataset fname for appending in text mode. Do 5 times. Transfer 'line' to fname. Enddo.

Choice 2 open file fname for input in text mode. Do 5 times. Transfer 'line' to fname appending fname. Enddo.

Choice 3 open file fname for output. Do 5 times. Write 'line' to fname.

Page 15: ABAP QOptions 02

Enddo.

Choice 4 open dataset fname for appending in binary mode. Do 5 times. Transfer 'line' to fname. Enddo.

Choice 5 open dataset fname for input. Do 5 times. Transfer 'line' to fname. Enddo.

44) Statements

1. Data: Begin of itab occurs 0, field1, End of itab.

2. Data: Itab1 like itab occurs 0. 3. Data: Itab1 type itab occurs 0. 4. Data: Begin of itab1 occurs 0. Include structure itab. Data: End of itab1.

Which of the above statements code internal tables with a header line?

Choice 1 Lines 2 and 3 Choice 2 Lines 1 and 2 Choice 3 Lines 1 and 4 Choice 4 Lines 1 and 3 Choice 5 Lines 2 and 4

45) When debugging a BDC session, which command is used to exit the session?

Choice 1 /bend Choice 2 /nquit Choice 3 /nexit Choice 4 /n Choice 5 /exit

46) What is an object which CANNOT be transported?

Choice 1 A class Choice 2 A change request Choice 3 A local private object Choice 4 A task Choice 5 A development object

Page 16: ABAP QOptions 02

47) Sample Code

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?

Choice 1 1 1 2 2 3 3 1 1

Choice 2 1 1 2 2 3 3 3 3

Choice 3 1 1 3 3 3 3 3 3

Choice 4 1 1 3 3 4 4 4 4

Choice 5 1 1 3 3

Page 17: ABAP QOptions 02

3 3 1 1

48) Which one of the following SQL statements does NOT lock the affected database entries ?

Choice 1 select single for update Choice 2 select * Choice 3 insert Choice 4 delete Choice 5 modify

*** All The Best ***