A Fire method is a special kind of method generated by the Framework when we define an outbound plug.We need inbound plugs and outbound plugs to define the navigation between two views.These plugs are the entry and the exit point for each view.We create an example,a WD component that has two Views. The WD component structure is presented.
WD component structure
In this case, we want to navigate from the view V_VIEW1 to the view V_VIEW2, when the Framework triggers an event handler method, respective when the user presses a button.In the COMPONENTCONTROLLER,we create a context node PERSON, Cardinality 1...1,Singleton and one attribute NAME of string type.
The data stored in the context of the component controller are used within the two views V_VIEW1 and V_VIEW2, through context mapping.
View V_VIEW1 layout
View V_VIEW2 layout
When the user presses the Next button,we want to navigate from the view V_VIEW1 to the view V_VIEW2.The view V_VIEW1 will be replaced with the view V_VIEW2. This navigation is possible through a navigation link between the views, in the window.
Plugs and navigation
To set up navigation between our views, we must create an inbound plug for the view V_VIEW2 and an outbound plug for the V_VIEW1.In the Outbound Plug tab of the view V_VIEW1, we create an outbound plug named OP_TO_V_VIEW2.
Out bound plug
In the Inbound plug tab of the view V_VIEW2,we create an inbound plug named IP_V_VIEW2.
In bound plug
When the user presses the Next button,the Framework triggers the event handler method onactionnext.Every time we create an outbound plug for a view,a special method is added to its interface. This method has the statement FIRE_<NAME_OUTBOUND_PLUG>_PLG. To fire this method, we can use the Web Dynpro CodeWizard or select an outbound plug when creating an Action.
The event handler method has the following statement:METHOD onactionnext .
Creating an action
We use the self-reference WD_THIS of the view controller to fire the method FIRE_OP_TO_V_VIEW2_PLG that was added to this interface when we have created the outbound plug.
All the views within a window can be connected to each other by using navigation links.To be able to create the navigation,we embed the views in the window and then we drag & drop the outbound plug to the inbound plug. We can also create navigation by right-clicking on the output plug name.
Creating navigation link
At runtime, when the user interacts with the view V_VIEW1, his interaction will cause a request to the server.In response, the view V_VIEW1 will be replaced with the view V_VIEW2. This is possible through the navigation link defined between these views.
SAP ABAP Web Dynpro Related Tutorials
|SAP ABAP Tutorial|
SAP ABAP Web Dynpro Related Interview Questions
|SAP ABAP Interview Questions||SAP ABAP Web Dynpro Interview Questions|
|Sap Abap Hr Interview Questions||SAP ABAP Dictionary Interview Questions|
|SAP ABAP Enhancement Interview Questions||SAP ABAP Module Pool Interview Questions|
|SAP ABAP Report Developer Interview Questions||SAP ABAP Data Dictionary Interview Questions|
|SAP ABAP ALV Reports Interview Questions|
Sap Abap Web Dynpro Tutorial
Sap Easy Access
Designing A Web Dynpro Component
Context Nodes And Attributes At Design Time
Data Binding, Context Mapping And Interface Methods
View Controller Methods
Layout Ui Elements
User Interface Elements (ui Elements) Static And Dynamic Programming
Messages, Exceptions And Web Dynpro Abap
Writing Multilanguage Applications
Alv And Select Options
Integrating A Web Dynpro Application Into The Sap Netweaver Portal
Web Dynpro And Authorization
Web Dynpro Mind Map
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.