Hi Murali Ram,
For your example, you just need to create a method in assistance class and call it inside Webdynpro view.
Create method GET_FLIGHT_DATA( ) in assistance class
Parameters: it_carrid TYPE ref to DATA ( Importing Parameter )
rt_result TYPE FLIGHTTAB ( Returning Parameter )
logic:
field-symbols: <ft_carrid> type table.
assign it_carrid->* to <ft_carrid>.
if <ft_carrid> is not assigned. " check if carried is assigned
return.
endif.
SELECT * INTO TABLE rt_result FROM SFLIGHT
WHERE CARRID IN <FT_CARRID>.
Now call the assistance class method inside WD as below
DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
DATA: RT_CARRID TYPE REF TO DATA.
DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
DATA: WSFLIGHT TYPE SFLIGHT.
* Retrieve the data from the select option
RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
CLEAR ISFLIGHT.
ISFLIGHT = WD_ASSIST->GET_FLIGHT_DATA(EXPORTING IT_CARRID = RT_CARRID ).
NODE_FLIGHTS = WD_CONTEXT->GET_CHILD_NODE( NAME = `FLIGHTS` ).
NODE_FLIGHTS->BIND_ELEMENTS( ISFLIGHT ).
Here, we are passing select options as data reference and retrieving the result back.
Hope this helps you.
Regards,
Rama