You might observe the same number value but displayed with different format if you log on the same system with different user.
The user with Decimal Notation setting ” ” will see the format “1.880,00” and setting “Y” will see “1 880,00”. What has happened under the hood?
If you monitor the network tab in Chrome development tool when Fiori launchpad is initialized for the very beginning, you can find the http request below:
The response contains the Defaults user setting stored in ABAP backend. The attribute “numberFormat” is related to the number format being displayed.
In Configuration.js, the corresponding enumeration variable is defined for each type of number format.
The main logic for number format is implemented in file NumberFormat.js. As the variable name has already given a good hint, the integer part and fraction part of 1880.00 are parsed and stored into the two variables separately.
The logic of the following code:
(1) Since a number is displayed as several groups and each group consists of THREE digits, so in code 627, the position of group is calculated by MOD operation against 3.
(2) For user setting “Y”, the group separator character is ” ” and decimal separator is “,” , stored in corresponding attribute in variable oOptions.
(3) You can debug the NumberFormat.format in the run time to have a better understanding on the logic above. Suppose you do not the exact location of NumberFormat.js, just switch to debug mode, open Chrome development tool and go to Sources tab,
press Ctrl+O and type “NumberF” and then there is auto-complete function which lists all potential results.
Click the second one ( ) and you will navigate to NumberFormat.js. Hover the mouse and you can see its absolute path in tooltip. Now you can set breakpoint and debug. For more tips about Chrome development tool used in my daily work, please refer to this blog. Enjoy debugging!
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关推荐
以下是SAP Fiori的三种方案:交易应用程序(Transactional apps),分析应用程序(Analytical apps)和实况报告报表(Fact sheets)。每个方案都有其特定的系统或软件要安装。通过阅读本文档,它可以根据所需的系统...
SAP Fiori SAP Fiori SAP Fiori Architecture Architecture Overview to Deep Overview to Deep Dive -with with focus on S/4 HANA focus on S/4 HANA
SAP fiori的简易开发过程指南,从开发者角度出发,分后面ODATA开发环境和前端SAP UI5环境搭建,以及发布进行了讲解
SAP Fiori 官方最新培训中使用的现金流案例。与你分享。
SAP Fiori Launchpad是移动或桌面设备上Fiori应用程序的入口,Launchpad Designer是配置Launchpad的标准工具。本配置指南提供了设置SAP Fiori Launchpad和Launchpad Designer所需的信息。 此外,它还提供了将所有...
SAP FIORI OVERVIEW FIORI概览
SAP Fiori OData Services. OData is used to define best practices that are required to build and consume RESTful APIs. It helps you to find out changes, defining functions for reusable procedures and ...
SAP Fiori 快速指南 SAP Fiori 是 SAP 软件和应用程序的新用户体验(UX),提供了一组应用程序,用于常规业务功能,如工作批准,金融应用程序,计算应用程序和各种自助服务应用程序。SAP Fiori 提供 300 多个基于...
SAP Fiori - Adding a Custom Workflow in 6 Steps
SAP Fiori---快速指南 共82页 2018年编著 word文档,写的不错,快速入门的好教材。
SAP Fiori UX overview 2015/03
sapFiori配置手册[整理].pdf
SAP Fiori Implementation Guide This document describes exploring SAP Fiori Implementation options and planning a typical SAP Fiori on premise implementation.
Take a deep dive into SAP Fiori and discover Fiori architecture, Fiori landscape installation, Fiori standard applications, Fiori Launchpad configuration, tools for developing Fiori applications and ...
SAP S4HANA frontend fiori详细配置文档,以及简单权限配置
SAP Fiori 官方新产品发布体验 F110自动付款样例.希望您喜欢。
什么是SAP Fiori SAP UX策略 SAP Fiori设计指南(Design Guideline) SAP Fiori运行环境 SAPUI5与OpenUI5 OpenUI演示
描述SAP 最新产品特性,及开发事项。
Session 1: Introduction to SAPUI5 / FIORI (40 mins) ▫ Basic MVC concept: Model, View, Controller ▫ UI5 Control libraries • Session 2: Introduction to SAP Web IDE (20 mins) • Hands on 1: Build your...
S4 HANA 中文版教材