node:(supply function )
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 ).
select * FROM sbook into CORRESPONDING FIELDS OF TABLE itab_bookings
where carrid = stru_flightlist-airlineid
and connid = stru_flightlist-connectid
and fldate = stru_flightlist-flightdate .
node->bind_table( itab_bookings ).
**
wizard (button action)
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->execute_bapi_flight_getlist(
).
controller implementation .
* declarations for context navigation
DATA lo_element TYPE REF TO if_wd_context_element.
DATA lt_elements TYPE wdr_context_element_set.
* declarations for parameters
* get all involved child nodes
* get input from context
* the invocation - errors are always fatal !!!
DATA lv_rfc_error TYPE c LENGTH 120.
DATA lv_rfc_message TYPE string.
data:t_list type wd_this->elements_flight_list .
CALL FUNCTION 'BAPI_FLIGHT_GETLIST'
EXPORTING
* airline = wd_this->airline
destination_from = wd_this->destination_from
destination_to = wd_this->destination_to
" max_rows = wd_this->max_rows
TABLES
" date_range =
" extension_in =
flight_list = t_list
" extension_out =
" return =
* EXCEPTIONS
* system_failure = 1 MESSAGE lv_rfc_error
* communication_failure = 2 MESSAGE lv_rfc_error.
** error handling
* CASE sy-subrc.
* WHEN 1.
* lv_rfc_message = lv_rfc_error.
* RAISE EXCEPTION TYPE cx_wd_no_handler
* EXPORTING
* textid = cx_wd_no_handler=>kind_rfc
* old_exception = `SYSTEM_FAILURE`
* rfc_message = lv_rfc_message.
* WHEN 2.
* lv_rfc_message = lv_rfc_error.
* RAISE EXCEPTION TYPE cx_wd_no_handler
* EXPORTING
* textid = cx_wd_no_handler=>kind_rfc
* old_exception = `COMMUNICATION_FAILURE`
* rfc_message = lv_rfc_message.
* ENDCASE.
.
data:node_root type REF TO if_wd_context_node .
data:node_list type REF TO if_wd_context_node .
node_root = wd_context->get_child_node( name = 'BAPI_FLIGHT_GETLIST' ).
node_list = node_root->get_child_node( name = 'FLIGHT_LIST' ) .
node_list->bind_table( new_items = t_list
set_initial_elements = abap_true ) .