cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with type modelacess_flightbookings

Former Member
0 Kudos

Hi there,

I am doing the tutorial 8 - Handling Tables with WD ABAP, but in the page 29, I had a little problem.

When I check the source method GET_SPFLI, the line code: spfli_tab = modelaccess_flightbookinks=>read_spfli( value ) shows me the message type is unknow.

ps.: this happen in method GET_SFLIGHT too.

The full source below:

method GET_SPFLI .

data: input_node type ref to if_wd_context_node,

value type S_CARR_ID,

spfli_tab type standard table of spfli.

  • Pega parametros do 'INPUT_NODE'

input_node = wd_context->get_child_node( name = 'INPUT_NODE' ).

input_node->get_attribute( exporting name = 'carrid' importing value = value ).

  • Pega saída de dados do modelo

  • spfli_tab = modelaccess_flightbookinks=>read_spfli( value ).

  • Interliga todos os elementos

node->bind_elements( spfli_tab ).

endmethod.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Minoru,

For this you need to create a class modelaccess_flightbookinks and a method in the class read_spfli, and in this method you need to write the select stmt for getting the details.

or you can try like this.

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.

parent_element->get_static_attributes( importing static_attributes = Stru_FlightList ).

Itab_bookings = CL_WDABAP_FLIGHT_MODEL=>GET_BOOKINGS(

CARRID = Stru_FlightList-airlineid

CONNID = Stru_FlightList-connectid

FLDATE = Stru_FlightList-flightdate ).

node->bind_table( Itab_bookings ).

endmethod.

try like this..

Cheers

Mary

Former Member
0 Kudos

Hi Mary,

Thanks for your help, but I tried in SE24, the class read_spfli and the object not exist too...

Is it normal?

Former Member
0 Kudos

Hi Mary,

I found the class CL_WDT_FLIGHT_MODEL = MODELACESS_FLIGHTBOOKINKS...

-_-

Thanks!

Answers (0)