Currency and Unit Customizing in OData V2

See https://sapui5.hana.ondemand.com/#/topic/6c47b2b39db9404582994070ec3d57a2%23loioaa9024c7c5444822a68daeb21a92bd51
Example:

<ObjectStatus id="Simulation.DynamicPageHeader.Attr.QuantityWithUnit" 
                                            title="{/#FixedAssetPosting/QuantityInBaseUnit/@sap:label}" 
                                            text="{parts:[ {path: 'QuantityInBaseUnit'}, {path: 'BaseUnit'}, {path: '/##@@requestUnitsOfMeasure'} ],
                                                  type: 'sap.ui.model.odata.type.Unit'}" />

The third part represents the backend customizing which declares the unit "KG" has 3 decimals so that it is formatted as expected. The ability to use backend customizing is specific to the sap.ui.model.odata.type.Unit, as the customizing is loaded via the corresponding code list defined in the OData service used.

If using sap.ui.model.type.Unit UI5's built-in unit customizing applies which is derived from Unicode CLDR. For units, this is to a large extent different from ABAP backend customizing. CLDR only knows kilogram as "kg" (lowercase), meaning that "KG" is an unknown unit. Consequently, the numeric value is formatted "as is". And even if CLDR would know "KG" it might define a number of decimals to show which is different from ABAP backend customizing.

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容