Skip to end of metadata
Go to start of metadata

Step1. Goto se80 transaction select webdynpro give the application name and enter.


Step2: Click on yes.


Step3: Give the description, window name, view name and continue.


Step4: Goto view and context tab to create node.



Give the name of node, select the

Cardinality 0..n

 Selection 0..1

Supply function fill_list

and continue.


Step6: Right click on node and create an attribute.


Step7:Define the attribute name and type.


Step8:  Goto methods tab double click on fill list method code will be generated automatically and uncomment the code.

method fill_list .
* General Notes
* =============
* A common scenario for a supply method is to aquire key
* informations from the parameter <parent_element> and then
* to invoke a data provider.
* A free navigation thru the context, especially to nodes on
* the same or deeper hierachical level is strongly discouraged,
* because such a strategy may easily lead to unresolvable
* situations!!

*  if necessary, get static attributes of parent element
*  DATA ls_parent_attributes TYPE wd_this->element_context.
*  parent_element->get_static_attributes(
*      static_attributes = ls_parent_attributes ).

* data declaration
  data lt_main type wd_this->elements_main.
  data ls_main like line of lt_main.

  select distinct carrid from sflight into table lt_main.
* @TODO compute values
* e.g. call a data providing FuBa

* bind all the elements
    new_items            =  lt_main
    set_initial_elements = abap_true ).


  Step9: Goto layout tab and rightclick on Rootuielementcontainer and click on insertelement.

 Step10: Select item listbox and give the name.



Define the following  properties of an item.

Tick the option multiselect.

Data source click on binding and select the node name, and in text property bind the attribute.

Step12: Create a webdynpro application and give the description.


Step13:  Save and activate the application. 

Step14:Output is as follows: