on 11-15-2005 10:04 AM
Hi
I want to format many price textview with a correct format number for currency choose by user. I see in simple type com.sap.dictionary.predefined.currency that contain a table with currency and description (for example USD-US Dollar), but it not contains nothing about format (number of decimal).
I try for a solution...
Thanks!
Andrea
Hi Andrea,
Create a datatype in your local dictionary say "Curr" and choose the Base Type "Currency".
It will give you a message. Choose Ok.
Then in the Representation Tab, click on the Edit Icon next to Format. Put a format like #,###.00##
depending on your requirement. The above format gives you result till 2 decimal places.
So now you should create a variable in your context of this new local type and attach this to the textview. Then copy the actual value to this new varaible.
Hope this is helpful.
Regards,
Shubham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Andrea,
You may alter format with ISimpleTypeModifiable at run-time:
final IWDNodeInfo niNode
= wdContext.nodeMyData().getNodeInfo();
/* Any node you are displaying */
final IWDAtrributeInfo niAttr
= niNode.getAttribute("MyCurrencyField");
niAttr
.getModifiableSimpleType()
.setFormat("#,###.000#");
VS
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.