|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Navigation from one View to other View along with parameters using Plugs with out using Component Controller context (Web Dynpro for ABAP)
By Suman Kumar Chinnam, YASH Technologies
Web dynpro application to demonstrate the use of Passing
Parameters from one view to the other view with the help of Plugs. We will
develop one web dynpro component (ZDEMO_PLUGS) and two views, we will pass
values from one view (SEARCH) to the other using OUTBOUND plug and we will
receive values using INBOUND plug of second view (FLIGHTS).
a Web Dynpro Component:
Create a Web dynpro component using TCode SE80 with name ZDEMO_PLUGS.
Click on the Web Dynpro component ZDEMO_PLUGS in
the object tree and open the context menu to create a new view.
Create view SEARCH
the View Context
view SEARCH and switch to tab Context.
click on Context to create new node INPUT and then add required attributes to
the properties according to the screen shot below. Enter Node name INPUT, Select
SFLIGHT as Dictionary Structure and
“1…1” for the Cardinality.
button “Add Attribute from
Structure” and select all components of structure SFLIGHT.
Now the selected attributes will be
added to the Node INPUT.
Now switch to the Layout tab of the View SEARCH and add
elements to the Layout by right click on Route element container, using the
context menu Insert Element. See the below screen shot.
an Action and Corresponding Action Handler
an action SEARCH which is
triggered by the Web Dynpro event onAction.in
properties table of BUTTON1,
select the event property onAction. Click
the icon on the right corner (empty page) to define a new action.
This will generate a method (ONACTIONSEARCH) to handle Button
the Plugs for the Navigation between views SEARCH and FLIGHTS
Now switch to tab Outbound Plugs of view SEARCH. Define
outbound plug (TOFLIGHTS) and declare the importing parameters.
To navigate from the FLIGHTS View to SEARCH view for a new
search an inbound plug is needed click on tab Inbound Plugs and create a Plug
Note: When creating an Inbound Plug an event handler will be
the Event Handler:
handler for action Search, which is method ONACTIONSEARCH, needs to be modified
to make a call to the second view FLIGHTS. In order to do this, invoke the Web
Dynpro Code Wizard
choose option Start navigation (1)
F4 help to select Outbound Plug (2)
method will call the second view by triggering the outbound plug.
Now we need to pass entered input values to this Plug.
Again use Web dynpro code wizard to read Context INPUT of
The code will be like.
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards