cancel
Showing results for 
Search instead for 
Did you mean: 

Floating point values

Former Member
0 Kudos

Hi all;

Please help.

I am getting floating point values in my source IDoc like 1.234- but while inserting into the ODS system i need the negative sign before 1.234.

How to achive this out.

Nalin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can achive this by using graphical mapping UUser defined function.

Mapping source fieldremove context UDF --- target field

UDF

for(int i=0;i<Float.length;i++)

{

if(Float<i>.endsWith("-"))

{

result.addValue("-"+Float<i>.substring(0,Float<i>.length()-1));

}

else

{

result.addValue(Float<i>);

}

}

Mudit

Award points if it helps

Former Member
0 Kudos

Thanks mudit it worked

Answers (2)

Answers (2)

Former Member
0 Kudos

Nalin

Mudit's code should work

Regards

krishna

Former Member
0 Kudos

Hi,

/******UDF*******/

String str = "1.234-";

int i = str.indexOf("-");

str = str.substring(0,i);

return(str);

sourceValue>UDF>Target

Cheers!

Samarjit

Message was edited by:

Samarjit Dey