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: 

SPELL_AMOUNT THAI

Former Member
0 Kudos

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

7 REPLIES 7

p190355
Active Contributor
0 Kudos

Hi,

For the FM: SPELL_AMOUNT

try Passing LANGUAGE = 'E'.

And check the table maintained in V_T015Z

Cheers,

Remi

0 Kudos
remi.kaimalb

Wow. Thank you very mush for your answer. I found spell wrong value I have to maintained this table.

Former Member
0 Kudos

Hi,

Have you enough space to display the Thai spelled amount ?

You can also try another font for the displayed field.

Issa

Former Member
0 Kudos

HI

in FM:SPELL_AMOUNT

Pass the System language in LANGUAGE field.

Former Member
0 Kudos

Hi guys,

Printing in English is not a problem. There is enough space to print for... Checked that already.

...

Someone anyother idea's?

0 Kudos

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.

0 Kudos

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