SlideShare a Scribd company logo
1 of 4
WEEK 2 UNIT 3
AUTOMATIC CONVERSION WITH DATA TYPES
Please perform the exercises below in your app project as shown in the video.
Table of Contents
1 Usage of Data Types for Formatting .................................................................................... 2
2 Usage of Types for Form Validation..................................................................................... 3
Preview
Figure 1 - Preview of the app after doing this unit’s exercises
openSAP – Developing Web Apps with SAPUI5
Copyright/Trademark
1 USAGE OF DATA TYPESFOR FORMATTING
In this step, we use a data type to apply standard formatting across different currencies.
Preview
Figure 2 - Formatted currencies
webapp/view/App.view.xml
<mvc:View …>
…
<ObjectListItem
title="{Name}"
number="{
parts: [
{path: 'Price'},
{path: 'CurrencyCode'}
],
type: 'sap.ui.model.type.Currency',
formatOptions: {
showMeasure: false
}
}"
numberUnit="{CurrencyCode}"
…>
…
</mvc:View>
In this step, we format the price displayed in the ObjectListItem control depending on the currency
by applying the Currency data type on the number attribute. This is achieved by setting the type
attribute of the binding syntax to sap.ui.model.type.Currency.
Additionally, we set the formatting option showMeasure to false. This hides the currency code as it
is already displayed in the numberUnit attribute.
As you can see above, we use a special binding syntax for the number property of the
ObjectListItem. This binding syntax makes use of so-called "Calculated Fields", which allows to
pass multiple properties from different models to a formatter function or data type. The properties
bound from different models are called “parts”.
We could access these two values in a custom formatter function to specify how they should be
processed together. In our case, the currency type handles the formatting of the price. Please see
the related documentation below for more details.
openSAP – Developing Web Apps with SAPUI5
Copyright/Trademark
2 USAGE OF TYPESFOR FORM VALIDATION
In this step, we add a data type to the input control from one of the previous sessions and enable
automatic form validation. To keep the exercise simple and avoid adding more controls, we use the
input field for the name used in the “Hello” message, although it obviously was not originally meant to
require a number, but a string.
Preview
Figure 3 - Form validation based on types
webapp/view/App.view.xml
<mvc:View …>
…
<IconTabFilter id="start" …>
…
<Input
value="{
path: 'helloPanel>/recipient/amount',
type: 'sap.ui.model.type.Float',
formatOptions: {minFractionDigits: 2},
constraints: {maximum : 3000}
}"
description="Hello {helloPanel>/recipient/name}"
valueLiveUpdate="false"
width="60%"/>
</IconTabFilter>
…
We will change the binding information to be able to add the type and additional format options and
constraints to it. The way to add it is the same as in the list Item. We use the type
sap.ui.model.Type.Float to display the entered number in a specific format. Additionally we add
a constraint that has to be fulfilled and set the property valueLiveUpdate to false so that the
model is not updated on every keystroke.
webapp/manifest,json
{
…
"sap.ui5": {
"_version": "1.2.0",
"rootView": {
"viewName": "opensap.myapp.view.App",
"type": "XML",
"id": "app"
},
"handleValidation": true,
"autoPrefixId": true,
…
}
}
We now see automatic type conversion in the input field but not yet input validation in place. In order
to achieve this, we will set automatic validation handling to true in the
openSAP – Developing Web Apps with SAPUI5
Copyright/Trademark
manifest.json file and the SAPUI5 core will handle input validation based on format options and
constraints on all input controls automatically.
Now run your app again and check if the type on the input field is working by entering a number higher
than 3000 or a string. You should see a red border around the input field and if you focus it you will
see a validation error message.
Related Information
Calculated Fields for Data Binding
Custom Formatter Functions
API Reference: sap.ui.model.type
API Reference: sap.ui.model.type.Currency
API Overview and Samples: sap.ui.model.type.Currency
API Overview and Samples: sap.ui.model.type.Float
Coding Samples
Any software coding or code lines/strings (“Code”) provided in this documentation are only examples
and are not intended for use in a productive system environment. The Code is only intended to better
explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the
correctness or completeness of the Code provided herein and SAP shall not be liable for errors or
damages cause by use of the Code, except where such damages were caused by SAP with intent or
with gross negligence.

More Related Content

Similar to Open sap ui51_week_2_unit_3_acdt_exercises

CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxCASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxketurahhazelhurst
 
SAP performance testing & engineering courseware v01
SAP performance testing & engineering courseware v01SAP performance testing & engineering courseware v01
SAP performance testing & engineering courseware v01Argos
 
Smp agentry app_development
Smp agentry app_developmentSmp agentry app_development
Smp agentry app_developmentGanesh 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 ...Rajeev 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
 
Pmo slides jun2010
Pmo slides jun2010Pmo slides jun2010
Pmo slides jun2010Steve Turner
 
CRM WebClient UI for Interaction Center_C4H_CRM702_BB_ConfigGuide_EN_XX.doc
CRM WebClient UI for Interaction Center_C4H_CRM702_BB_ConfigGuide_EN_XX.docCRM WebClient UI for Interaction Center_C4H_CRM702_BB_ConfigGuide_EN_XX.doc
CRM WebClient UI for Interaction Center_C4H_CRM702_BB_ConfigGuide_EN_XX.docKrisStone4
 
Quick guide to plan and execute a load test
Quick guide to plan and execute a load testQuick guide to plan and execute a load test
Quick guide to plan and execute a load testduke.kalra
 
Check printingxmlp r12
Check printingxmlp r12Check printingxmlp r12
Check printingxmlp r12Venkatesh Tati
 
Connect Your Clouds with Force.com
Connect Your Clouds with Force.comConnect Your Clouds with Force.com
Connect Your Clouds with Force.comJeff Douglas
 
How to develop a gateway service using code based implementation
How to develop a gateway service using code based implementationHow to develop a gateway service using code based implementation
How to develop a gateway service using code based implementationnitin2517
 
E catt tutorial
E catt tutorialE catt tutorial
E catt tutorialNaveen Raj
 

Similar to Open sap ui51_week_2_unit_3_acdt_exercises (20)

OLT open script
OLT open script OLT open script
OLT open script
 
What is sap security
What is sap securityWhat is sap security
What is sap security
 
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxCASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
 
SAP performance testing & engineering courseware v01
SAP performance testing & engineering courseware v01SAP performance testing & engineering courseware v01
SAP performance testing & engineering courseware v01
 
Smp agentry app_development
Smp agentry app_developmentSmp agentry app_development
Smp agentry app_development
 
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 ...
 
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 ...
 
Pmo slides jun2010
Pmo slides jun2010Pmo slides jun2010
Pmo slides jun2010
 
SAP Integration with Excel - Basic Guide
SAP Integration with Excel - Basic GuideSAP Integration with Excel - Basic Guide
SAP Integration with Excel - Basic Guide
 
sap
sap sap
sap
 
Co pa extraction
Co pa extractionCo pa extraction
Co pa extraction
 
CRM WebClient UI for Interaction Center_C4H_CRM702_BB_ConfigGuide_EN_XX.doc
CRM WebClient UI for Interaction Center_C4H_CRM702_BB_ConfigGuide_EN_XX.docCRM WebClient UI for Interaction Center_C4H_CRM702_BB_ConfigGuide_EN_XX.doc
CRM WebClient UI for Interaction Center_C4H_CRM702_BB_ConfigGuide_EN_XX.doc
 
Quick guide to plan and execute a load test
Quick guide to plan and execute a load testQuick guide to plan and execute a load test
Quick guide to plan and execute a load test
 
Check printingxmlp r12
Check printingxmlp r12Check printingxmlp r12
Check printingxmlp r12
 
Connect Your Clouds with Force.com
Connect Your Clouds with Force.comConnect Your Clouds with Force.com
Connect Your Clouds with Force.com
 
Clientadmin
ClientadminClientadmin
Clientadmin
 
icv
icvicv
icv
 
Cellediting bex
Cellediting bexCellediting bex
Cellediting bex
 
How to develop a gateway service using code based implementation
How to develop a gateway service using code based implementationHow to develop a gateway service using code based implementation
How to develop a gateway service using code based implementation
 
E catt tutorial
E catt tutorialE catt tutorial
E catt tutorial
 

Recently uploaded

How the Congressional Budget Office Assists Lawmakers
How the Congressional Budget Office Assists LawmakersHow the Congressional Budget Office Assists Lawmakers
How the Congressional Budget Office Assists LawmakersCongressional Budget Office
 
Cunningham Road Call Girls Bangalore WhatsApp 8250192130 High Profile Service
Cunningham Road Call Girls Bangalore WhatsApp 8250192130 High Profile ServiceCunningham Road Call Girls Bangalore WhatsApp 8250192130 High Profile Service
Cunningham Road Call Girls Bangalore WhatsApp 8250192130 High Profile ServiceHigh Profile Call Girls
 
Fair Trash Reduction - West Hartford, CT
Fair Trash Reduction - West Hartford, CTFair Trash Reduction - West Hartford, CT
Fair Trash Reduction - West Hartford, CTaccounts329278
 
“Exploring the world: One page turn at a time.” World Book and Copyright Day ...
“Exploring the world: One page turn at a time.” World Book and Copyright Day ...“Exploring the world: One page turn at a time.” World Book and Copyright Day ...
“Exploring the world: One page turn at a time.” World Book and Copyright Day ...Christina Parmionova
 
Climate change and occupational safety and health.
Climate change and occupational safety and health.Climate change and occupational safety and health.
Climate change and occupational safety and health.Christina Parmionova
 
DNV publication: China Energy Transition Outlook 2024
DNV publication: China Energy Transition Outlook 2024DNV publication: China Energy Transition Outlook 2024
DNV publication: China Energy Transition Outlook 2024Energy for One World
 
(SHINA) Call Girls Khed ( 7001035870 ) HI-Fi Pune Escorts Service
(SHINA) Call Girls Khed ( 7001035870 ) HI-Fi Pune Escorts Service(SHINA) Call Girls Khed ( 7001035870 ) HI-Fi Pune Escorts Service
(SHINA) Call Girls Khed ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(DIYA) Call Girls Saswad ( 7001035870 ) HI-Fi Pune Escorts Service
(DIYA) Call Girls Saswad ( 7001035870 ) HI-Fi Pune Escorts Service(DIYA) Call Girls Saswad ( 7001035870 ) HI-Fi Pune Escorts Service
(DIYA) Call Girls Saswad ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...Suhani Kapoor
 
PPT Item # 4 - 231 Encino Ave (Significance Only)
PPT Item # 4 - 231 Encino Ave (Significance Only)PPT Item # 4 - 231 Encino Ave (Significance Only)
PPT Item # 4 - 231 Encino Ave (Significance Only)ahcitycouncil
 
VIP Call Girls Pune Vani 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Vani 8617697112 Independent Escort Service PuneVIP Call Girls Pune Vani 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Vani 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
VIP Russian Call Girls in Indore Ishita 💚😋 9256729539 🚀 Indore Escorts
VIP Russian Call Girls in Indore Ishita 💚😋  9256729539 🚀 Indore EscortsVIP Russian Call Girls in Indore Ishita 💚😋  9256729539 🚀 Indore Escorts
VIP Russian Call Girls in Indore Ishita 💚😋 9256729539 🚀 Indore Escortsaditipandeya
 
Precarious profits? Why firms use insecure contracts, and what would change t...
Precarious profits? Why firms use insecure contracts, and what would change t...Precarious profits? Why firms use insecure contracts, and what would change t...
Precarious profits? Why firms use insecure contracts, and what would change t...ResolutionFoundation
 
Climate change and safety and health at work
Climate change and safety and health at workClimate change and safety and health at work
Climate change and safety and health at workChristina Parmionova
 
VIP High Class Call Girls Amravati Anushka 8250192130 Independent Escort Serv...
VIP High Class Call Girls Amravati Anushka 8250192130 Independent Escort Serv...VIP High Class Call Girls Amravati Anushka 8250192130 Independent Escort Serv...
VIP High Class Call Girls Amravati Anushka 8250192130 Independent Escort Serv...Suhani Kapoor
 
Lucknow 💋 Russian Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...
Lucknow 💋 Russian Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...Lucknow 💋 Russian Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...
Lucknow 💋 Russian Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...anilsa9823
 
Top Rated Pune Call Girls Hadapsar ⟟ 6297143586 ⟟ Call Me For Genuine Sex Se...
Top Rated  Pune Call Girls Hadapsar ⟟ 6297143586 ⟟ Call Me For Genuine Sex Se...Top Rated  Pune Call Girls Hadapsar ⟟ 6297143586 ⟟ Call Me For Genuine Sex Se...
Top Rated Pune Call Girls Hadapsar ⟟ 6297143586 ⟟ Call Me For Genuine Sex Se...Call Girls in Nagpur High Profile
 

Recently uploaded (20)

How the Congressional Budget Office Assists Lawmakers
How the Congressional Budget Office Assists LawmakersHow the Congressional Budget Office Assists Lawmakers
How the Congressional Budget Office Assists Lawmakers
 
Cunningham Road Call Girls Bangalore WhatsApp 8250192130 High Profile Service
Cunningham Road Call Girls Bangalore WhatsApp 8250192130 High Profile ServiceCunningham Road Call Girls Bangalore WhatsApp 8250192130 High Profile Service
Cunningham Road Call Girls Bangalore WhatsApp 8250192130 High Profile Service
 
Fair Trash Reduction - West Hartford, CT
Fair Trash Reduction - West Hartford, CTFair Trash Reduction - West Hartford, CT
Fair Trash Reduction - West Hartford, CT
 
“Exploring the world: One page turn at a time.” World Book and Copyright Day ...
“Exploring the world: One page turn at a time.” World Book and Copyright Day ...“Exploring the world: One page turn at a time.” World Book and Copyright Day ...
“Exploring the world: One page turn at a time.” World Book and Copyright Day ...
 
The Federal Budget and Health Care Policy
The Federal Budget and Health Care PolicyThe Federal Budget and Health Care Policy
The Federal Budget and Health Care Policy
 
Climate change and occupational safety and health.
Climate change and occupational safety and health.Climate change and occupational safety and health.
Climate change and occupational safety and health.
 
DNV publication: China Energy Transition Outlook 2024
DNV publication: China Energy Transition Outlook 2024DNV publication: China Energy Transition Outlook 2024
DNV publication: China Energy Transition Outlook 2024
 
(SHINA) Call Girls Khed ( 7001035870 ) HI-Fi Pune Escorts Service
(SHINA) Call Girls Khed ( 7001035870 ) HI-Fi Pune Escorts Service(SHINA) Call Girls Khed ( 7001035870 ) HI-Fi Pune Escorts Service
(SHINA) Call Girls Khed ( 7001035870 ) HI-Fi Pune Escorts Service
 
(DIYA) Call Girls Saswad ( 7001035870 ) HI-Fi Pune Escorts Service
(DIYA) Call Girls Saswad ( 7001035870 ) HI-Fi Pune Escorts Service(DIYA) Call Girls Saswad ( 7001035870 ) HI-Fi Pune Escorts Service
(DIYA) Call Girls Saswad ( 7001035870 ) HI-Fi Pune Escorts Service
 
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Bikaner Aishwarya 8250192130 Independent Escort Servic...
 
PPT Item # 4 - 231 Encino Ave (Significance Only)
PPT Item # 4 - 231 Encino Ave (Significance Only)PPT Item # 4 - 231 Encino Ave (Significance Only)
PPT Item # 4 - 231 Encino Ave (Significance Only)
 
VIP Call Girls Pune Vani 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Vani 8617697112 Independent Escort Service PuneVIP Call Girls Pune Vani 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Vani 8617697112 Independent Escort Service Pune
 
VIP Russian Call Girls in Indore Ishita 💚😋 9256729539 🚀 Indore Escorts
VIP Russian Call Girls in Indore Ishita 💚😋  9256729539 🚀 Indore EscortsVIP Russian Call Girls in Indore Ishita 💚😋  9256729539 🚀 Indore Escorts
VIP Russian Call Girls in Indore Ishita 💚😋 9256729539 🚀 Indore Escorts
 
Precarious profits? Why firms use insecure contracts, and what would change t...
Precarious profits? Why firms use insecure contracts, and what would change t...Precarious profits? Why firms use insecure contracts, and what would change t...
Precarious profits? Why firms use insecure contracts, and what would change t...
 
Call Girls Service Connaught Place @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
Call Girls Service Connaught Place @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...Call Girls Service Connaught Place @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...
Call Girls Service Connaught Place @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
 
Climate change and safety and health at work
Climate change and safety and health at workClimate change and safety and health at work
Climate change and safety and health at work
 
Delhi Russian Call Girls In Connaught Place ➡️9999965857 India's Finest Model...
Delhi Russian Call Girls In Connaught Place ➡️9999965857 India's Finest Model...Delhi Russian Call Girls In Connaught Place ➡️9999965857 India's Finest Model...
Delhi Russian Call Girls In Connaught Place ➡️9999965857 India's Finest Model...
 
VIP High Class Call Girls Amravati Anushka 8250192130 Independent Escort Serv...
VIP High Class Call Girls Amravati Anushka 8250192130 Independent Escort Serv...VIP High Class Call Girls Amravati Anushka 8250192130 Independent Escort Serv...
VIP High Class Call Girls Amravati Anushka 8250192130 Independent Escort Serv...
 
Lucknow 💋 Russian Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...
Lucknow 💋 Russian Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...Lucknow 💋 Russian Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...
Lucknow 💋 Russian Call Girls Lucknow ₹7.5k Pick Up & Drop With Cash Payment 8...
 
Top Rated Pune Call Girls Hadapsar ⟟ 6297143586 ⟟ Call Me For Genuine Sex Se...
Top Rated  Pune Call Girls Hadapsar ⟟ 6297143586 ⟟ Call Me For Genuine Sex Se...Top Rated  Pune Call Girls Hadapsar ⟟ 6297143586 ⟟ Call Me For Genuine Sex Se...
Top Rated Pune Call Girls Hadapsar ⟟ 6297143586 ⟟ Call Me For Genuine Sex Se...
 

Open sap ui51_week_2_unit_3_acdt_exercises

  • 1. WEEK 2 UNIT 3 AUTOMATIC CONVERSION WITH DATA TYPES Please perform the exercises below in your app project as shown in the video. Table of Contents 1 Usage of Data Types for Formatting .................................................................................... 2 2 Usage of Types for Form Validation..................................................................................... 3 Preview Figure 1 - Preview of the app after doing this unit’s exercises
  • 2. openSAP – Developing Web Apps with SAPUI5 Copyright/Trademark 1 USAGE OF DATA TYPESFOR FORMATTING In this step, we use a data type to apply standard formatting across different currencies. Preview Figure 2 - Formatted currencies webapp/view/App.view.xml <mvc:View …> … <ObjectListItem title="{Name}" number="{ parts: [ {path: 'Price'}, {path: 'CurrencyCode'} ], type: 'sap.ui.model.type.Currency', formatOptions: { showMeasure: false } }" numberUnit="{CurrencyCode}" …> … </mvc:View> In this step, we format the price displayed in the ObjectListItem control depending on the currency by applying the Currency data type on the number attribute. This is achieved by setting the type attribute of the binding syntax to sap.ui.model.type.Currency. Additionally, we set the formatting option showMeasure to false. This hides the currency code as it is already displayed in the numberUnit attribute. As you can see above, we use a special binding syntax for the number property of the ObjectListItem. This binding syntax makes use of so-called "Calculated Fields", which allows to pass multiple properties from different models to a formatter function or data type. The properties bound from different models are called “parts”. We could access these two values in a custom formatter function to specify how they should be processed together. In our case, the currency type handles the formatting of the price. Please see the related documentation below for more details.
  • 3. openSAP – Developing Web Apps with SAPUI5 Copyright/Trademark 2 USAGE OF TYPESFOR FORM VALIDATION In this step, we add a data type to the input control from one of the previous sessions and enable automatic form validation. To keep the exercise simple and avoid adding more controls, we use the input field for the name used in the “Hello” message, although it obviously was not originally meant to require a number, but a string. Preview Figure 3 - Form validation based on types webapp/view/App.view.xml <mvc:View …> … <IconTabFilter id="start" …> … <Input value="{ path: 'helloPanel>/recipient/amount', type: 'sap.ui.model.type.Float', formatOptions: {minFractionDigits: 2}, constraints: {maximum : 3000} }" description="Hello {helloPanel>/recipient/name}" valueLiveUpdate="false" width="60%"/> </IconTabFilter> … We will change the binding information to be able to add the type and additional format options and constraints to it. The way to add it is the same as in the list Item. We use the type sap.ui.model.Type.Float to display the entered number in a specific format. Additionally we add a constraint that has to be fulfilled and set the property valueLiveUpdate to false so that the model is not updated on every keystroke. webapp/manifest,json { … "sap.ui5": { "_version": "1.2.0", "rootView": { "viewName": "opensap.myapp.view.App", "type": "XML", "id": "app" }, "handleValidation": true, "autoPrefixId": true, … } } We now see automatic type conversion in the input field but not yet input validation in place. In order to achieve this, we will set automatic validation handling to true in the
  • 4. openSAP – Developing Web Apps with SAPUI5 Copyright/Trademark manifest.json file and the SAPUI5 core will handle input validation based on format options and constraints on all input controls automatically. Now run your app again and check if the type on the input field is working by entering a number higher than 3000 or a string. You should see a red border around the input field and if you focus it you will see a validation error message. Related Information Calculated Fields for Data Binding Custom Formatter Functions API Reference: sap.ui.model.type API Reference: sap.ui.model.type.Currency API Overview and Samples: sap.ui.model.type.Currency API Overview and Samples: sap.ui.model.type.Float Coding Samples Any software coding or code lines/strings (“Code”) provided in this documentation are only examples and are not intended for use in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules for certain SAP coding. SAP does not warrant the correctness or completeness of the Code provided herein and SAP shall not be liable for errors or damages cause by use of the Code, except where such damages were caused by SAP with intent or with gross negligence.