First create a veiw firstview in the component. (to get more information on view creation Click Here).
Once the view is created then make the view as configurable and add all the fields in structure to the screen. (for more info Click Here).
Once you made the view configurable then add the following code addition the the existing code.
<thtmlb:button id = “NextBtn”
design = “EMPHASIZED”
onClick = “NEXT”
text = “Next”
tooltip = “Second View” />
Now we added the button to the HTML. The other steps that we need to do is add a event as we mentioned in this HTML and add the inbound and outbound plug.
On now the event is created. SAP by default add EH_ON as prefix for the events. So the event method is called as EH_ONCLICK. See the following screen shot.
Now let us create inbound plug and outbound plug.
Inbound plug and outbound plug in a view is used to send the control to and from the view. For example if we want to nagvigate from first view to second view then we need to use the outbound plug of firstview to the inbound plug of the second view that way the navigation know where to go and what plug to use.
Let us create a inbound plug as fromsecondview and a outbound plug as tosecondview. Just right click and give the name that will create the inbound and outbound plugs. SAP by default put IP_ and OP_ inforunt of the name that you are defining for the plugs. See the following screen shots.