cancel
Showing results for 
Search instead for 
Did you mean: 

calculation of percentage

Former Member
0 Kudos

i am new to abap. how to calculate the percentage of some amount field. and i want to pass that value to smartform. how to do that, and how to conver amount to discription i mean i want to display 3000 as three thousand plz help me .

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

i got answer

Azeemquadri
Contributor
0 Kudos

Use spell_amount.

Also try this thread.

Former Member
0 Kudos

Hi

For the percentage u need to use a numeric variable where to store the value:

PERC = NUM / SUM * 100.

I u can use the fm SPELL_AMOUNT in order to get the text of the amount.

Max

Former Member
0 Kudos

Function Module - CALCULATE_PERCENTAGE calculates the Percentage.

Function Module - SPELL_AMOUNT gives the desired description of the currency.

Hope this helps.

<REMOVED BY MODERATOR>

Regards

Vinayak

Edited by: Alvaro Tejada Galindo on Mar 4, 2008 2:07 PM

Former Member
0 Kudos

e.G. you have sold 1 bread fror 20 $.

it cost you to bake 17$.

means you have made 3$ win.

want to know how much percent that is?

3$ / 20 $ * 100 = 15%.

now call FM SPELL_AMOUNT.

Former Member
0 Kudos

hey i got what you r saying but the value is in some field for that field i have to caluculate percentage and i have to pass that value to another field then i forward that field to smartform.

dhruv_shah3
Active Contributor
0 Kudos

Hi,

If you want the calculated percentage to SmartForm then you have to create the structure and then pass that structure to the SmartForm Import parameters.

The logic for calculating the percentage remains the same as we have been doing so far in other Pro Languages.....

HTH,

Regards,

Dhruv Shah