|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Reusability of components in Web Dynpro for ABAP
By Suman Kumar Chinnam, YASH Technologies
dynpro Application to demonstrate the usage of custom component into other
component. We will develop one webdynpro component (ZDEMO_FLIGHTS)
and make the methods of this Component controller
available for cross components. We develop another component (ZDEMO_SEARCH_FLIGHTS)
and we reuse the methods of
in component (ZDEMO_SEARCH_FLIGHTS).
This is a typical
example of reusable components that are built to display a special set of data
and can be used in several other components.
the end of this tutorial, you will be able to understand “Using one
Component’s methods in another component (Reusing the Components)”.
One: Development of Reusable Component
Component Controller Context and Methods:
2. Click on Component Controller in the Object
Create the context node
the properties according to the screen shot below. Enter Node name FLIGHTS,
Select SFLIGHT as Dictionary Structure and
“0…n” for the Cardinality.
button Add Attribute from Structure and
select all components of structure SFLIGHT.
Now go to Methods tab in the Component
Controller, add the method to get Fights details and check the interface
checkbox in order to access this method in other components.
Add the Importing parameters and implement the
Method to get the Flight details from Table SFLIGHT.
Click on the Web Dynpro component ZDEMO_FLIGHTS
in the object tree and open the context menu to create a new view.
Create view FLIGHTS.
Defining the View Context Mapping
view FLIGHTS and switch to tab Context.
Map context node FLIGHTS to the view context of FLIGHTS using Drag and Drop.
Adding UI Elements to the View:
Add table Element to Layout.
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