SlideShare a Scribd company logo
1
Data Binding, Context Mapping & Navigation
Exercise
Data Binding, Context Mapping & Navigation
Exercise
Chapter: Context at Design Time
Theme: Binding UI elements to the view context,
mapping view context nodes to the
component controller context and create
navigation between two views
At the end of this Exercise, you will be able to:
• Create a node and child attributes in a context
• Map a view context node to component controller’s context
• Bind UI elements to the view context
• Create navigation between two views
1 Development Objectives
This exercise has the following objectives:
- Make the data stored in the context of the component controller available to view
controllers.
- Create some UI elements on the view layout that can display the data in the
context of the view controller.
- Create navigation between two views.
The context of the component controller will act as the data source. Then using
context mapping, the data will be shared with two view controllers. Once the data is
available to the context of the view controller, UI elements can be added to the view
layout. These UI elements will then be bound to the context of the view controller. At
last the navigation from one view to the other one will be enabled.
2
Data Binding, Context Mapping & Navigation
Exercise
2 Result
In this exercise, you will create a new
component with two views. You will add
two input fields and a push button on the
first view.
On the second view you will create only
display fields for displaying your input
from the first view.
You also will have to create the
navigation between these two views.
Template Solution:
Web Dynpro Component: WD_03S_SIMPLE_APPLICATION
Application: WD_03S_SIMPLE_APPLICATION
Group number: ## stands for the two-digit group number
3 Developing
3-1 Create Component
Create a new Web Dynpro Component called
ZWD_##_SIMPLE_APPLICATION. Change the proposed window name
to MAIN.
3-2 Build Context in the component controller
Locate the Component Controller node in the project structure that is
located immediately under the component. Double click on Component
Controller to open the Custom Controller editor.
- Add a new node to the Custom Controller Context, having the
name FlightInfo.
3
Data Binding, Context Mapping & Navigation
Exercise
- On the popup enter sflight in the field Dictionary structure and press
Add Attribute from structure.
- Choose fields carrid and connid and press Continue.
- Change property Input Help Mode of the attributes carrid and connid
to automatisch. This setting will provide both input fields on the
Input_View (will be created next) with a F4 help for value selection.
3-3 Create Input_View
3-3-1 Create a view called Input_View and navigate to the context tab. Use drag
& drop to copy and map the node FlightInfo from the context of the
Component Controller to the context of the View Controller. The two
attributes carrid and connid are automatically created.
3-3-2 Navigate to the view’s Layout tab. Change the property Layout of the
ROOTUIELEMENTCONTAINER to MatrixLayout.
Create a group with the name Group_1. Change the Layout property to
MatrixLayout and the LayoutData property to MatrixHeadData. Change
the property Text of the element Caption_1 to Please fill in values!
Right mouse click on Group_1 and choose Container-Formular erzeugen
(Create container form) from the context menu. Choose context node
FlightInfo and press Confirm entry.
The two Labels and Inputfields for the context attributes carrid and
connid have been created.
Change the property LayoutData of Connid_Label_1 to MatrixHeadData.
3-4 Create Output_View
3-4-1 Make a copy of view Input_View and name it Output_View. Adjust the
Description on the properties tab to Output View.
3-4-2 Change the text of Caption_1 to Your input was….
3-4-3 Enable property readOnly for both input fields.
3-5 Create Navigation from Input_View to Output_View
3-5-1 Navigate to the tab Inbound Plugs on the Output_View and create a
Inbound Plug named to_output_view.
3-5-2 Navigate to the tab Outbound Plugs on the Intput_View and create a
Outbound Plug named from_input_view.
3-5-3 Go to the Main window (on the window tab) and embed the two views
Input_View and Output_View.
Set Input_View as default.
Expand the node of embedded view Input_View, right mouse click on the
outbound plug and choose Create Navigation Link from the context menu.
Choose Destination View OUTPUT_VIEW via F4 help and press
Continue.
4
Data Binding, Context Mapping & Navigation
Exercise
As a result a new node with a chain symbol appears under the outbound
plug.
3-5-4 Create a button element named Go_Button under Group_1 of the view
Input_View. Insert Go! for property Text. Create action Go for the button.
Enter a description and choose outbound plug From_Input_View. Press
Continue.
3-6 Create Web Dynpro Application
Right mouse click on the component node and select Create -> Web
Dynpro Anwendung (Web Dynpro Application) from the context menu.
Create the application having the following attributes:
Name: (accept default)
Description: Simple Web Dynpro Application
Accept all default settings and press Save and run your application.

More Related Content

PDF
Creating messages
PDF
Binding,context mapping,navigation exercise
PDF
Exercise in alv
PDF
Creating a comp
PDF
Context at design
PDF
Web(abap introduction)
PDF
Dynamic binding
PDF
Controllers and context programming
Creating messages
Binding,context mapping,navigation exercise
Exercise in alv
Creating a comp
Context at design
Web(abap introduction)
Dynamic binding
Controllers and context programming

What's hot (20)

PDF
Alv for web
PDF
Gokul bok
PDF
Get rid of controllers in angular 1.5.x start using component directives
PPTX
Angular4 getting started
PPTX
What are the components in React?
PPTX
Dynamic visualforce components in Salesforce
PPTX
What’s new in Visual Studio 2010
PPTX
Creating custom Validators on Reactive Forms using Angular 6
PDF
Styling recipes for Angular components
PDF
Some tips to improve developer experience with Symfony
PDF
Murach : How to develop a single-page MVC web
PDF
Refreshing Your App in iOS 7
PDF
Beginner’s tutorial (part 1) integrate redux form in react native application
PDF
Mobile Programming - 3 Rows, Column and Basic Sizing
PPT
Creating A User‑Defined Function In Excel Using Vba
PDF
Murach : How to work with session state and cookies
PPTX
Quality sdk for your apis in minutes!
PDF
Murach: How to transfer data from controllers
PPTX
Alv for web
Gokul bok
Get rid of controllers in angular 1.5.x start using component directives
Angular4 getting started
What are the components in React?
Dynamic visualforce components in Salesforce
What’s new in Visual Studio 2010
Creating custom Validators on Reactive Forms using Angular 6
Styling recipes for Angular components
Some tips to improve developer experience with Symfony
Murach : How to develop a single-page MVC web
Refreshing Your App in iOS 7
Beginner’s tutorial (part 1) integrate redux form in react native application
Mobile Programming - 3 Rows, Column and Basic Sizing
Creating A User‑Defined Function In Excel Using Vba
Murach : How to work with session state and cookies
Quality sdk for your apis in minutes!
Murach: How to transfer data from controllers
Ad

Viewers also liked (14)

PDF
IGROWSOFT abap material
PDF
Ooabap notes with_programs
PDF
Sap abap material
DOCX
Using folder options for page protection
PDF
Creating simple comp
PDF
Fi enhancement technique how-to-guide on the usage of business transaction ...
PDF
Version it satya_dev
DOC
Abap faq
PPTX
Type casting in ooabap
PDF
5078977 abap-tips
DOC
E mail eft remittance using bte
PDF
Webdynpro by vijayender_reddy
DOC
Adding custom fields to the fi report fbl5 n using bt es
PDF
Crm technical
IGROWSOFT abap material
Ooabap notes with_programs
Sap abap material
Using folder options for page protection
Creating simple comp
Fi enhancement technique how-to-guide on the usage of business transaction ...
Version it satya_dev
Abap faq
Type casting in ooabap
5078977 abap-tips
E mail eft remittance using bte
Webdynpro by vijayender_reddy
Adding custom fields to the fi report fbl5 n using bt es
Crm technical
Ad

Similar to Data binding (20)

PDF
WEBDYPRO ABAP WITH DETAILED NOTES
PDF
Web dynpro for abap
ODP
Web dynpro
DOC
Step by step guide to basic web dynpro abap
PDF
ONLINE TRAINING SAP WEBDYNPRO ABAP COURSE
PDF
SAP WEBDYNPRO ABAP COURSE ONLINE TRAINING
PDF
Training WEBDYNPRO ABAP Online SAP Course
PDF
SAP WEBDYNPRO ABAP ONLINE TRAINING
PDF
SAP WEBDYNPRO ABAP ONLINE TRAINING
PDF
Web dynpro abap
PDF
Web dynpro abap
PDF
SAP WEBDYNPRO ABAP ONLINE TRAINING
PDF
SAP WEBDYNPRO ABAP ONLINE TRAINING
PDF
SAP WEBDYNPRO abap Online Training
PDF
TRAINING COURSE WEBDYNPRO ABAP
PPTX
WPF - Controls & Data
PDF
SAP WEBDYNPRO ABAP ONLINE TRAINING
PPTX
SAP Inside Track 2010 - Thomas Jung Intro to WDA
PPT
01_0_Web_Dynpro_454545454512345678912344556
PPTX
Exploring Layouts and Providers
WEBDYPRO ABAP WITH DETAILED NOTES
Web dynpro for abap
Web dynpro
Step by step guide to basic web dynpro abap
ONLINE TRAINING SAP WEBDYNPRO ABAP COURSE
SAP WEBDYNPRO ABAP COURSE ONLINE TRAINING
Training WEBDYNPRO ABAP Online SAP Course
SAP WEBDYNPRO ABAP ONLINE TRAINING
SAP WEBDYNPRO ABAP ONLINE TRAINING
Web dynpro abap
Web dynpro abap
SAP WEBDYNPRO ABAP ONLINE TRAINING
SAP WEBDYNPRO ABAP ONLINE TRAINING
SAP WEBDYNPRO abap Online Training
TRAINING COURSE WEBDYNPRO ABAP
WPF - Controls & Data
SAP WEBDYNPRO ABAP ONLINE TRAINING
SAP Inside Track 2010 - Thomas Jung Intro to WDA
01_0_Web_Dynpro_454545454512345678912344556
Exploring Layouts and Providers

More from Kranthi Kumar (13)

PDF
control techniques
PPT
Chapter 07 debugging sap scripts
PPT
Chapter 06 printing sap script forms
PPT
Chapter 05 sap script - configuration
PPT
Chapter 04 sap script - output program
PPT
Chapter 02 sap script forms
PPT
sap script overview
PPT
Batch input session
PPT
BATCH DATA COMMUNICATION
PPT
Call transaction method
PPT
Business workflow
PPT
07 sap scripts
PPT
abap list viewer (alv)
control techniques
Chapter 07 debugging sap scripts
Chapter 06 printing sap script forms
Chapter 05 sap script - configuration
Chapter 04 sap script - output program
Chapter 02 sap script forms
sap script overview
Batch input session
BATCH DATA COMMUNICATION
Call transaction method
Business workflow
07 sap scripts
abap list viewer (alv)

Data binding

  • 1. 1 Data Binding, Context Mapping & Navigation Exercise Data Binding, Context Mapping & Navigation Exercise Chapter: Context at Design Time Theme: Binding UI elements to the view context, mapping view context nodes to the component controller context and create navigation between two views At the end of this Exercise, you will be able to: • Create a node and child attributes in a context • Map a view context node to component controller’s context • Bind UI elements to the view context • Create navigation between two views 1 Development Objectives This exercise has the following objectives: - Make the data stored in the context of the component controller available to view controllers. - Create some UI elements on the view layout that can display the data in the context of the view controller. - Create navigation between two views. The context of the component controller will act as the data source. Then using context mapping, the data will be shared with two view controllers. Once the data is available to the context of the view controller, UI elements can be added to the view layout. These UI elements will then be bound to the context of the view controller. At last the navigation from one view to the other one will be enabled.
  • 2. 2 Data Binding, Context Mapping & Navigation Exercise 2 Result In this exercise, you will create a new component with two views. You will add two input fields and a push button on the first view. On the second view you will create only display fields for displaying your input from the first view. You also will have to create the navigation between these two views. Template Solution: Web Dynpro Component: WD_03S_SIMPLE_APPLICATION Application: WD_03S_SIMPLE_APPLICATION Group number: ## stands for the two-digit group number 3 Developing 3-1 Create Component Create a new Web Dynpro Component called ZWD_##_SIMPLE_APPLICATION. Change the proposed window name to MAIN. 3-2 Build Context in the component controller Locate the Component Controller node in the project structure that is located immediately under the component. Double click on Component Controller to open the Custom Controller editor. - Add a new node to the Custom Controller Context, having the name FlightInfo.
  • 3. 3 Data Binding, Context Mapping & Navigation Exercise - On the popup enter sflight in the field Dictionary structure and press Add Attribute from structure. - Choose fields carrid and connid and press Continue. - Change property Input Help Mode of the attributes carrid and connid to automatisch. This setting will provide both input fields on the Input_View (will be created next) with a F4 help for value selection. 3-3 Create Input_View 3-3-1 Create a view called Input_View and navigate to the context tab. Use drag & drop to copy and map the node FlightInfo from the context of the Component Controller to the context of the View Controller. The two attributes carrid and connid are automatically created. 3-3-2 Navigate to the view’s Layout tab. Change the property Layout of the ROOTUIELEMENTCONTAINER to MatrixLayout. Create a group with the name Group_1. Change the Layout property to MatrixLayout and the LayoutData property to MatrixHeadData. Change the property Text of the element Caption_1 to Please fill in values! Right mouse click on Group_1 and choose Container-Formular erzeugen (Create container form) from the context menu. Choose context node FlightInfo and press Confirm entry. The two Labels and Inputfields for the context attributes carrid and connid have been created. Change the property LayoutData of Connid_Label_1 to MatrixHeadData. 3-4 Create Output_View 3-4-1 Make a copy of view Input_View and name it Output_View. Adjust the Description on the properties tab to Output View. 3-4-2 Change the text of Caption_1 to Your input was…. 3-4-3 Enable property readOnly for both input fields. 3-5 Create Navigation from Input_View to Output_View 3-5-1 Navigate to the tab Inbound Plugs on the Output_View and create a Inbound Plug named to_output_view. 3-5-2 Navigate to the tab Outbound Plugs on the Intput_View and create a Outbound Plug named from_input_view. 3-5-3 Go to the Main window (on the window tab) and embed the two views Input_View and Output_View. Set Input_View as default. Expand the node of embedded view Input_View, right mouse click on the outbound plug and choose Create Navigation Link from the context menu. Choose Destination View OUTPUT_VIEW via F4 help and press Continue.
  • 4. 4 Data Binding, Context Mapping & Navigation Exercise As a result a new node with a chain symbol appears under the outbound plug. 3-5-4 Create a button element named Go_Button under Group_1 of the view Input_View. Insert Go! for property Text. Create action Go for the button. Enter a description and choose outbound plug From_Input_View. Press Continue. 3-6 Create Web Dynpro Application Right mouse click on the component node and select Create -> Web Dynpro Anwendung (Web Dynpro Application) from the context menu. Create the application having the following attributes: Name: (accept default) Description: Simple Web Dynpro Application Accept all default settings and press Save and run your application.