Saturday, March 12

Basics of Web Dynpro ABAP

Basics
Web Dynpro applications  can be created and edited in the web dynpro explorer in the ABAP development environment

It has been fully integrated into the ABAP Workbench so there is no separate transaction code. we use the object list selection to display  or create Web Dynpro component.

When we try to create a new web dynpro component, the system asks for creation of web dynpro component or a web dynpro component interface.


Component
The first step when we create a web dynpro application is to create a we dynpro component. It can have many views and those views can be embedded in windows.

Web Dynpro View
View is the smallest unit of a web dynpro application visible to the user. Various  UI elements like text fields, radio buttons, checkboxes, buttons. Links etc can be put on the view. View also has a context and a controller. Context holds temporarily ie during the session of the application.

Creating a View
View can be created  in the web dynpro explorer in the object list. In order to see the view in the browser, it has to be embedded in a window. The web dynpro design time does not enbed it in the window automatically even if the component has only one window.

View Editor
Once the view is created, it can be modified by using the layout tab of the view. So graphically UI elements can be removed or replaced. Their properties can be changed.

Context data is stored in a tree format. It has got nodes and attributes. Node is a collection of elements. No of elements inside the node  depends upon the cardinality of the node. Attributes present in the node are present in each element belonging  to that node.

Attributes Flagged as "Nullable"
Some data types like numeric or time etc are output by a default value null. For a num4c type the default output value is “0000” and for time it is 00:00:00. This type of behavior is undesirable for some situations. To solve this, we can do the following
First, you must use the method
IF_WD_CONTEXT_NODE_INFO=>SET_NULLABLE( ). This will flag the value in the node as nullable.
all attributes or individual attributes can be set nullable.
Secondly, actual value can be set to “null”. For this purpose, the
interface IF_WD_CONTEXT_NODE provides the method set_attribute_null(
'”Node_Name”' ). 

Related Articles :


ABAP Data Types and Objects
ABAP Statements
WD4A - Topics to be covered in the upcoming posts
WD4A - Introduction
WDA - SAP Logon Procedures
WD4A-Format the Values appearing on value Axis of Business Graphic
WD4A-Navigate from one view to another and back to previous view
WD4A - How to Calculate next 12 months from current month in web dynpro ABAP
WD4A - Validate Inputs in a web dynpro ABAP Application

No comments:

Post a Comment

You are welcome to express your views here...