on 04-26-2011 12:23 PM
I am facing the difficulty during the step in smartform printing. Client is to have a printout in Bi-lingual (english+arabic), Arabic is printing fine. The maintenance language of smartform is arabic.
Problem arises:
I am using the function SPELL_AMOUNT to get the "Amount in Words" of Gross Value. In the print preview and printout, "Amount is words" are appearing as jumbled. for example,
Gross Value 238,476.00 SAR
Expected Amount in Words Two Hundred Thirty-Eight Thousand Four hundred Seventy-Six.
Appearing Amount in Words Seventy-Six Two Hundred Thirty-Eight Thousand Four Hundred.
Waiting for your valuable inputs.
Hi,
Try the below code:
Pass the amount after Decimal to the Spell amount seperately and then concatenate the two parts of the amount.
For example : 30.60 USD
Store the amount in a character string. Split the string at decimal point using a SPLIT statement.
DATA: amount_total(10),
round(7),
dec_part(3).
DATA: dec(1) TYPE c VALUE '.',
amount_total = '30.69'.
SPLIT amount_total AT dec INTO round dec_part.
First pass variable 'round' to Spell_amount and then in the second call pass variable 'Dec_PART' and concatenate the two results.
Regards,
sirisha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are concatenating the variables in reverse order
So that is coming like that.
Check the variables once.
Ragards,
Prakash.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
can you please apply SAP note 1417027 and check whether this solves your problem ?
Best regards,
Nils Buerckel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
additional to the language and currency, you also have to declare the amount with decimals; otherwise, it takes the last 2 digits as decimal.
238476 --> it delivers TWO THOUSAND THREE HUNDREDEIGHTY-FOUR in field Word and SEVENTY-SIX in field Decword.
238476.00 --> it delivers TWO HUNDRED THIRTY-EIGHT THOUSAND FOUR HUNDREDSEVENTY-SIX
(and ZERO in field Word)
Are you paying attention to field Decword in structure IN_WORDS ?? how do you build that information, so that decimals are displayed in the first place and then the rest of the amount ??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jorge: the amount as I mentioned in my question contains decimal places.
@Vishwa: we specify the currency as our u201Cdocument currencyu201D like SAR or USD.
@harish: in the debugging mode, amount in words are correct. Only issue remains about mis-placing. We have also view the country settings about decimal places in table T005X, and it is blank for country SA (I also tried other options mentioned in T005x table)
Hi,
In debugging mode , just check whether you are getting the amount in words in the correct format by using SPELL_AMOUNT FM. I think the last two digits before the decimal places are being displayed first.
Also check the decimal notation maintained for your country in T005X table.
Thanks & Regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have debug it.... in the debugging mode the amount in words appearing is correct... but at the print preview it is incorrect. we have tried 2 things.
1. we have written the function module " spell_amount " in the SMART FORM, but the incorrect result is displayed.
2.we have written the function module " spell_amount " in the MAIN PROGRAM, but the incorrect result is displayed.
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.