cancel
Showing results for 
Search instead for 
Did you mean: 

smartform - amoount in words

Former Member
0 Kudos

my form name is zretail_invoice.the field i want to convert is wa_final-gtotal.i want this to be converted the value in gtotal to words.

how to do in smartforms by using function module

spell_amount

hr_chg_in_words

in steps please...

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

same reply

Former Member
0 Kudos

Hi,

Hope the following Threads will help you regarding your problem.

Thanks.

Nitesh

former_member188685
Active Contributor
0 Kudos

This is discussed many times in ABAP forum and Form printing. Please search before posting any Question.

Former Member
0 Kudos

Hi

Check this:

DATA : T_SPELL LIKE SPELL,
V_TOTAL TYPE p decimals 2 VALUE '1985.64'.
DATA : PAMOUNT TYPE p decimals 2  .
PAMOUNT = V_TOTAL.
PERFORM SPELL_AMOUNT USING PAMOUNT.
*WRITE: T_SPELL-WORD, 'and', T_SPELL-DECWORD.
 
FORM SPELL_AMOUNT USING AMOUNT.
 
data : l_num type SPELL-NUMBER.
 
l_num = amount.
 
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = l_num
*CURRENCY =
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
 
 
write : T_SPELL-WORD.
 
 
l_num = ( amount * 100 ) mod 100.
 
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = l_num
*CURRENCY =
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
 
 
write : T_SPELL-WORD.
 
 
 
ENDFORM. "SPELL_AMOUNT

Regards,

Vishwa.