ABAP Quiz III

Click here for ABAP Quiz I

Click here for ABAP Quiz II

Guess the output of the following programs without even logging into system

1. Predict the output of the following code:

REPORT z_saptechnical.

* Type declaration
TYPES:
BEGIN OF ty_mara,
matnr
LIKE mara-matnr,
mtart
LIKE mara-mtart,
END OF ty_mara.

* Table workarea definition
DATA:
wa_mara
TYPE ty_mara.

* Internal table declaration
DATA:
t_mara
TYPE SORTED TABLE OF ty_mara
WITH NON-UNIQUE KEY matnr.

wa_mara
-matnr = 'PEN'.
APPEND wa_mara TO t_mara.

wa_mara
-matnr = 'TENT'.
APPEND wa_mara TO t_mara.

wa_mara
-matnr = 'PEN'.
APPEND wa_mara TO t_mara.

LOOP AT t_mara INTO wa_mara.
WRITE:/ wa_mara-matnr.
ENDLOOP.

Guessed the output? Enter your answer below and then verify your answer by clicking the "Answer Button".

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image