cancel
Showing results for 
Search instead for 
Did you mean: 

mapping issue

Former Member
0 Kudos

I have a problem in mapping.

sender has 13 digt number.....receiver has 15 digit.

here....

sender has 3 decimals(it doesnt have any decimal separator,we need to just imagine that last three digits are decimal.).While sending it to receiver,we should drop the decimals and send only the number...

for example:

if we get 123456789 from sender.......123456 would be the out put.

if we get 1234567890123 from sender...then 1234567890 would be the output...

any answers how do that......any UDF please...

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Create a simple UDF and pass the input to it.

Use the following code in the UDF.


public String udf(String a,Container container)
{
return a.substring(0,(a.length()-3));
}

Thanks

SaNv...

Former Member
0 Kudos

Hi...I am sorry

....

if we want to get 123 from sender....then it would be 0000000123000 from sender.....

i mean it would get appended with zeros .....can we use substring here...

Former Member
0 Kudos

Hi,

you could first divide with 1000 and then use the result as input for the floor function.

You should use the div function only if:

1) You have minimum XI 3.0 SP 18 or PI 7.0 SP 9.

2) The parameter com.sap.aii.mappingtool.flib3.bigdecimalarithmetic in exchange profile is set to true.

Regards

Patrick

Edited by: Patrick Koehnen on Oct 7, 2008 5:14 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

What if there is only 123? What will be result. is it 0?