Skip to end of metadata
Go to start of metadata


Here is the senario-> We have a table displayed on Main view* ,* after selecting a value  from the table we need to display that value on Next View in a web dynpro application.

The whole process has to be done locally ( i.e without using global context atributes ). Following are the steps to perform such operation......

In SE80-> create a Web dynpro  application

Design a view MAIN and in Context Tab declare a node Flight  with attributes

design the layout with a Table element , a button to trriger an action for passing the selected value to another view

 create a binding between the Table and the context node FLIGHT

for navigating between view u need to create Inbound & Outbound Plugs say IN & OUT resp.

Inbound Plug


Outbound plug

For passing the selected value to the other View u need to export the value as Parameter in Outbound plug


In CONTEXT tab, in WDDOINIT METHOD give the following code

method wddoinit .

  data lo_nd_flight type ref to if_wd_context_node.
  data t_flight type standard table of sflight.

*& Fetch flight details from database
  select * from sflight
     into table t_flight
     up to 100 rows.

  if sy-subrc ne 0.
    message 'No Records Found' type 'E'.
  endif.                               " IF SY-SUBRC NE 0

* navigate from <CONTEXT> to <FLIGHT> via lead selection
  lo_nd_flight = wd_context->get_child_node( name = 'FLIGHT' ).

*& Method call to bind internal table to the element
  call method lo_nd_flight->bind_table( t_flight ) .


Create another view NEXT also provide inbound & outbound plugs for navigation purpose like (IN & OUT)

 Inbound Plug

Outbound Plug

In NEXT view, Context Tab create an attribute say CARRID

 Design the layout, here we have one Button 'BACK' and Input Field to display the value passed from MAIN view.

In EVENT HANDLEIN of view NEXT give CARRID as importing parameter of type SCARR-CARRID and give the following code..

method handlein .

  data lo_el_context type ref to if_wd_context_element.
  data ls_context type wd_this->element_context.
  data lv_carrid like ls_context-carrid.

* get element via lead selection
  lo_el_context = wd_context->get_element(  ).

 call method lo_el_context->set_attribute
      value = carrid
      name  = 'CARRID'.


Map both the Views to the WINDOW, create web dynpro application save & Activate it & Test it.....
First select a row in the table and press on Button, in NEXT view u shall see the selected value in the input fied.
u can either use this value to create a new table or perform some query operation based on the value.

  • No labels

1 Comment

  1. Former Member

    I tried following this and I added the outbound parameter CONNID type Sflight-CONNID because my search with populate a table on another view from the same SFLIGHT but with more fields  So I put the outbound parameter and then the inbound and followed your cold except I obviously changed for my nodes and my table names and my input value and export values  But when I syntax check it says the outbound parameter CONNID doesn't have a assigned value, the thing is the user will input the value  Do you know what I am doing wrong?  I am very new to SAP ABAP and WEBDYNPRO