SlideShare a Scribd company logo
1 of 4
Download to read offline
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

What's hot

Refreshing Your App in iOS 7
Refreshing Your App in iOS 7Refreshing Your App in iOS 7
Refreshing Your App in iOS 7
Aviary
 

What's hot (20)

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

Viewers also liked

IGROWSOFT abap material
IGROWSOFT abap materialIGROWSOFT abap material
IGROWSOFT abap material
Kranthi Kumar
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
Kranthi Kumar
 
Using folder options for page protection
Using folder options for page protectionUsing folder options for page protection
Using folder options for page protection
Kranthi Kumar
 
Creating simple comp
Creating simple compCreating simple comp
Creating simple comp
Kranthi Kumar
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
Kranthi Kumar
 
Version it satya_dev
Version it satya_devVersion it satya_dev
Version it satya_dev
Kranthi Kumar
 
5078977 abap-tips
5078977 abap-tips5078977 abap-tips
5078977 abap-tips
jmts1000
 
E mail eft remittance using bte
E mail eft remittance using bteE mail eft remittance using bte
E mail eft remittance using bte
Kranthi Kumar
 
Webdynpro by vijayender_reddy
Webdynpro by vijayender_reddyWebdynpro by vijayender_reddy
Webdynpro by vijayender_reddy
Kranthi Kumar
 
Adding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt esAdding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt es
Kranthi Kumar
 

Viewers also liked (14)

IGROWSOFT abap material
IGROWSOFT abap materialIGROWSOFT abap material
IGROWSOFT abap material
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
Using folder options for page protection
Using folder options for page protectionUsing folder options for page protection
Using folder options for page protection
 
Creating simple comp
Creating simple compCreating simple comp
Creating simple comp
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
 
Version it satya_dev
Version it satya_devVersion it satya_dev
Version it satya_dev
 
Abap faq
Abap faqAbap faq
Abap faq
 
Type casting in ooabap
Type casting in ooabapType casting in ooabap
Type casting in ooabap
 
5078977 abap-tips
5078977 abap-tips5078977 abap-tips
5078977 abap-tips
 
E mail eft remittance using bte
E mail eft remittance using bteE mail eft remittance using bte
E mail eft remittance using bte
 
Webdynpro by vijayender_reddy
Webdynpro by vijayender_reddyWebdynpro by vijayender_reddy
Webdynpro by vijayender_reddy
 
Adding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt esAdding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt es
 
Crm technical
Crm technicalCrm technical
Crm technical
 

Similar to Data binding

230394452 extending-extending-srm-web-dynpro-view srm-web-dynpro-view
230394452 extending-extending-srm-web-dynpro-view srm-web-dynpro-view230394452 extending-extending-srm-web-dynpro-view srm-web-dynpro-view
230394452 extending-extending-srm-web-dynpro-view srm-web-dynpro-view
Faina Fridman
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQL
Akhil Mittal
 
Architecture Specification - Visual Modeling Tool
Architecture Specification - Visual Modeling ToolArchitecture Specification - Visual Modeling Tool
Architecture Specification - Visual Modeling Tool
Adriaan Venter
 
Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0
Cathie101
 
I doc packaging and mapping techniques.doc
I doc packaging and mapping techniques.docI doc packaging and mapping techniques.doc
I doc packaging and mapping techniques.doc
VERUS BRASIL
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTES
Kranthi Kumar
 

Similar to Data binding (20)

iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsiOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI Components
 
230394452 extending-extending-srm-web-dynpro-view srm-web-dynpro-view
230394452 extending-extending-srm-web-dynpro-view srm-web-dynpro-view230394452 extending-extending-srm-web-dynpro-view srm-web-dynpro-view
230394452 extending-extending-srm-web-dynpro-view srm-web-dynpro-view
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQL
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
 
Architecture Specification - Visual Modeling Tool
Architecture Specification - Visual Modeling ToolArchitecture Specification - Visual Modeling Tool
Architecture Specification - Visual Modeling Tool
 
iOS Contact List Application Tutorial
iOS Contact List Application TutorialiOS Contact List Application Tutorial
iOS Contact List Application Tutorial
 
Creating a dot netnuke
Creating a dot netnukeCreating a dot netnuke
Creating a dot netnuke
 
Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0
 
Unit 2 - Data Binding.pptx
Unit 2 - Data Binding.pptxUnit 2 - Data Binding.pptx
Unit 2 - Data Binding.pptx
 
I doc packaging and mapping techniques.doc
I doc packaging and mapping techniques.docI doc packaging and mapping techniques.doc
I doc packaging and mapping techniques.doc
 
Lecture 2 Styling and Layout in React Native.pptx
Lecture 2 Styling and Layout in React Native.pptxLecture 2 Styling and Layout in React Native.pptx
Lecture 2 Styling and Layout in React Native.pptx
 
Different types of sticker apps
Different types of sticker appsDifferent types of sticker apps
Different types of sticker apps
 
Oracle ADF 11g Tutorial
Oracle ADF 11g TutorialOracle ADF 11g Tutorial
Oracle ADF 11g Tutorial
 
Aspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_csAspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_cs
 
6. safe users-guide
6.  safe users-guide6.  safe users-guide
6. safe users-guide
 
Dot netnuke07 setpbysetp
Dot netnuke07 setpbysetpDot netnuke07 setpbysetp
Dot netnuke07 setpbysetp
 
SAP CRM OneOrder Advanced Search WebUI Component - part2
SAP CRM OneOrder Advanced Search WebUI Component - part2SAP CRM OneOrder Advanced Search WebUI Component - part2
SAP CRM OneOrder Advanced Search WebUI Component - part2
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTES
 
Installing community surveys in connections 5.5
Installing community surveys in connections 5.5Installing community surveys in connections 5.5
Installing community surveys in connections 5.5
 

More from Kranthi Kumar

Chapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsChapter 07 debugging sap scripts
Chapter 07 debugging sap scripts
Kranthi Kumar
 
Chapter 06 printing sap script forms
Chapter 06 printing sap script formsChapter 06 printing sap script forms
Chapter 06 printing sap script forms
Kranthi Kumar
 
Chapter 05 sap script - configuration
Chapter 05 sap script - configurationChapter 05 sap script - configuration
Chapter 05 sap script - configuration
Kranthi Kumar
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output program
Kranthi Kumar
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
Kranthi Kumar
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
Kranthi Kumar
 
Call transaction method
Call transaction methodCall transaction method
Call transaction method
Kranthi Kumar
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
Kranthi Kumar
 

More from Kranthi Kumar (13)

control techniques
control techniquescontrol techniques
control techniques
 
Chapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsChapter 07 debugging sap scripts
Chapter 07 debugging sap scripts
 
Chapter 06 printing sap script forms
Chapter 06 printing sap script formsChapter 06 printing sap script forms
Chapter 06 printing sap script forms
 
Chapter 05 sap script - configuration
Chapter 05 sap script - configurationChapter 05 sap script - configuration
Chapter 05 sap script - configuration
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output program
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
 
sap script overview
sap script overviewsap script overview
sap script overview
 
Batch input session
Batch input sessionBatch input session
Batch input session
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
 
Call transaction method
Call transaction methodCall transaction method
Call transaction method
 
Business workflow
Business workflowBusiness workflow
Business workflow
 
07 sap scripts
07 sap scripts07 sap scripts
07 sap scripts
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
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.