See this code & tell me why it is displaying message "t2" two times?
REPORT Z_FLIGHT_DEPART.
data wa_flight type sflight.
"Data text type string value 'list is going to be displayed'.
Data I type integer.
Data t2 type string value 'List has been displayed for a short time'.
"Message text type 'I'.
select * from sflight into wa_flight up to 5 rows.
i = i + 1. " coz select is a loop so it increments i each loop pass.
new-line.
"uline.
write:
wa_flight-carrid,
wa_flight-connid,
wa_flight-fldate,
wa_flight-seatsocc,
wa_flight-seatsmax.
write i. "it writes the value of each loop pass.
endselect.
Message t2 type 'I'.
if i = 5 .
Message t2 type 'I'. "This message is displayed two times Why?
endif.