cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting the output (currency with decimals)

Former Member
0 Kudos

hi all,

i want to format the output of the currency field. Right now it displays the exact value like say 23 or 43.5 etc. But my requirement is i need it to display in a standard format as 23.00 , 43.50 , 565.00 etc. i,e if there is no decimals then it should be filled with zero's.

I have gone through some of the threads which speaks of formatting the output if it is a value node. But here i have directly bounded the table to a model node.

Domian level datatype of the field is Currency in R/3. After model import in dictionary it is showing as decimal.

How can i achieve this?I Appreciate if someone can help me on this.

Regards,

G Nid

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

ouble dbValue = 123123123.12312312;

DecimalFormat df = new DecimalFormat("00.0000");

wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(df.format(dbValue));

Use the above code...

Regards

AM

Former Member
0 Kudos

still iam getting the error in the second line.

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

Go thru this link it might helps you.

Change the currency data type char and specify the length.

Thanks,

Lohi.