Download - Abap Web Dynpro2
-
7/30/2019 Abap Web Dynpro2
1/3
ABAP Web DynPro
TransactionSE80 (Web-Dynpro-Comp. / Intf.)
Web DynPro (WD) is the standard SAP standard UI (User Interfaces) technology to develop web applications.
Other definition for Web DynPro defines it as SAP Netweaver programming model for UI.
WD is a client-independent programming model.
It offers separation of layouts and logic and is based onModel-View-Controller(MVC) paradigm.
Modelinteracts with the backend system
Viewdefines frontend (screen elements)
Controllerlinks model and view
In classic MVC, a view gets updates directly from the model, i.e. without indirection via a controller, which is
not true for Web Dynpro.
Basic Concepts
We will consider a basic application for Employee details for explanation purpose.
View A view is a visible screen area and contains screen elements. E.g. a text field for entering Employee Name Controller Every view has a dedicated view controllerand every component has a component controller. View
controller performs event handling (described in event handler methods) based on actions triggered in a view.
E.g. adding Employee details on a click of a button.
Window A window contains one or more views. For a view to be displayed in the browser at runtime, it has to
be embedded in the window. Windows have inbound and outbound plugs and a window controller which is
global and visible to all controllers within a component.
Component A component contains all components like views, controllers, windows etc required to execute a
WD application and acts as an application entry point. Components interact with each other via component
interfaces.
Application Application is identified by a URL (Uniform Resource Locater) and is something
executable for the user. When the user invokes the URL, WD creates an instance of the applicationsroot component i.e. starting the root component and navigating to initial view which in turn isdisplayed in an initial window.
-
7/30/2019 Abap Web Dynpro2
2/3
Context It is repository of data and like a data container. Data used in views or component are stored in context.
Controllers These are active parts in Web DynPro component. Component Controller and Interface controller
are basically responsible for generating data which will be supplied to View Controller for display. Data that can
be accessed by controller are defined in corresponding context.
Component Controlleris the master of all controllers. A WD component cannot exist without a ComponentController. When a WD application is triggered through URL, the component controller of root component is
instantiated. It is visible to all other controllers within the component.
Life span of these controllers exists as long as the component is in use. More such additional global controllers
can be added in the form ofcustom controllers.
Interface Controlleris available within and outside components and is used to exchange data. Each WD
component can have only one interface controller.
View Controllerprocesses the action triggered by the user in view. A view has one view controller and one view
context that contains the data required in the view. Life span of view controller and view context is limited to
visibility of view in the browser.
Plugs They can be divided intoInbound plugs and Outbound plugs. Plugs are used for navigation betweendifferent views. To navigate from one view to the other, outbound plug of the calling view should be linked with
the inbound plug of the called view. When a view is entered via an inbound plug, it triggers the event handler
method and thus an event handler method is generated for every inbound plug.
Web dynpro View It is a central logical layout element in the Web Dynpro application of sap system. It is helping in the presentation logic
and for the browser layout.
Description of a visible screen area
Contains and lays out controls (aka widgets)
Defines actions (i.e. relevant input on controls by the user), which trigger event handling
2. Web dynpro Controller It is a active part of web dynpro application,handles the data flow between the model and the view in both directions:
Performs event handling
Each component has a component controller
Each view has a view controller
Custom controllers may be added for further structuring
3. Web dynpro Model It is the interface to the back end system and is responsible for providing data to the entire application. Represents the data in the back end
4. Web dynpro Component Reusable UI program package
Mostly contains views, often uses models
Communicates with other components via component interfaces
5. web dynpro Application
Something can be run (from client application, i.e. web browser) Identified by URL
-
7/30/2019 Abap Web Dynpro2
3/3
Running an application means starting a component, navigating to an initial view in an initial window.
6. Windows
Single UI unit representing a components user Interface/View Composition needed for embedding purposes.
7. Context
A controller contains a context which holds the data. The data flow between the contexts is referred to as context
mapping..