Preface – This post is part of the SAP ABAP Web Dynpro series.
Table of Contents
A Web Dynpro Application is developed using MVC (Model View Controller) Architecture. It means whatever data model is there that requires binding with the View elements (e.g. Input Field, Check box, Table, etc.). This binding can be achieved using view and controller. In this article we will explore data binding in Web Dynpro.
Data Binding in Web Dynpro
In Web Dynpro, we have multiple components. In our previous article, we have already discussed that we have something called Context which is a data container which stores data at runtime. A context can have multiple nodes e.g. Table nodes which will store table data. These nodes can have multiple Attributes that are the fields of the table.
Binding of the attributes or nodes of a context with UI elements (e.g. Table, Input Fields, etc.) is known as Data Binding in Web Dynpro.
Why we need Data Binding
- To show Customer Data on the Web Dynpro screen
- To auto fill the input fields based on pre-defined selections
- To provide search helps for an input element
- To maintain/provide conditions on UI based on backend data
Types of Data Binding
- Internal Mapping
It is a mapping between contexts of single component.
- External Mapping
It is a mapping between multiple contexts using their interface controller.
Setup and Coding for Data Binding
In our previous articles we have already shared steps to create a Web Dynpro View and publish it as an application. You can follow steps and code mentioned here to convert that application in an Application which utilizes data binding.