nice abap questions
Post on 20-Feb-2015
Embed Size (px)
ABAP/4 Questions & Answers1. This data type has a default length of one and a blank default value. A: B: C: D: I N C D
Ans:C 2. A DATA statement may appear only at the top of a program, before START-OFSELECTION. A: True B: False Ans:B 3. If a field, NAME1, is declared as a global data object, what will be output by the following code? report zabaprg. DATA: name1 like KNA1-NAME1 value 'ABAP programmer'. name1 = 'Customer name'. CLEAR name1. perform write_name. FORM write_name. name1 = 'Material number'. WRITE name1. ENDFORM. A: B: C: D: Customer name ABAP programmer Material number None of the above
Ans:C 4. All of these allow you to step through the flow of a program line-by-line except: A: Enter /h then execute B: Execute in debug mode
C: Enter /i then execute D: Set a breakpoint Ans: C 5. Which of the following may NOT be modified using the ABAP Dictionary transaction? A: B: C: D: Type groups Search help Lock objects Function groups
Ans:D 6. In a line of code, text-100, is an example of which type of text element? A: B: C: D: Text symbol Selection text Text title Text identifier
Ans:A 7. The editor function that formats and indents the lines of code automatically is called ____. A: B: C: D: Auto align Pretty printer Generate version Syntax check
Ans:B 8. A DO loop increments the system field ____. A: B: C: D: SY-LOOPI SY-TABIX SY-LSIND SY-INDEX
Ans: D 9. The event that is processed after all data has been read but before the list is displayed is:
A: B: C: D:
END-OF-PAGE. START-OF-SELECTION. END-OF-SELECTION. AT LINE-SELECTION.
10. The field declared below is of what data type? DATA: new_fld(25). A: B: C: D: P N I C
Ans: D 11. In regard to the INITIALIZATION event, which of the following is NOT a true statement? A: B: C: D: Executed before the selection screen is displayed. You should use SET PF-STATUS here. You can assign different values to PARAMETERS and SELECT-OPTIONS here. Executed one time when you start the report.
Ans: B 12. The event AT SELECTION-SCREEN OUTPUT. occurs before the selection screen is displayed and is the best event for assigning default values to selection criteria. A: True B: False Ans: B 13. The business (non-technical) definition of a table field is determined by the field's ____. A: B: C: D: domain field name data type data element
Ans: D 14. In regard to the three-tier client/server architecture, which of the following is a true statement? A: B: C: D: The presentation server processes the SAP program logic. An application server is responsible for updating database tables. Typically, there is a one-to-one ratio of database servers to presentation servers. The application server layer is the level between a presentation server and a database server.
Ans: D, b 15. What will be output by the code below? DATA: alph type I value 3. write: alph. WHILE alph > 2. write: alph. alph = alph - 1. ENDWHILE. A: B: C: D: Ans: D 16. To allow the user to enter a single value on a selection screen, use the ABAP keyword ____. A: SELECT-OPTIONS. B: PARAMETERS. C: RANGES. D: DATA. Ans: B 17. What will be output by the following code? DATA: BEGIN OF itab OCCURS 0, fval type i, END OF itab. 3 3 2 3 3 2 3 3
itab-fval = 1. APPEND itab. itab-fval = 2. APPEND itab. REFRESH itab. WRITE: /1 itab-fval. A: 1 B: 2 C: blank D: 0 Ans: B 18. You can define your own key fields when declaring an internal table. A: True B: False Ans: B A 19. When modifying an internal table within LOOP AT itab. _ ENDLOOP. you must include an index number. A: True B: False Ans : B 20. If itab contains 20 rows, what will SY-TABIX equal when the program reaches the WRITE statement below? SY-TABIX = 10. LOOP AT itab. count_field = count_field + 1. ENDLOOP. WRITE: /1 count_field. A: 0 B: 10 C: 20 D: 30 Ans: b
21. Given: SELECT SINGLE vbeln FROM VBAK INTO vbak-vbeln WHERE mandt = sy-mandt AND vbeln = pvbeln. IF SY-SUBRC = 0. WRITE: /1 vbak-vbeln. ENDIF. If VBAK is a client-dependent table, what will be the result? A: B: C: D: Output of vbak-vbeln if the record is found. Output of vbak-vbeln if the record is not found. No output if the record is found. Nothing, there is a syntax error.
22. To select one record for a matching primary key, use ____. A: SELECT B: SELECT INTO C: SELECT SINGLE D: SELECT ENTRY Ans: C 23. In regard to MOVE-CORRESPONDING, which of the following is NOT a true statement? A: B: C: D: Moves the values of components with identical names. Fields without a match are unchanged. Corresponds to one or more MOVE statements. Moves the values of components according to their location.
Ans: B 24. All of the following are valid Open SQL statements except: A: OPEN DATASET. B: CLOSE CURSOR. C: DELETE. D: COMMIT WORK. Ans:b 25. To read an exact row number of an internal table, use this parameter of the READ TABLE statement. A: INDEX B: TABIX
C: ROW D: WHERE Ans: B A 26. To remove lines from a database table, use ____. A: B: C: D: UPDATE MODIFY ERASE DELETE
Ans: D 27. Which table type would be most appropriate for accessing table rows using an index. A: B: C: D: Hashed table Standard table Sorted table None of these may be accessed using an index.
Ans: C 28. The following code indicates: SELECTION-SCREEN BEGIN OF BLOCK B1. PARAMETERS: myparam(10) type C, Myparam2(10) type N, SELECTION-SCREEN END OF BLOCK. A: B: C: D: Draw a box around myparam and myparam2 on the selection screen. Allow myparam and myparam2 to be ready for input during an error dialog. Do not display myparam and myparam2 on the selection screen. Display myparam and myparam2 only if both fields have default values.
Ans: A 29. If this code results in an error, the remedy is: SELECT fld1 SUM( fld1 ) FROM tab1 INTO_ A: B: C: D: Remove the spaces from SUM( fld1 ). Move SUM( fld1 ) before fld1. Add GROUP BY f1. Change to SUM( DISTINCT f1 ).
30. Given: IF MY_IND = 'X'. COMMIT WORK. ELSE. ROLLBACK WORK. ENDIF. If my_ind is initial, this will result in: A: Changes are written to the database. B: Changes are undone without writing them to the database. C: A database error. D: An abend. 31. When writing a SELECT statement, you should place as much load as possible on the database server and minimize the load on the application server. A: True B: False Ans: B 32. To allow the user to enter values on the screen for a list field, use: A: B: C: D: OPEN LINE. SET CURSOR FIELD. WRITE fld AS INPUT FIELD. FORMAT INPUT ON.
33. In regard to subroutines and function modules, to ensure that an actual parameter is the same type as its corresponding formal parameter, you should ____. A: B: C: D: code a SY-SUBRC check specify a reference field verify the types yourself when coding use the DESCRIBE FIELD statement
34. In the following code, what does function FC12 do? AT USER-COMMAND. CASE SY-UCOMM. WHEN 'FC11'. SCROLL LIST LEFT BY 20 PLACES. WHEN 'FC12'. SCROLL LIST FORWARD.
ENDCASE. A: B: C: D: Shifts the list rows up. Moves the cursor. Scrolls the list to the right. Performs a page up.
35. What must you code in the flow logic to prevent a module from being called unless a field contains a non-initial value (as determined by its data type)? A: B: C: D: ON INPUT CHAIN FIELD ON REQUEST
36. Which of the following is not a component of dialog programming environment? A: B: C: D: Transaction code Screen ABAP module pool Background job
37. To modify several fields in a screen without referencing each individual field name: A: B: C: D: Access the SPA/GPA parameter for each of the fields. Assign the fields to a single ABAP Dictionary structure. Group the fields in a CHAIN. Identify the fields via their group name.
38. To allow the user to execute a specific function, write code within the event ____. A: B: C: D: START-OF-SELECTION. AT LINE-SELECTION. INITIALIZATION. None of the above
Ans: 39. Which ABAP program attribute provides access protection? A: B: C: D: Status Application Development class Authorization group
40. Page headers for a secondary list should be coded in which event? A: B: C: D: TOP-OF-PAGE. START-OF-SELECTION. TOP-OF-PAGE DURING LINE-SELECTION. AT USER-COMMAND.
Ans: C 41. Given: PERFORM subroutine USING var. The var field is known as what type of parameter? A: B: C: D: Formal Actual Static Value
Ans:B 42. In regard to Runtime Analysis, which of the following is NOT a true statement? A: System-level performance problems are identified. B: Helps you analyze the performance of any program created within the ABAP Workbench. * C: Helps identify potentially inefficient database accesses. D: Measurement results are saved in performance data files. 43. The following code indicates: CALL SCREEN 300. A: B: C: D: Start the PAI processing of screen 300. Jump to screen 300 without coming back. Temporarily branch to screen 300. * Exit screen 300.
Ans:C 44. When making a function module call, pass internal tables via the parameter ____. A: B: C: D: EXPORTING IMPORTING USING TABLES
45. In relation to an internal table as a formal parameter, because of the STRUCTURE syntax, it is possible to: A: B: C: D: Use the DESCRIBE statement within a subroutine. Loop through the internal table within a subroutine. Access the internal table fields within a subroutine. Add rows to the internal table within a subroutine.
46. To use a secondary table index in your SELECT statement, you should: A: B: C: D: Include the index fields in the WHERE clause in the correct order Use the INDEX clause of the SELECT statement Include MANDT in the WHERE clause None of the above
47. To prevent duplicate accesses to a master data field: A: B: C: D: Create an index on the master data field. Remove nested SELECT statements. Use SELECT SINGLE. Buffer the data in an internal table.