cancel
Showing results for 
Search instead for 
Did you mean: 

UI5 Currency with no Decimals JPY vs COP

rb
Active Participant
0 Kudos

Hello together,

we are on 1.96.12 at the moment and have an issue with XML view Currency conversion.

We use type:'sap.ui.model.type.Currency'

We have currencies with no decimals like JPY (Japan) and COP (Colombia).

For JPY it works as expected:

For COP not:

TCURX in Backend is correct.

Any Ideas why COP is not correctly rendered??

Thank You Richard

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

richard.brnning2

this link may help for you

https://juejin.cn/post/7077706615247339533

Accepted Solutions (1)

Accepted Solutions (1)

rb
Active Participant
0 Kudos

Hello together,

it was a problem on the backend side. The currency field was not correctly referenced. Why it did work sometimes I dont understand

Answers (1)

Answers (1)

leonikussmaul
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Richard,

I believe this is normal behaviour for these two currency locales.

To remove the decimals for COP, you can try adding formatOptions in the view.

<Text text="{
	parts: ['/amount', '/currency'],
	type: 'sap.ui.model.type.Currency',
	formatOptions: {
			preserveDecimals : false
			}
	}" />
rb
Active Participant
0 Kudos

Hi,

thanks for your Input. I will play around with it.

It wonders me because I want the decimals on currency with decimals like EUR.

So at the Moment I have the following Situation

EUR / Has 2 decimals -> works as expected (has decimals)

JPY / Has no decimals -> works as expected (no decimals)

COP / Has no decimals -> works not ( has decimals)