cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Input currency not validating decimal point for JPY

adamharkus
Participant
0 Kudos

I've setup an input field as a currency type, and also included error handling by adding the following to the manifest.json

 "handleValidation": true,
<Input value="{parts: ['pendingData>/data/netPrice', 'pendingData>/data/currency'], type: 'sap.ui.model.type.Currency', formatOptions: {showMeasure: false} }" id="pendingNetPriceInput"  change="onInputChange"/> 

This works fine for GBP for example, correctly showing an error when inputting an invalid character.

However, when the currency is JPY, this should not allow entry of a decimal point, which is an invalid character for this currency, but SAPUI5 is not showing the error in this case.

I've checked the TCURX table in ECC and JPY is set to 0 decimal places.

Why is the decimal point not erroring for JPY?

Note. I have also tried adding in the sap:variable-scale annotation to the metadata.... as described here. OData annotations in SEGW with example and consume it in visual studio to create a fiori application...

.... with no success unfortunately.. The decimal point remains on JPY currency (scale 2).

junwu
Active Contributor

probably ui5 don't have that tight integration with backend to do that validation.

Accepted Solutions (0)

Answers (1)

Answers (1)

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

adamharkus

maybe this blog will help Adam,

https://blogs.sap.com/2019/08/29/currency-decimal-issue-jpy-krw-vnd-localization-rollout-japan-korea...

If this answer satisfies your question, kindly accept it and could you close the thread. Have a great day! 🙂

adamharkus
Participant
0 Kudos

Hi yoganandamuthaiah

The error is related to front-end SAPUI5 validation, but the blogs theme is ABAP backend.