05-25-2009 12:53 PM
Hi guys,
I have a problem with a smartform and the usage of FM SPELL_AMOUNT. I am printing an invoice with a smartform and at the end I want to print the amount in words.
In debug mode, I see that the value of in_words-word is in THAI, when it's shown on the screen it gives me ######. The rest of the document is also correctly shown in Thai.
So now I am lost, can someone help me out?
Best regards,
Guido Koopmann
05-25-2009 1:37 PM
Hi,
For the FM: SPELL_AMOUNT
try Passing LANGUAGE = 'E'.
And check the table maintained in V_T015Z
Cheers,
Remi
12-15-2020 2:01 AM
Wow. Thank you very mush for your answer. I found spell wrong value I have to maintained this table.
05-25-2009 1:45 PM
Hi,
Have you enough space to display the Thai spelled amount ?
You can also try another font for the displayed field.
Issa
05-25-2009 1:53 PM
05-25-2009 1:54 PM
Hi guys,
Printing in English is not a problem. There is enough space to print for... Checked that already.
...
Someone anyother idea's?
05-25-2009 2:05 PM
Hi,
Please use below code.
TABLES: spell, "Transfer structure for amounts rendered in words
*spell.
DATA : v_word like *spell-word,
v_dec like *spell-decword,
dec(2).
Form AMT_IN_THAI.
move : ' ' to v_word,
' ' to v_dec.
*spell = spell.
call function 'SPELL_AMOUNT'.
exporting.
amount = it_wt-tax.
currency = 'THB'.
* Filler = int_filler +1.
language ='2 '.
importing.
in_words = spell.
in_deci = spell.
exceptions.
not_found = 4.
* spell-word = spell-word.
* spell-decword = spell-decword.
* spell-decimal = spell-decimal.
v_word = * spell-word.
v_dec = * spell-decword.
dec = * spell-decimal.
spell = * spell.
if dec eq'00 '.
concatenate v_word '$ ' into v_word.
else.
concatenate v_word '$' v_dec into v_word.
concatenate v_word 'money' into v_word.
endif. endif.
endform. "AMT_IN_THAI.
But must include information on unit tical Table: T015Z.
05-25-2009 2:24 PM
HI guru's,
I found out the error myself.
The smartform was not correctly translated, what happend was that eventually I wanted to print some thai text and english in one label of the smartform because it was not translated to THAI.
Best regards,
Guido