Professional Documents
Culture Documents
Objectives: Develop a web dynpro application with a view that displays two tables: a list of
flights and a list of bookings. The data displayed in the second table should depend on the
selected row in the first table.
Note: Supply function is used to make sure that the data in the second table is changed
whenever the user selects a different row in the first table.
types:begin of ty_Bookingstab ,
CARRID type sbook-CARRID,
CONNID type sbook-CONNID,
FLDATE type sbook-FLDATE,
BOOKID type sbook-BOOKID,
CUSTOMID type sbook-CUSTOMID,
CLASS type sbook-CLASS,
FORCURAM type sbook-FORCURAM,
FORCURKEY type sbook-FORCURKEY,
ORDER_DATE type sbook-ORDER_DATE,
AGENCYNUM type sbook-AGENCYNUM,
CANCELLED type sbook-CANCELLED,
PASSNAME type sbook-PASSNAME,
PASSFORM type sbook-PASSFORM,
PASSBIRTH type sbook-PASSBIRTH,
end of ty_Bookingstab.
data:t_Bookingstab type standard table of ty_Bookingstab,
x_bookings type ty_Bookingstab.
select CARRID
CONNID
FLDATE
BOOKID
CUSTOMID
CLASS
FORCURAM
FORCURKEY
ORDER_DATE
AGENCYNUM
CANCELLED
PASSNAME
PASSFORM
PASSBIRTH
from sbook
into table t_Bookingstab
where carrid = stru_flighttab-carrid and
connid = stru_flighttab-connid and
fldate = stru_flighttab-fldate.
if not t_Bookingstab[] is initial.
loop at t_Bookingstab into x_bookings.
move-corresponding x_bookings to Stru_Bookingstab.
append Stru_Bookingstab to Itab_Bookingstab.
endloop.
CALL METHOD NODE->BIND_TABLE
EXPORTING
NEW_ITEMS = Itab_Bookingstab.
* SET_INITIAL_ELEMENTS = ABAP_TRUE
* INDEX =
endif.
endmethod.
7. Activate the component and create an Application and test the same.
8. The output appears as below:
9.
12. When selected any other row in the first table i.e., data record from SFLIGHT,
corresponding data from SBOOK table appears in the second table which is as below:
13.