Google Search - Blog...........

ABAP - Example On How To Use PF-Status In Interactive Reports.

report demo_list_read_line no standard page heading.

tables: sflight.

data: box(1) type c, lines type i, free type i.

start-of-selection.

set pf-status 'CHECK'.

get sflight.

write: box as checkbox, sflight-fldate.
hide: sflight-fldate, sflight-carrid, sflight-connid,
sflight-seatsmax, sflight-seatsocc.

end-of-selection.

lines = sy-linno - 1.

top-of-page.

write: 'List of flight dates'.
uline.

top-of-page during line-selection.

write: 'Date:', sflight-fldate.
uline.

at user-command.

case sy-ucomm.
when 'READ'.

box = space.
set pf-status 'CHECK' excluding 'READ'.

do lines times.
read line sy-index field value box.

if box = 'X'.
free = sflight-seatsmax - sflight-seatsocc.

if free > 0.
new-page.
write: 'Company:', sflight-carrid,
'Connection: ',sflight-connid,
/ 'Number of free seats:', free.
endif.
endif.

enddo.
endcase.

No comments:

Post a Comment