on 03-04-2008 11:52 AM
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 .
i got answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.