Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Offline values

Hi guys,

For a few weeks now I've been meddling with the offline store and it's capabilities thanks to "Getting Started with Kapsel - Part 1".

I've succeeded opening, refreshing, closing the store. Now that I've read the data and saved it to the store, I'm trying to use it.

I have an issue with it.

Ex: As you can see on the right side, the values is correct 1323,39 / 2500,00 RON (credit usage, and credit limit) when I read them directly from the back-end.

But when I read them from the offline store, the value changes. I have 2.5e+3 instead of 2500.00 RON.

While debugging the request to and from the back-end system, I haven't seen a change in the value.

The view it's XMLView and the value is written like this:

number="{Clients>CreditUsage} / {Clients>CreditLimit}"

so no formats.

Do you guys have a clue why this happens ?

Thank you in advance,



Hi @Midhun,

"long back" ?

I used a formatter and now the value looks similar to the one done from back-end.

CreditUsage = parseFloat(CreditUsage);

CreditLimit = parseFloat(CreditLimit);

return ( oNumberFormatD2.format(CreditUsage) + " / " + oNumberFormatD2.format(CreditLimit) );

where  "oNumberFormatD2" is :"sap.ui.core.format.NumberFormat");

oNumberFormatD2 = sap.ui.core.format.NumberFormat.getIntegerInstance({ 

  maxFractionDigits: 2, 

  minFractionDigits: 2, 

  groupingEnabled: false });

What i'm afraid of is loosing value. For example: 1234567,89 RON to be ransformed in 1,2e+6 ... and when I format it back I get 1200000.00 RON. I'll have to check it out.

Basically is something like you described.



0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question