You are on page 1of 5

1. Predict the output of the following code: REPORT zsaptechnical_test.

TYPES: BEGIN OF ty_data, name(10) TYPE c, category(3) TYPE c, END OF ty_data. DATA: t_data TYPE STANDARD TABLE OF ty_data, s_data TYPE ty_data. s_data-name = 'Patrick'. s_data-category = 'MGR'. APPEND s_data TO t_data. s_data-name = 'Ajay'. s_data-category = 'SWE'. APPEND s_data TO t_data. s_data-name = 'Richard'. s_data-category = 'CSH'. APPEND s_data TO t_data. s_data-name = 'Brown'. s_data-category = 'GM'. APPEND s_data TO t_data. READ TABLE t_data INTO s_data WITH KEY name = 'Patrick' BINARY SEARCH. WRITE: sy-subrc. a. b. c. d. 0 2 4 Syntax Error

2. Predict the output of the following code: REPORT zsaptechnical_test. DATA: d_number TYPE i VALUE 1. PERFORM calculate. FORM calculate. d_number = d_number * 10. ENDFORM. "calculate PERFORM display. FORM display. WRITE d_number. ENDFORM. "display a. 1 b. 10

c. No output d. Syntax Error 3. Predict the output of the following code: REPORT zsaptechnical_test. DATA: d_string(50) TYPE c, d_off type i. move 'Welcome to SAPTechnical.COM' to d_string. FIND 'SAPTechnical' IN d_string MATCH OFFSET d_off. shift d_string by d_off places. write d_string. a. b. c. d. SAPTechnical SAPTechnical.COM Welcome to SAPTechnical.COM Welcome to

4. Predict the output of the following code: REPORT zsaptechnical_test. TYPES: BEGIN OF ty_test, f1 TYPE c, END OF ty_test. DATA: t_test TYPE STANDARD TABLE OF ty_test, d_test TYPE ty_test. INSERT APPEND APPEND APPEND INSERT APPEND APPEND APPEND INITIAL LINE INTO t_test INDEX 1. 'X' TO t_test. INITIAL LINE TO t_test. 'X' TO t_test. INITIAL LINE INTO t_test INDEX 1. 'X' TO t_test. INITIAL LINE TO t_test. 'X' TO t_test.

DELETE ADJACENT DUPLICATES FROM t_test. DESCRIBE TABLE t_test. WRITE sy-tfill. a. b. c. d. 1 2 6 8

5. Predict the output of the following code: REPORT zsaptechnical_test.

DATA: d_wa(20) VALUE 'SAPTechnical.COM', BEGIN OF d_line1, f1(12), f2 TYPE sy-uzeit, END OF d_line1. FIELD-SYMBOLS: <f1> LIKE d_line1. ASSIGN d_wa TO <f1> CASTING. WRITE: <f1>-f1, <f1>-f2. a. b. c. d. SAPTechnical.COM SAPTechnical.C:OM: SAPTechnical .C:OM: Syntax Error

6. Predict the output of the following code: REPORT zsaptechnical_test. PARAMETERS: p_getval(20). IF p_getval = 'SAPTechnical.COM'. WRITE 'Alpha'. ELSE. WRITE 'Beta'. ENDIF. The user has entered SAPTechnical.COM on the selection-screen and executed the p rogram. What would be the output of the program: a. b. c. d. Syntax error Alpha Beta None of the above

7. Predict the output of the following code: REPORT zsaptechnical_test. DATA: d_int TYPE i. MOVE 10 TO d_int. PERFORM calculate. PERFORM display. FORM calculate. LOCAL d_int. d_int = d_int MOD 3. ENDFORM. "calculate FORM display. WRITE d_int.

ENDFORM. "display a. b. c. d. 3 3.33 10 None of the above

8. Predict the output of the following code: REPORT zsaptechnical_test. 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. a. b. c. d. 26 23456 1789 178910

9. Predict the output of the following code: REPORT zsaptechnical_test. DATA: d_pos LIKE sy-index, initialization. move 10 to d_pos. at SELECTION-SCREEN. move 20 to d_pos. start-OF-SELECTION. add 30 to d_pos. exit. end-OF-SELECTION. write d_pos. a. b. c. d. 10 20 30 None of the above

10. Predict the output of the following code: REPORT zsaptechnical_test. Parameters: d_char OBLIGATORY. write d_char.

Assume that the user entered '!' (No quotes) on the selection-screen and execute d the program. What would be the output? a. b. c. d. ! Error message -> Invalid entry Error message -> Fill in all required entry fields None of the above

http://www.saptechnical.com/InterviewQ/QnA/QnA2.htm

ANSWERS: 1.C 2.D 3.B 4.C 5.C 6.C 7.C 8.B 9.D 10.C