on 05-28-2007 1:44 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nalin
Mudit's code should work
Regards
krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.