Page 1
Standard
Hook
Methods
Required
Controllers
Controller
Interface
Component
Usage
Page 2
Custom
Controller
Business
Logic
(Models)
Instance
Methods
Other WD
Controllers
Other WD
Components
method WDDOINIT.
endmethod.
method WDDOEXIT.
endmethod.
Standard
Hook
Methods
Instance
Methods
Required
Controllers
Other WD
Controllers
Custom
Controller
Controller
Interface
Business
Logic
(Models)
Component
Usage
Other WD
Components
Page 4
Page 5
Page 6
WD_COMP_CONTROLLER
present in any WD controller.
reference to the component controller with access to all public methods
and attributes.
Attribute will automatically assigned to all view controllers when a view
is created.
For all other controller the WD_COMP_CONTROLLER attribute will
be assigned, when the properties of the controller the component
controller is used.
Page 7
WDDOBEFORENAVIGATION
WDDOPOSTPROCESSING
Data from multiple components can be validated before the next step is
execute
Page 8
Flights
CARRID
CARRID
2
CONNID
CARRID
CONNID
1
..n
CONNID
data: Node_Flights
Page 9
Flights
CARRID
CARRID 2
CONNID
CARRID
CONNID
1
..n
CONNID
data: Node_Flights
Elem_Flights
).
Page 10
Flights
CARRID
CARRID
2
CONNID
CARRID
CONNID 1
..n
CONNID
data: Node_Flights
Elem_Flights
Item_CARRID
).
Flights
CARRID
CONNID
CARRID
2
..n
CARRID
CONNID
1
CONNID
data: Node_Flights
Elem_Flights
Stru_Flights
).
Page 12
Flights
CARRID
CARRID
CONNID
2
..n
Itab
CONNID
CARRID
1
CONNID
data: Node_Flights
Elem_Flights
lt_Flights
Page 13
FLIGHTS
data:
Node_Flights type ref to If_Wd_Context_Node.
* navigate from <CONTEXT> to <FLIGHTS> via lead selection
node_flights = wd_context->get_child_node( Name = 'FLIGHTS' ).
Page 14
FLIGHTS
data:
Node_Flights type ref to If_Wd_Context_Node,
First_flight_Elem type ref to If_Wd_Context_Element.
* navigate from <CONTEXT> to <FLIGHTS> via lead selection
node_flights = wd_context->get_child_node( Name = 'FLIGHTS' ).
* create new element for node FLIGHTS
First_flight_Elem = Node_Flights->create_element(
Page 15
).
FLIGHTS
CARRID
CONNID
data:
Node_Flights type ref to If_Wd_Context_Node,
First_flight_Elem type ref to If_Wd_Context_Element.
* navigate from <CONTEXT> to <FLIGHTS> via lead selection
node_flights = wd_context->get_child_node( Name = 'FLIGHTS' ).
* create new element for node FLIGHTS
First_flight_Elem = Node_Flights->create_element(
).
* set attributes
First_flight_Elem->set_attribute( name = 'CARRID' value = 'LH' ).
First_flight_Elem->set_attribute( name = 'CONNID' value = '400' ).
Page 16
FLIGHTS
CARRID
CONNID
data:
Node_Flights type ref to If_Wd_Context_Node,
First_flight_Elem type ref to If_Wd_Context_Element.
* navigate from <CONTEXT> to <FLIGHTS> via lead selection
node_flights = wd_context->get_child_node( Name = 'FLIGHTS' ).
* create new element for node FLIGHTS
First_flight_Elem = Node_Flights->create_element(
).
* set attributes
First_flight_Elem->set_attribute( name = 'CARRID' value = 'LH' ).
First_flight_Elem->set_attribute( name = 'CONNID' value = '400' ).
* bind first element to node
Node_Flights->bind_element( new_item = First_flight_Elem
SET_INITIAL_ELEMENTS
= abap_false
).
Protection
notice / Copyright Siemens AG 2007. All rights reserved.
Page
17
Page 18
FLIGHTS
CARRID
Itab
1
CONNID
data:
Node_Flights type ref to If_Wd_Context_Node,
lt_flights type If_Componentcontroller=>Elements_flights,
Stru_flights like line of lt_flights.
* append values to local table
Stru_flights-carrid
= 'LH'.
Stru_flights-connid = '400'.
append Stru_flights to lt_flights.
Stru_flights-carrid
= 'AA'.
Stru_flights-connid = '017'.
append Stru_flights to lt_flights.
* get node reference
Node_Flights = wd_context->get_child_node( 'FLIGHTS' ).
* bind local table
lt_flights
notice).
/ Copyright Siemens AG 2007. All rights reserved.
Page 19Node_Flights->bind_table( Protection