on 09-06-2008 8:53 PM
Mapping conversion of source value 4448601.75 to target value 4448601 or source value 999999.99 to target value 999999
Here standard functions like round, floor, ceil..etc, will not work because they will convert source value 4448601.75 to 4448602 and source value 999999.99 to 1000000.
Also i may have blank or white spaces coming in front of the source value from R/3 side like _____999999.99 and i want the value at the target side as _____999999. Here _____ representing blank or white spaces.
How i will do the mapping, can someone help me out.
Thanks,
Ashish
Edited by: Ashish Soni on Sep 6, 2008 9:53 PM
Soni,
Write one user defined function to get the value before . and one user defined function to count the no. of spaces. Then concating these two should give you the correct result.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>Here standard functions like round, floor, ceil..etc, will not work because they will convert source value 4448601.75 to 4448602 and source value 999999.99 to 1000000.
No....! The floor function can be used. It returns the largest integer that is not greater than the passed value. However this will also trim the spaces.
So u can write a UDF that accept the number and substring till the decimal point and returns it.
Try this.. It works..
public String converv(String a,Container container)
{
return a.substring(0,a.indexOf('.'));
}
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.