cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping conversion of source value 4448601.75 to target value 448601

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

santhosh_kumarv
Active Contributor
0 Kudos

>>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...