Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between two amount fields

Former Member
0 Kudos

Hi,

I have got two amount fields and I need to find the difference between those two.

They are in below formats

1.800,00

18,00

Is there any FM to find the difference.

Thanks,

ABAPer.

4 REPLIES 4

Former Member
0 Kudos

Why do you need a FM for this simple mathematical function, when you can subtract one from another and store it in the resulting variable. Calling a FM will be more lines of Code.

-Aman

Former Member
0 Kudos

hey,

Just subtract the first number from the second and then store its value in a variable.For this why do you need a FM.

Regards,

Midhun Abraham

Former Member
0 Kudos

HI,

Simply subtract the two fields on the field.

The resulatant variable will have the result.

matt
Active Contributor
0 Kudos

What if the two values are type c? So the commas etc. are really in the value. He'll have to convert to type P first, then subtract.

Again - it's programming that solves this - not "function module". How do you think function modules get written in the first place - by programming!