cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping An INVOIC01 idoc to destination - issues with negative deductions

former_member233999
Participant
0 Kudos

Hi All,


I'm trying to pass a discount which is held under segment

E1EDP26

discounts have the qualifier of 007 or 013. This current discount is coming in as -3.55 id like to substract that from the price.


I've tried converting the negative to a positive using ABS and also by multiplying the negative x -1 , this doesnt work either as i've got a list of positive numbers in with the negative. How could i only handle the negative numbers? I've tried using if less than -0.00 then pass and use ABS against it but keep getting the below error in message mapping.

Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Cannot cast '3.55-' to decimal number] in class com.sap.aii.mappingtool.flib7.Arithm method abs[3.55-, com.sap.aii.mappingtool.tf7.rt.Context@6a82a473]...check logs for detailed error
See error logs for details


Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

Hi George!

Use endWith() function to check for negative sign and replaceString("-", "") followed by concat("-", str) to place minus at right position.

Regards, Evgeniy.

Answers (1)

Answers (1)

former_member233999
Participant
0 Kudos

Hi Evgeniy,

I did it thanks to your answer as below:

convert-from-negative-number-to-positive.png