on 04-18-2008 3:08 PM
Hi,
I am studyng the SAP´s Web Dynpro Tutorial 4 and I saw the error about CL_WDABAP_FLIGHT_MODEL=>get_bookings is unknow or not found.
And the resolution:
Simply create a ZCL_WDABAP_FLIGHT_MODEL class in your get_bookings
method.
Its purpose is only to select from the SBOOK table.
select * from sbook into table bookings where
carrid = carrid
connid= connid
fldate = fldate.
->>bookings is the return parameter of type TY_BOOKINGS
But, how can I do this?
ps.: I am begginer in ABAP too.
Thanxs a lot!
I'm not too sure about your proposed solution:
Simply create a ZCL_WDABAP_FLIGHT_MODEL class in your get_bookings
method.
If the method CL_WDABAP_FLIGHT_MODEL=>get_bookings is non existent, than I assume that the class CL_WDABAP_FLIGHT_MODEL is also not available.
So the easiest thing to do would be to select the data yourself from where ever you want to call the above mentioned method.
So do this:
select * from sbook into table bookings where
carrid = carrid
connid= connid
fldate = fldate.
->>bookings is the return parameter of type TY_BOOKINGS
But for this to work ok, first define an internal table 'bookings' (if not done yet) like this:
data: bookings type table of bookings.
And about the type TY_BOOKINGS, don't think you will need it anymore, since you have already selected all the data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is the select statement you gave me:
select * from sbook into table bookings where
carrid = carrid
connid= connid
fldate = fldate.
For this to work correctly you have to declare CARRID, CONNID and FLDATE as well. I image that they are defined on the selection screen of your WD application (correct me if I'm wrong).
Read the context of the view, and use these parameters for selecting the data.
On selection screen??
I do not do this.
I did this in COMPONENTCONTROLLER -> GET_BOOKINS
Itab_Bookings = ZCL_WDABAP_FLIGHT_MODEL=>GET_BOOKINGS(
CARRID = Stru_FlightList-airlineid
CONNID = Stru_FlightList-connectid
FLDATE = Stru_FlightList-flightdate
).
node->bind_table( Itab_bookings ).
Is it correct?
I am following the the Sap Tutorial, but do not work.
Plz try this...this will solve the problem i think...
method GET_BOOKINGS .
data: Itab_Bookings type IF_COMPONENTCONTROLLER=>Elements_Bookings,
Stru_Bookings like line of Itab_Bookings,
Stru_FlightList type
if_componentcontroller=>Element_FLIGHT_LIST.
data : bookings TYPE ty_bookings.
parent_element->get_static_attributes( importing static_attributes =
Stru_FlightList ).
select * from sbook into table bookings where
carrid = Stru_FlightList-airlineid and
connid = Stru_FlightList-connectid and
fldate = Stru_FlightList-flightdate.
Itab_bookings = bookings.
node->bind_table( Itab_bookings ).
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.