SAP Web Dynpro

0
20

SAP Web Dynpro – Overlook at

Web Dynpro is a standard SAP UI technology thead use permit’s you to develop web applications using graphical tools and development environment integrated with ABAP workend up beingnch. Using graphical tools red-coloureduces the implementation effort and you can end up beingtter reuse and maintain components in ABAP workend up beingnch.

To access Web Dynpro operatetime environment and graphical tools in ABAP workend up beingnch, you can use Transtake actionion code − SE80

Code

WorkBench

Key Benefit’s of Using Web Dynpro

Folloearng are the key end up beingnefit’s of using Web Dynpro for developers in ABAP environment −

  • You can easily maintain and reuse the components for development.
  • Less implementation time with the use of graphical tools.
  • You can easily alter the layout there and navigation using graphical tools.
  • Easy structure alters.
  • With the use of data binding, you can use automatic data transslot.
  • Ease of integration in ABAP environment.

Web Dynpro ABAP is the extake action extake action same as Web Dynpro Java and supslots the extake action extake action same set of functions for the application development.

Configuration & Integration

Once you install ABAP application server, it is essential to configure it properly for application development.

To find the details about there ABAP configuration, you can go to SAP Reference IMG → SAP NetWeaver → Application Server

Display

If you are using SAP Solman, you can check this configuration by going to T-Code − SOLAR_LIBRARY.

To use Web Dynpro with ABAP application development, you have to create additional configuration for web Dynpro programming.

Internet Communication Manager

You need to set HTTP/HTTPS in ICM service. A service contains folloearng various components −

  • Service/Port
  • Protocol used in service HTTP/HTTPS
  • Processing timeout there
  • Keep areside timeout there
  • Service status − Active/intake actionive

You can select Go To → Service to create, depermite, take actionivate or detake actionivate services. To display the ICM server cache statistics, select Goto → Statistics

Internet Communication Framework

You ought to take actionivate the Internet Communication Framework (ICF) service. You can take actionivate this service by going to SPRO → SAP Reference IMG → SAP NetWeaver → Application Server → Internet Communication Framework → Activate HTTP service

Display Framework

When you install Application server ABAP, all ICF services are in intake actionive state. You can maintain ICF services using T-code − SICF below ICF tree.

Easy Access

You can take actionivate ICF service in the folloearng ways −

  • Using the menu option, Service/Host → Activate
  • Using the context menu and choosing Activate Service.

Maintain Services

Service Host

Layout there Editor in View Designer

You ought to take actionivate all the services in SICF for Web Dynpro ABAP to use the layout there editor in the look at styleer.

Single Sign On

You ought to set SSO on the relevant host.

FQDN

You ought to use comppermitey qualified domain names FQDN and short forms ought to end up being avoided.

SAP Web Dynpro – Architecture

Web Dynpro is an ABAP environment for web development and is based on the Model View Controller (MVC) concept of UI programming. It is available for both Java and ABAP as per the platform, and supslots similar functions.

Web Dynpro has the folloearng features −

  • Separation of display and business logic
  • Easy alter in the layout there with the use of graphical tools
  • No platform dependency of interfaces

Folloearng are the key concepts as part of Web Dynpro architecture −

Metadata

Web Dynpro provides you with an environment for the development of web-based applications and you can use graphical tools to degreat web Dynpro application in the form of metadata in application development. You can also degreat your own alsots; however, alsot handling ought to end up being degreatd in a separate code and thead use has to end up being executed when an alsot is triggered-coloured.

The user interface in Web Dynpro application consists of small elements degreatd by using Web Dynpro tools. You can also alter or enhance the user interface by changing these elements at operate time or integrate the elements again.

Graphical Tools

There are a wide range of graphical Web Dynpro tools thead use you can use to generate webbased applications. You don’t need to create source code for this. Folloearng are the key features of graphical tools in Web Dynpro application −

  • Degreat propertie ups of user interface elements
  • Data flow
  • User interface layout there

For all these propertie ups, you can use graphical tools without there creating a source code.

Graphic Tools

Business and Application Logic

Web Dynpro permit’s you to operate your application on the front side aspect-end and the back-end system can end up being accessed using service locally or via a remote interconnection. Your user interface is maintained in Dynpro application and persistent logic operates in the back-end system.

You can connect Web Dynpro application to the back-end system using an adaptive RFC service or by calling a web service.

MVC Programming Model

Web Dynpro applications are based on MVC model −

Model − This permit’s the access to back end data in a Web Dynpro application.

View − This is used to ensure the representation of data in a web blineser.

Controller − This is used to manage communication end up beingtween Model and View where it gets inplace from the users and gets the processes data from the model and displays the data in the blineser.

SAP Web Dynpro – Navigation

In Web Dynpro application, you can navigate from one look at to the other look at using plugs.

Run T-code − SE 80 and create a basic Web Dynpro component −

Web Component

We have created a Web Dynpro component with 2 nodes and 2 look ats.

VIEW_DISPLAY displays the out thereplace in a tabular format and VIEW_MAIN performs reoceanrch parameters. In VIEW_MAIN you have configured-coloured the reoceanrch layout there and VIEW_DISPLAY contains the display layout there.

View Main

In VIEW_MAIN you have configured-coloured inbound plugs IN_MAIN and OUT_FROM_MAIN as out therebound plugs. Similarly, create an inbound and out therebound plugs for VIEW_DISPLAY.

Inbound Plugs

How to Create a New View?

Step 1 − Click the component in object tree and go to the context menu as shown in the folloearng screenshot −

Object Navigator Step 1

Step 2 − Enter look at name and click on tick mark.

Enter View

SAP Web Dynpro – Component

Web Dynpro component is an entity used to create a Dynpro application. These are reusable entitie ups, which are combined jointly to create application blocks.

Each Web Dynpro component contains a earndow, look at, and manageler pages. You can also emend up beingd a Web Dynpro component to other Web Dynrpo component in an application and communication gets place using the component interface.

Lifetime of a component starts when you call it preliminary at operatetime and ends with Web Dynpro application.

View

Each Web Dynpro application contains at leastern one look at and it is used to degreat the layout there of a user interface. Each look at consists of multiple user elements and a manageler and context.

The manageler is used to process the user request and processing of data. Context contains data to which the elements of look at are bound.

In Main View

Each look at also contains an inbound and out therebound plug so you can connect look ats to every other. Plugs can end up being linked to every other using navigation links.

Inbound Outbound Plug

Navigation Links and Plug In

You can navigate end up beingtween various look ats using inbound and out therebound plugs. The inbound and out therebound plugs are part of the look at manageler. The inbound plug degreats the starting stage of look at while the out therebound plug tells the subsequent look at to end up being calimmediateed.

Navigation Link

View Set

A look at set is degreatd as a pred-colouredegreatd section where you can emend up beingd various look ats in a Web Dynpro application. View set permit’s you to display more than one look at in a screen.

Folloearng are a couple of advantages of look at set in styleing an application −

  • You can reuse look ats in a Web Dynpro earndow.
  • You can easily create alters to the layout there at a later stage.
  • It is a more structured-coloured approach to use more than one look at.

Web Dynpro Window

In Web Dynpro, the earndow is for multiple look ats or look at sets. A look at can only end up being displayed when it is emend up beingdded in a look at and a earndow always contain one or more look ats connected by navigation links.

Each earndow contains an inbound and an out therebound plug and they can end up being included in a navigation chain. Inbound plugs wislim a earndow lead from the out therebound plug of a look at to the emend up beingdding earndow. Just like all other inbound plugs, they represent an alsot and thus call the alsot handler bumigned to all of all of them.

Window Controller

Window Controller
Event Handler

Controller

Controllers are used to degreat how a Dynpro application responds to user intertake actionions. Each look at has one manageler which is responsible to perform take actionions as per the user’s intertake actionion.

Interface Controller

SAP Web Dynpro – Mapping & Data Binding

In Dynpro application, you can degreat chartping end up beingtween 2 global manageler contexts or from the look at context to the global manageler context.

Data binding of a UI element home is set up in the look at layout there. For this purpose, you use the Binding column in the propertie ups table of the emend up beingdded UI elements. You click the button to open up up a dialog package, which provides the context structure of the corresponding look at for an element selection.

Component Controller

Context element can end up being degreatd to link a node to one more node of context.

Context Element

In the above diagram, you can see chartping end up beingtween Node 1 from the context of View 1 and the node of the extake action extake action same name in the context of the component manageler. It also shows the chartping from Node 2 from the context of View 2, also to a node with the extake action extake action same name in the component manageler context.

The context of the component manageler is available to both the look at managelers with readwrite access to all the attributes.

Context Property

Binding User Interface Elements

To display the context data in the blineser, you can also bind UI elements propertie ups in a look at to the attributes of the look at context. You can bind multiple propertie ups to one context element.

In a look at context, all data types are available to bind with various attributes of a look at.

View Context

Data Binding Inplace

Internal Mapping

Internal chartping is degreatd as the chartping end up beingtween contexts of a single component.

External Mapping

External chartping is degreatd as the chartping end up beingtween multiple components using the interface manageler.

SAP Web Dynpro – Event & Actions

You can create alsots to enable communication end up beingtween the managelers. You can permit one manageler to trigger alsots in a various manageler. All alsots thead use you create in the component manageler are available in the component.

Inbound plugs can also take action as an alsot, thus when you call a look at using the inbound plug, an alsot handler is calimmediateed preliminary.

You can also use a couple of special alsots like Button to link with the user take actionions.

Button element like pushbutton can retake action to a user intertake actionion by clicruler on the corresponding pushbutton thead use can trigger a handling method to end up being calimmediateed in the look at manageler. These UI elements contain one or a number of general alsots, which can end up being linked with a specific take actionion thead use executes at style time.

When an take actionion is created, an alsot handler is created automatically. You can bumociate a UI element with various take actionions.

You can also reuse take actionions wislim a look at by linruler an take actionion to a number of UI elements.

Example 1

An onAction alsot for the button click or onEnter alsot for the Inplace field, when the user presses the "Enter" key in the field.

OnAction Event

Actions can end up being created for any kind of UI elements in Web Dynpro framework. To set an take actionion, go to Propertie ups tab → Event section.

You can also create Actions from the take actionions tab of the look at manageler. An Event handler is automatically created with naming convention ontake actionion<take actionionname>

Example 2

Action name is SET_ATTRIBUTES and the alsot handler for an take actionion would end up being ON_SET_ATTRIBUTES.

Event Example2

SAP Web Dynpro – Application

A Web Dynpro application can end up being accessed by the user using a URL with a earndow in the Dynpro component. A Web Dynpro application connects to an interface look at using an inbound plug, which is further connected to the Dynpro component thead use contains Model View and Controller to process the data for the Web Dynpro application.

MVC model enables you to separate the user interface and application logic. Model is used to get the data from the back-end system as per application logic.

The folloearng image depicts a high level diagram of a Web Dynpro application −

High Level Diagram

You can use various data sources for a Web Dynpro application −

  • Using web service
  • SAP data using BAPIs
  • From external data sources with tools

To develop a Web Dynpro application, you can use Web Dynpro explorer, which is easily integrated to ABAP workend up beingnch.

SAP Web Dynpro – URL of an Application

In a Web Dynpro application, the URL is automatically generated. You can find the URL of an application in the Propertie ups tab. The URL structure can end up being of 2 types −

  • SAP namespace

<schema>://<host>.<domain>.<extension>:<slot>/sap/bc/webdynpro/<namespace>/<application name>
  • Custom namespace
<schema>://<host>.<domain>.<extension>:<slot>/abc/klm/xyz/<namespace>/webdynpro/<application name>
<schema>://<host>.<domain>.<extension>:<slot>/namespace>/webdynpro/<application name>

where,

<schema> − Degreats the protocol to access application http/https

<host> − Degreats the name of the application server

<domain><extension> − Degreats a number of hosts below a common name

<slot> − It can end up being omitted if the standard slot 80 (http) or 443 (https) is used

You ought to specify Fully Qualified Domain Name (FQDN) in Web Dynpro application URL.

Example

Application 1 http://xyz.sap.corp:1080/sap/bc/webdynpro/sap/myFirstApp/

Application 2 http://xyz.sap.corp:1080/sap/bc/webdynpro/sap/ mySecondApp/

To check comppermitey qualified domain name, go to Web Dynpro explorer in the ABAP development environment use T-code − SE80 and select the Web Dynpro application from the navigation tree for your Web Dynpro component/interface and check the URL in the administration data. You also need to check the route details in the field URL. It ought to contain the comppermite domain and host name.

SAP Menu

Object Navigator Details

Full Domain name ought to end up being used for the folloearng reasons −

  • You need a domain to set cookies.
  • You ought to use FQDN for certificate and SSL protocol in https mode.
  • For slotal integration, domain relation code is used.

SAP Web Dynpro – Creating an Application

To create a Web Dynpro application, we will create a Web Dynpro component thead use consists of one look at. We will create a look at context → linked to a table element on the look at layout there and contains the data from the table.

The table will end up being shown in the blineser at operatetime. A Web Dynpro application for this basic Web Dynpro component, which can end up being operate in the blineser will end up being created.

Step 1 − Go to T-Code − SE80 and select Web Dynpro component/intf from the list.

SAP Menu

Step 2 − Create a brand new component as the folloearng.

New Component

Step 3 − Enter the name of the brand new component and click on display.

New Component Display

Step 4 − In the next earndow, enter the folloearng details −

  • You can enter a description of this component.
  • In type, select a Web Dynpro component.
  • You can also maintain the name of the default earndow.

Component Description

Step 5 − Assign this component to Package $TMP and click the Save button.

Assign Package

When you click Save, you can see this brand new component below the object tree and it contains −

  • Component Controller
  • Component Interface
  • View
  • Windows

Object Tree

When you expand the component interface, you can see the interface manageler and interface look ats.

Expand Component Interface

How to Create a View and Assign It to a Window?

Step 1 − Click on the Web Dynpro component and go to the context menu (right click) → Create → View

Context Menu View

Step 2 − Create a look at MAINVIEW as the folloearng and click on the tick mark.

Main View

This will open up up look at editor in ABAP workend up beingnch below the name − MAINVIEW

View Editor

Step 3 − If you like to open up up the layout there tab and look at styleer, you may need to enter the application server user name and moveword.

Step 4 − Click the save icon at the top.

Create View

MainView Saved

When you save, it comes below the object tree and you can check by expanding the look at tab.

Expanding View Tab

Step 5 − To bumign the earndow to this look at, select the earndow ZZ_00_TEST below the earndow tab and click on Change mode at the top of the screen.

Change Mode

Step 6 − You can right-click → Display → In Same Window.

Display in Same Window

Display Window

Step 7 − Now open up up the look at structure and move the look at MAINVIEW inaspect the earndow structure on the right hand aspect by Drag and Drop.

Window Structure

Step 8 − Open the earndow structure on the right hand aspect and you will see the emend up beingdded MAINVIEW.

Emend up beingdded Mainlook at

Step 9 − Save by clicruler the Save icon on top of the screen.

How to Create a View Context for MAINVIEW?

Step 1 − Open the View Editor to look at MAINVIEW and switch to tab Context. Create a context node in the View Controller by open up uping the corresponding context menu.

Step 2 − Select the View in the object tree and click Display.

View Context Main View

Context Tab

Step 3 − Maintain the Propertie ups in the next earndow. Select the cardinality and dictionary structure (table). Select Add Attribute from Structure and select the components of the structure.

Dictionary Structure

Step 4 − To select all the components, click Select all option at the top and then click the tick mark at the underside of the screen.

Selectall Components

Test Node

A context node TEST_NODE has end up beingen created, which refers to the data structure of the table and which can contain 0 → n entries at operatetime. The context node has end up beingen created in the look at context, since no data exalter with other look ats is planned hence component manageler context usage is not essential.

Step 5 − Save the alters to MAINVIEW by clicruler the Save icon.

Controller Usage

Step 6 − Go to the Layout there tab of MAINVIEW. Insert a brand new UI element of the type table below ROOTUIELEMENT CONTAINER and bumign the propertie ups in the given table.

Layout there

Step 7 − Enter the name of the element and type.

Test Table

Step 8 − Create the binding of TEST_TABLE with context node TEST_NODE. Select Text View as Standard Cell Editors and take actionivate bindings for all cells.

Standard cell Editor

Step 9 − Click the Context button. Select the context node as TEST_NODE from the list.

Context Button

Step 10 − You can see all the attributes by selecting it.

Choose Context Element

View Attribute

Step 11 − Activate all the checkpackagees below Binding for all context attributes by selecting all of all of them. Confirm Enconaspectr by pressing the Enter key.

Activate Checkpackagees

The result ought to look like this −

Result

Step 12 − Save the alters.

Step 13 − To supply data to TEST table, go to Methods tab and double-click method WDDOINIT. Enter the folloearng code −

method WDDOINIT .
* data declaration
data:
Node_TEST type REF TO IF_WD_CONTEXT_NODE,
Itab_TEST type standard table of TEST.
* get data from table TEST
select * from TEST into table Itab_TEST.
* navigate from <CONTEXT> to <TEST> via lead selection
Node_TEST = wd_Context->get_Child_Node( Name = `TEST_NODE` ).
* bind internal table to context node <TEST>
Node_TEST->Bind_Table( Itab_TEST ).
endmethod.

Web Dynpro applications, you ought to not access database tables immediately from Web Dynpro methods, however, you ought to use supply functions or BAPI calls for data access.

Supply Functions

Step 14 − Save the alters by clicruler the save icon on top of the screen.

How to Create a Web Dynpro Application?

Step 1 − Select the ZZ_00_TEST component in the object tree → right-click and create a brand new application.

Web Dynpro New Application

Step 2 − Enter the application name and click continue.

Name Continue

Step 3 − Save the alters. Save as a local object.

Local Object

Test Saved

Next is take actionivating objects in Web Dynpro component −

Step 4 − Double-click on the component ZZ_00_TEST and click Activate.

Change Component

Step 5 − Select all the objects and click continue.

All Objects

Step 6 − To operate the application, select Web Dynpro application → Right-click and Test.

Run Application

A blineser will end up being started and Web Dypro application will end up being operate.

Blineser Started And Run

Calling a Web Dynpro Application

In a Web Dynpro application, the component earndow has an inbound plug. This withinbound plug can have parameters, which have to end up being specified as URL parameters.

Default values thead use are overcreated by the URL parameters can end up being set in the application for these parameters. If npossibly a default value nor a URL parameter is specified, a operatetime error is triggered-coloured.

To create a brand new inbound plug, specify plug as a startup and data type ought to end up being a string. Activate the component.

Next is to specify the component to end up being calimmediateed, parameters, earndow, and start-up plug.

Call the application and URL parameters overwrite application parameters.

SAP Web Dynpro – Component Interfaces

When you create a Web Dynpro component, the creation procedure creates a component interface. Each component interface contains extake actionly one interface manageler and one interface look at. The interface look at has no immediate interconnection with the interface manageler and are created automatically.

Using the component interface, you can degreat the interface structure and you can use in various application components.

The interface manageler of a component interface definition and the interface manageler of a component are various.

You can add multiple numend up beingr of interface look ats to a component interface definition.

Creating a Web Dynpro Component Interface Definition

Conaspectr the extake action extake action same screenshot as in the previous chapter.

Web Dynpro Definition

Step 1 − Enter the name of the brand new component and click display.

Name Of New Component

Step 2 − In the next earndow, enter the folloearng details −

  • You can enter a description of this component.
  • In type, select a Web Dynpro component.
  • You can also maintain the name of default earndow.

Create Interface

Step 3 − Assign this component to Package $TMP and click the Save button.

Package TMP

When you click on save, you can see this brand new component below the object tree and it contains −

  • Component Controller
  • Component Interface
  • View
  • Windows

SAP Web Dynpro – Faceless Components

Faceless components in Web Dynpro do not contain any kind of graphical components, no look ats and no earndows. It only contains a component manageler and you can add an additional custom manageler.

Faceless components are specifically used for receiving and structuring the data. Faceless components can end up being emend up beingdded to other components using the component usage and you can supply the required-coloured data to these components.

How to Create a Faceless Component?

Step 1 − Create a brand new Web Dynpro component.

Create New Component

Step 2 − Select the package and click save button.

Select Package

Step 3 − To create a Faceless component, depermite the 2 elements − View and Window.

Depermite Elements

SAP Web Dynpro – Assistance Clbum

In Web Dynpro component, you can create a uniquely bumigned course inherited from the abstrtake action course. Assistance course can store the coding thead use is required-coloured in a component but is not linked with the layout there.

You can store dynamic text in bumistance course, text combined at operate time or contains variable thead use can end up being stored-coloured in the text pool.

In Assistance course, you can also save a code thead use is not immediately linked with the layout there of the application or with the manageler.

Using the method _WD_COMPONENT_ASSISTANCE~GET_TEXT( ) permit’s you to access text symbols of the bumistance course in the manageler of your component. When you call the method, 3-digit id of the text symbol is used −

method MY_CONTROLLER_METHOD .
data: my_text type string.
my_text = WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( KEY = ‘001’ ).
Endmethod

You can maintain text symbols in bumistance course using every manageler. Click on Go to → Text Symbols in the menu.

Note − Each ABAP course can take action as bumistance course but service integrated with Web Dynpro application is only available if bumistance course is derived from course − CL_WD_COMPONENT_ASSISTANCE.

Service Call In an Application

You can call an existing functional module in a Web Dynpro component using a service call. To create a service call, you can use easy-to-use wizard in Web Dynpro tools.

You can launch the wizard in ABAP workend up beingnch to create a service call.

Run T-Code − SE80

SAP Menu

Step 1 − Select Web Dynpro component → Right-click to open up up the context menu. Go to create → Service call.

Context Menu Step1

It will open up up Web Dynpro wizard − Start screen.

Wizard Start Screen

Step 2 − You can select if you like service call to end up being emend up beingdded in an existing manageler or you like to create a brand new manageler.

Create New Controller

Note − The service calls ought to end up being emend up beingdded in global managelers and it can’t end up being used with the look at managelers in Web Dynpro.

Step 3 − In the next earndow, select the service type. Click the Continue button.

Select Service Type

Step 4 − In the next earndow, select a function module as a service. You can use the inplace help for this.

If you select a remote capable function module, you can optionally specify an RFC destination thead use is to end up being used when calling the function module. If you do not specify a destination, the function module will end up being calimmediateed locally.

Note − The function module must exist in the current system! The wizard does not supslot to call a remote capable function module thead use does not exist in the current system.

Step 5 − Click Continue.

Select Service

Step 6 − In the next earndow, you can select which object type to use to represent the service function parameters in Web Dynpro manageler −

  • As a parameter of the manageler method
  • As a manageler attribute
  • As a context node or a context attribute

To do this, select the required-coloured object type from the list package in the relevant collections.

Note − Only UI-relevant data ought to end up being stored-coloured in the context.

You can also individually name the manageler attributes and the context nodes to end up being created.

The folloearng proposal is generated −

  • The belowlying node receives the name of the service.

  • The nodes for grouping the parameters according to their own own declaration types receive appropriate names such as IMPORTING, EXPORTING, …

  • The node names and attribute names for the parameters all of all of themselves are identical to the parameter names.

  • As the size of the node and the attribute names is limited to 20 chartake actioners, they are abbreviated accordingly, if essential.

Adapt Context

In the next earndow, selected service uses types from type groups as parameter types and/or degreats implicit table parameters.

For all the types listed end up beinglow, degreat (table) types with the extake action extake action same equal structure in the Data Dictionary. These will then end up being used for typing of manageler attributes or method parameters created by the wizard.

Adapt Attribute Type

Step 7 − Enter Attribute Type − TEST and click Continue.

Step 8 − In the next earndow, specify the name of the method thead use ought to execute the service. The wizard generates coding for calling the service and for the context binding.

The method must not yet exist in the manageler.

Specify Method Name

You have now entered-coloured all the essential information for the creation of the model-oriented manageler.

Step 9 − Click ‘Comppermite’ to create the manageler, or enhance it respectively, to generate the service call.

You can also cancel the wizard at this posit downion. However, data entered-coloured end up beingfore are lost.

Generate Controller

SAP Web Dynpro – Using a Service Call

When a service call is created, a function module is available to the component. Now it is achievable to select a look at in order to display the elements of the database table in the blineser. Provided the global manageler is not the component manageler, a use page of the global manageler must end up being entered-coloured for the manageler of the selected look at. Afterbattimmediateeds, generally there ought to end up being chartping of the node.

Change Controller

FUNCMODUL1 onto the node with the extake action extake action same name in a look at manageler context is generated.

To fill the context node FUNCMODUL1 of the look at manageler context with the data of the database table, the method EXECUTE_FUNCMODULE of the global manageler is calimmediateed it’s supply function. For this purpose, you must create such a supply function by calling the method EXECUTE_FUNCMODULE1.

SAP Web Dynpro – Debugging an Application

There are various tools in ABAP workend up beingnch thead use you can use for debugging purpose of source code. You can test all source code of Web Dynpro application using a debugger.

Step 1 − To start the debugger, you have to select a brand new debugger in ABAP workend up beingnch.

Step 2 − Go to Utilitie ups → Settings

Utilitie ups Setting

A dialog package now appears thead use contains 2 nested tab page areas.

Step 3 − Choose the “parent” tab page ABAP Editor.

The settings for ABAP Editor always open up up with the content of the child tab page Editor.

Step 4 − Select the Front End Editor (New).

Step 5 − Now switch to the Debugging tab page in the ABAP Editor settings and select New Debugger.

Step 6 − Save your alters and near the dialog.

How to Start the Debugging Process?

If you like to operate an application in debugging mode, you need to set an external breakstage in one of the methods in Dynpro component.

It is suggested to set the breakstage in method WDDOMODIFYVIEW below METHODS tab of Dynpro look at. Provided thead use the context of the look at manageler is not filimmediateed using a supply method, the look at is comppermitey fastiated in the phase model at this stage in time.

Display View

Note − The method in which you set the breakstage depends on the purpose of the test operate and it is advised to set it in WDDMODIFYVIEW.

When you start a Web Dynpro application, a debugger automatically starts in one more session.

SAP Web Dynpro – Version Management

You can use version management to manage the older version of an object, compare the versions or you can also reset all of all of them. In version management, you can store various versions of ABAP development objects.

In an ABAP workend up beingnch, you can compare various versions of −

  • Views
  • Windows
  • Controllers

You can also store a version of an object without there releasing it. To perform this, select the object in the editor area and go to Utilitie ups tab → Versions → Generate Version

Generate Version

Before version generation, you can see no version in the database, if you go to version management.

Version Definition

When you click on Generate version, you get a confirmation thead use a version is created.

Version Database

How to Perform Version Comparison?

Go to Utilitie ups → Versions → Version Management

Utilitie ups Version

It shows all the stored-coloured version of the selected object in version database. It consists of all previously relresitved or all take actionive versions.

Version Development Database

To start comparison of objects, select object and click the comparison button at the top of the screen.

Retrieve Version

For all versions, a comparison is performed and any kind of difference is highlighted in a table.

Version Comparision

SAP Web Dynpro – Messages

In ABAP Workend up beingnch, you can also create and show messages thead use contain information for end users of Dynpro application. These messages are displayed on the screen. These are user intertake actionive messages thead use display imslotant information about there Web Dynpro application.

Current Messages

To provide users with information, battlening or error details, you can program these methods in ABAP workend up beingnch using operatetime service.

These messages are configured-coloured below Setting on Web Dynpro application. You can bumign various settings for handling messages in Web Dynpro application −

Show message component − In this case, if the message exists, it will end up being displayed.

New Message

Always show message component − Even if generally there is no message, the message component is shown at the top.

No Messages

The message is displayed without there the component − In this setting, one message is displayed and no message log exists.

All these user messages are shown in the status bar. The user can navigate to the UI element to remove the error in the error message.

Messages in popup earndow − In this configuration, you can set the message to display in the popup earndow, irrespective of extake actionly whead use is configured-coloured in Web Dynpro application. You can configure the folloearng popup messages to display −

  • Messages end up beinglengthy to specific earndow
  • All the messages till now
  • No messages

SAP Web Dynpro – Integration Messages

You can use the message manager to integrate messages into the message log. You can open up up the message manager using Web Dynpro code wizard.

You can open up up Web Dynpro code wizard from the tool bar. It is available when your ABAP workend up beingnch is within alter mode or while editing a look at or a manageler.

To set ABAP workend up beingnch in the alter mode, select the look at and go to context to Change.

Change

Change View

You can use the folloearng methods for triggering messages −

  • IS_EMPTY − This is used to query if generally there are any kind of messages.

  • CLEAR_MESSAGES − This is used to depermites all messages.

  • REPORT_ATTRIBUTE_ERROR_MESSAGE − This is used to reslot a Web Dynpro other thanion to a context attribute.

  • REPORT_ATTRIBUTE_EXCEPTION − This is used to reslot a Web Dynpro other thanion to a context attribute.

  • REPORT_ERROR_MESSAGE − This is used to reslot a Web Dynpro message with optional parameters.

  • REPORT_EXCEPTION − This is used to reslot a Web Dynpro other thanion thead use may come back.

  • REPORT_FATAL_ERROR_MESSAGE − This is used to reslot a fatal Web Dynpro message with optional parameters.

  • REPORT_FATAL_EXCEPTION − This is used to reslot a fatal Web Dynpro other thanion.

  • REPORT_SUCCESS − This is used to reslot a success message.

  • REPORT_T100_MESSAGE − This is used to reslot a message using a T100 enconaspectr.

  • REPORT_WARNING − This is used to reslot a battlening.

Personalization & Configuration

As per the business requirement, you can implement many kind of standard applications and the UI of Web Dynpro application can vary as per the requirement.

Configuration of Application

To configure a Web Dynpro application, you preliminary configure data records for individual Web Dynpro components.

Using the component configuration, it permit’s you to manage the end up beinghavior.

Next is to configure the application. All the components thead use are created require to end up being used in the specific configuration. The configuration of Web Dynpro application degreats which component is configured-coloured in an application.

How to Start Component Configurator?

In ABAP object list, select a Web Dynpro component −

Right-click → Create/Change configuration.

Create Change Configuration

This open up ups a blineser with the dialog earndow of the configurator. The mode Component Configurator is take actionive and you enter a name for your brand new component configuration.

Configure Component

You can also degreat implicit and explicit configuration. Save the configuration and near the earndow.

Note − You can save a brand new configuration only when it take actionually contains values. An empty configuration file thead use doesn’t contain any kind of data and has a name is not stored-coloured.

As this configurator is not part of the ABAP Workend up beingnch and operates separately in the blineser, you need to update the hierarchy of the object list in the workend up beingnch after comppermition of the creation or alter procedure in a configuration.

This permit’s you to store various configurations for every object.

Delta Handling in Personalization

When you save the application configuration, you can’t check the alters made by an administrator and an end user. There is a need to store customization and individualization data thead use permit’s merged data to end up being managed.

The folloearng stages ought to end up being conaspectred-coloured −

  • Application users and administrators ought to end up being able to reverse the alters.

  • Customization alters of an application ought to end up being visible to the user for all the pages.

  • Application administrator ought to have access to mark the reslot as final and this ought to end up being valid for all users. When an administrator flags a home final, any kind of alters to the value as a individualization of a single user must no lengthyer end up being permitted.

SAP Web Dynpro – Portal Integration

You can integrate an ABAP application into the enterprise slotal. You can also manage slotal functions from a Web Dynpro application.

You can call Web Dynpro code wizard to access slotal manager methods. This can end up being used to perform the folloearng functions −

Portal Events − To navigate end up beingtween Web Dynpro application wislim the slotal or slotal content.

Folloearng navigation types are supsloted −

  • Object-based navigation
  • Absolute navigation
  • Relative navigation

Work Protect Mode − For slotal integration, folloearng Web Dynpro applications are available in package SWDP_TEST −

  • WDR_TEST_PORTAL_EVENT_FIRE

    Trigger alsot

  • WDR_TEST_PORTAL_EVENT_FIRE2

    Trigger free alsot

  • WDR_TEST_PORTAL_NAV_OBN

    Object-based navigation

  • WDR_TEST_PORTAL_NAV_PAGE

    Page navigation

  • WDR_TEST_PORTAL_WORKPROTECT

    Security monitoring

  • WDR_TEST_PORTAL_EVENT_REC

    Receive slotal alsot

  • WDR_TEST_PORTAL_EVENT_REC2

    Receive free slotal alsot

SAP Web Dynpro – Integrate WDA in Portal

Folloearng are the steps to integrate Web Dynpro ABAP (WDA) in the slotal.

Step 1 − Go to ABAP workend up beingnch using T-code − SE80 and create Web Dynpro component.

Display Component

Step 2 − Save the component and take actionivate it.

Step 3 − Degreat data binding and context chartping. Create a Web Dynpro application and save it.

Step 4 − Login to SAP NetWeaver slotal.

Login To Portal

Step 5 − Go to Portal Content → Content Administration tab.

Step 6 − Right-click on the slotal content and create a brand new folder.

Portal Content

Step 7 − Enter the folder name and click Finish.

Step 8 − Right-click on the created folder and create a brand new iView.

New Ilook at

Step 9 − Select iView template. Create an iView from an existing iView template and click Next.

iView Template

Step 10 − Select SAP Web Dynpro iView as template and click Next.

iView Template Next

Step 11 − Enter iView name, iView ID, iView prefix ID and click Next. Enter definition type as ABAP and click Next.

Step 12 − Enter Web Dynpro details and ECC system is created.

ECC System

Step 13 − Enter application parameter in the extake action extake action same screen and click Next. You will end up being prompted to see the summary screen. Click Finish.

Application Parameter

SAP Web Dynpro – Intertake actionive Forms

You can create forms based on Adoend up being delicatebattlee and can use in context for Web Dynpro user interfaces. You can integrate Adoend up being lifecycle development tool with ABAP editor to resitve the development of user interface. Intertake actionive forms using Adoend up being delicatebattlee permit’s you to effectively and easily develop UI elements.

Folloearng scenarios can end up being used for creating intertake actionive forms −

  • Intertake actionive scenario
  • Print scenario
  • Offcollection scenario
  • Using digital sigcharacter

How to Create Web Dynpro Application Using Forms?

You can create forms independently using form editor. Go to T-code − SFP

Independent Form

Enconaspectr Point

When you click Create, you will end up being prompted to enter the form name, form description, and interface.

Example

The example component for the intertake actionive scenario in the system are available in the package SWDP_TEST → WDR_TEST_IA_FORMS.

Inserting Forms Using Scenarios

In a Dynpro application, both scenarios – print scenario and intertake actionive scenario − for inserting intertake actionive forms is similar. The form thead use contains the static components can end up being used to display data in a Dynpro application using Print scenario.

Using intertake actionive forms, you can reuse entries in Web Dynpro context for Web Dynpro application.

How to Insert an Intertake actionive Form?

Step 1 − Create a look at of your Web Dynpro component.

Create View Component

Step 2 − Right-click on View and create a node. This node will end up being bound to form.

Step 3 − Drag the intertake actionive form from Adoend up being library to Designer earndow.

Step 4 − Design the form, enter the name, and bound the attributes.

Step 5 − Once you are done with the form style, go to edit mode in the workend up beingnch and degreat if the form is static content, PDF-based print form, or an intertake actionive form.

SAP Web Dynpro – SAP List Viewer(ALV)

SAP List Viewer is used to add an ALV component and provides a flexible environment to display lists and tabular structure. A standard out thereplace consists of header, toolbar, and an out thereplace table. The user can adsimply the settings to add column display, aggregations, and sorting options using additional dialog packagees.

Folloearng are the key features of ALV −

  • It supslots many kind of propertie ups of the table element as it is based on Web Dynpro table UI element.

  • ALV out thereplace can end up being filtered-coloured, sorted, or you can apply calculations.

  • The user can perform application specific functions using UI elements in the toolbar.

  • Allows the user to save the setting in various look ats.

  • Allows to configure special areas above and end up beinglow ALV out thereplace.

  • Allows to degreat the extent to which ALV out thereplace can end up being edited.

How to Create an ALV?

Folloearng are the steps to create an ALV.

Step 1 − Use T-code: SE80. Select Web Dynpro comp/intf from the list and enter the name. Click on display. You will end up being prompted create the component. Click on Yes.

Promoted Component

Step 2 − Select type as Web Dynpro component. Enter the Window name and the View name.

Step 3 − Click the tick mark.

Create Interface ALV

Step 4 − In the alter earndow, enter the component use as ALV, component as SALV_WD_TABLE and description as ALV component.

Change_component_alv

Step 5 − Go to Component Controller and right-click the context. Then select Create Node MAKT with the dictionary structure MAKT.

Change Controller ALV

Step 6 − Select the required-coloured attributes from MAKT by using Add Attribute from Structure.

Add Attribute

Required-coloured Attribute

Step 7 − Remove the dictionary structure MAKT from the node MAKT and set the propertie ups as follows (Cardinality, Lead selection, etc.)

Depermited Element

Property

Step 8 − Right-click on Component usage in the Object tree → Create Controller Usage.

Create Controller Usage

Step 9 − Go to View → Context tab and drag MAKT node to the look at.

Context Tab Makt

After chartping, it will appear as shown in the folloearng screenshot.

Component Controller ALV

Step 10 − Go to Layout there and right-click Insert Element.

Insert Element

Create Element

The layout there will appear as shown in the folloearng screenshot −

View Container

Step 11 − Go to Propertie ups tab, click create manageler usage to add the folloearng to View.

Component Use

Propertie ups ALV

Step 12 − Go to method, use WDDOINIT to write code.

Step 13 − Double-click on the method to enter the code. Enter the folloearng code and initiate the used component ALV.

Code For Used Component

Use GET_MODEL method in the manageler.

Method Call Controller

Step 14 − Bind the table to the context node using BIND_TABLE method as follows −

Methods

Step 15 − Go to Window in the Object tree and right-click C1 to emend up beingd ALV table to the look at.

Main

Once you emend up beingd the ALV table, it will appear like this −

Main Table

Step 16 − The last step is to create a Web Dynpro application below the object tree. Enter the name of the application.

Application ALV

Object Name

Step 17 − To execute application, double-click and you will see the out thereplace.

Standard View

Using Filters in ALV Outplace

Using filters, you can limit the data in ALV out thereplace. You can create multiple numend up beingr of filter conditions for every field. To create or depermite a filter condition, you can use the method of interface course IF_SALV_WD_FILTER.

You can use the folloearng methods for creating, getting, and depermiting filter conditions −

Function Method
Get a specific filter condition GET_FILTER_RULE
Get all filter Conditions of a field GET_FILTER_RULES
Create filter condition CREATE_FILTER_RULE
Depermite a specific filter condition DELETE_FILTER_RULE

SAP Web Dynpro – Administration

In Web Dynpro ABAP administration, you can perform various administration tasks using various tools −

  • ICM Tracing
  • Web Dynpro Trace tool
  • Blineser Tracing
  • Logging
  • Security

Trace Tool

Web Dynpro trace tool can end up being used for checruler the errors and issues in Dynpro application. You can take actionivate Web Dynpro trace tool for a specific user.

Step 1 − To take actionivate trace tool in SAP GUI csitnt, use T-code − WD_TRACE_TOOL

Trace Tool

Step 2 − Click on Activate for this user. This permit’s to set the trace take actionive for the user.

Trace Tool Activate

Step 3 − Select Trace features in the brand new earndow and click OK.

Trace Features

Step 4 − Start Web Dynpro application thead use you like to trace. You can see a brand new area Web Dynpro trace tool in Web application.

Step 5 − Execute the application. Enter the details of issue → Choose Continue.

Step 6 − You can also send it with Insert and add a screenshot or you insert a file with additional information. Go to Blinese → Select File and click Add File.

Blinese Information

Step 7 − You can download the trace file in Zip format and end tracing by clicruler on Save Trace as Zip file and Stop Trace.

Trace Zip File

This file can end up being uploaded to SAP slotal and can end up being sent to SAP for debugging.

ICM Tracing

To analyze the issue, you can also trace the data stream in SAP Web Application server.

Step 1 − Use T-Code − SMICM. In the next earndow, click on GOTO → Trace File → Display file or start.

Trace Display File

You will see ICM trace result as shown in the folloearng screenshot −

ICM Trace Result

Step 2 − You can also incrresitve the trace level from default level 1. To incrresitve the trace level, GOTO → Trace Level → Incrresitve.

Trace Level

HTTP Blineser Tracing

This is used to analyze the dynamic end up beinghavior of your code. This can end up being used as an alternative to ICM tracing.

To use blineser tracing, you need to install proxy tool on your local system.

SAP Web Dynpro – Monitoring an Application

You can monitor Web Dynpro application using ABAP monitor. Information is stored-coloured about there Web Dynpro application. You can look at this withinformation using T-code − RZ20.

You can check the folloearng information in Web Dynpro ABAP monitor −

  • Session Count
  • Application Count
  • CPU time
  • Data

To look at the reslot, use T-code − RZ20

Step 1 − Go to SAP CCMS Monitor template.

Step 2 − Click the sub node Entire System.

Step 3 − Enter the system ID of the current SAP system where the application you like to monitor is withinstalimmediateed.

Monitor Sets

Step 4 − Select Application Server.

Step 5 − Select the name of the relevant application server. For instance, select Web Dynpro ABAP as shown in the folloearng screenshot −

Monitor Templates

The result will end up being displayed with the folloearng information when a Web Dynpro application will end up being calimmediateed −

  • Data
  • Application Count
  • Session Count
  • Round trips
  • CPU Time

Result Information

SHARE
Previous articleSelf
Next articleHCatalog

NO COMMENTS

LEAVE A REPLY