ABAP Quiz III

....Previous Question

What happens when we try to SORT the sorted table? 

2. 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.

SORT t_mara.

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

Answer:

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