GUIDELINE 5.18
Selecting the User Interface Technology
ABAP_BACKGROUND
Various UI technologies can be used in the ABAP environment. We
distinguish between classic technologies, which are based on the SAP GUI
and are almost completely integrated into the ABAP language, and new
Web-based technologies, which display the UI in a Web browser and
are accessed through object-oriented interfaces in ABAP.
The classic SAP GUI technologies are:
Classic dynpros
A classic dynpro is a component of an ABAP program. It is created using
the Screen Painter in the ABAP Workbench and called using either a
transaction code or the CALL SCREEN statement. Every time a
dynpro is called, a dynpro sequence is started.
Selection Screens
A selection screen is a specific classic dynpro that is not created
manually in the Screen Painter. Instead, you define it using the
PARAMETERS , SELECT-OPTIONS , and SELECTION-SCREEN ABAP
statements. A selection screen is called either implicitly when
executable programs are started or explicitly using the CALL
SELECTION-SCREEN statement.
Classic Lists
Classic lists are used to output data in a structured and formatted
display. The formatted data is stored in a list buffer using specific
ABAP statements (such as WRITE , FORMAT ) and displayed on a
special system dynpro. Classic lists are called either automatically
(when an executable program is run) or with the LEAVE TO
LIST-PROCESSING statement.
The new Web-based technologies are:
Business Server Pages
Business Server Pages ( BSP ) are the counterpart to
JavaServer Pages (JSP). BSP s are HTML pages with content
that is partly dynamic. The dynamic content is generated by server-side
scripts that are written in ABAP. On the application server, this type
of script occurs as a generated ABAP Objects class. You create
Business Server Pages using the Web Application Builder of the ABAP
Workbench.
Web Dynpro ABAP
Web Dynpro ABAP is a technology for creating platform-independent,
Web-based interfaces. The architecture of Web Dynpro is based on the
Model View Controller approach (MVC) for
SoC . The three components of the
model view controller are the data model, which describes the
application, the presentation view, and the program controller for
responding to user actions. Web Dynpro applications are created using
the Web Dynpro Explorer in the ABAP Workbench and appear on the
application server by means of generated ABAP Objects classes.
ABAP_RULE
Use Web Dynpro ABAP
Use Web Dynpro ABAP whenever possible to create the UIs of new
application programs.
ABAP_DETAILS
Web Dynpro ABAP is SAP's standard UI technology for developing
modern Web applications in the ABAP environment. The MVC approach
automatically ensures a separation of presentation logic and application
logic, based on the SoC principle .
Compared to Web Dynpro, the BSP technology is much more
fundamental. An MVC approach for the SoC is supported, but developers
are still responsible for the implementation. BSP s can be
regarded as the predecessor technology of Web Dynpro ABAP. The use of
BSPs is now restricted to cases where a Web application is based on a
single HTML page, for which scripting is required and the
function cannot be implemented with Web Dynpro ABAP.
The classic SAP UI technology # classic dynpros based on the SAP GUI,
including selection screens and lists # is no longer sufficient for
modern and flexible business applications where the user interface must
be accessible in a portal, for example. The MVC approach is not
supported by frameworks or by any relevant tools.
Exception
The various UI technologies are not interoperable. In other words, it is
usually not possible to switch parts of an application based on
classical dynpros (including selection screens and classic lists) to Web
Dynpro ABAP. In addition, the commonly implemented dynpro programming
model was previously not very oriented toward SoC. This makes it
difficult or even impossible to implement a changeover for the purpose
of further development. Consequently, in exceptional cases, classic
dynpros and/or selection screens might be required if a new development
needs to be included in an existing framework. For these exceptional
cases, the following rules have been devised to ensure that these
obsolete UI technologies are handled using a more modern approach.
Note
In general, you can replace the UI technology of an application that is
strictly modeled on the separation of
concerns (see example below).
Note
Web Dynpro ABAP itself is not part of the ABAP language. Specific
guidelines regarding the use of Web Dynpro ABAP are not covered by these
programming guidelines, which mainly focus on using the ABAP language to
implement services.
Example
The transaction DEMO_CR_CAR_RENTAL
is called. Now two user interfaces can be selected for a car rental
example:
A UI based on classic dynpros and selection screens. However, according
to the above rule, using this UI technology in application
programs is no longer recommended.
A modern UI based on Web Dynpro ABAP
Since the sample application strictly separates all concerns, you can
use it with different UIs, without having to make adjustments to the
application and persistency logic. The SoC is therefore a critical
prerequisite for potential changeovers from classic dynpros to Web
Dynpro ABAP.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved