cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping Sumation Problem

Former Member
0 Kudos

Hi,

I have structure as

<Header>

<Segment>

<field1>12345667890.00</field1>

</Segment>

<Segment>

<field1>12345667890.00</field1>

</Segment>

</Header>

<Trailer>

<sum>sumof all Segemnt.field1</sum>

<Trailer>

For this I have written Advance function in message mapping with Segment.filed1 as argumnet. As in message mapping Advance funtion input and out are string type,I need to convert this to doule with function Double.parseDouble(a<i>) before taking sum. This converts my data in IEEE format ie 1.23456676E10. I want output in simple format. Can any one suggest solution.

-Kavita

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kavita

You can use the NumberFormat function to convert double into some specific format.

Let say your double data type is

<b>double d = 78798858.567;</b>

Now use the <u>NumberFormat</u> as shown below.

<b>

NumberFormat frm = new DecimalFormat("#.###");

String s = frm.format(d);

System.out.println(s);</b>

This will help you to print data in nonE format

pooja

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kavitha,

Define a simple function, for which the input would be the output of the Advanced function. In the simple function customize the return value as per your requirement.

Regards,

Sreenivas.