05-27-2008 11:44 AM
DATA : invamt TYPE vbrp-netwr.
.
DATA : t_spell LIKE spell OCCURS 0 WITH HEADER LINE.
DATA : amtword(255) TYPE c.
invamt = 100100.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
amount = invamt
currency = 'INR'
filler = space
language = 'E'
IMPORTING
in_words = t_spell
EXCEPTIONS
not_found = 1
too_large = 2
OTHERS = 3.
CONCATENATE 'RS. ' t_spell-word ' AND ' t_spell-decword ' ONLY ' INTO amtword.
WRITE : /1 amtword.
*********************************************
Amount in word printing as RS.ONE HUNDRED THOUSAND ONE HUNDRED ANDZERO ONLY
But I want ONE LAKH ONE HUNDRED ONY.
HOW IT WILL COME?
REGARDS
MANOJ PISE.
05-27-2008 11:47 AM
05-27-2008 11:54 AM
05-27-2008 12:03 PM
Use Program RF_SPELL to get total amount in WORDS.
But i am not sure we can get like "Rupees three hundred thirty and forty only" instead it would be like THREE HUNDRED THIRTY FORTY.
Or else u can use the same FM spell_amount to get the amount in words. Here u may need to combine the 2 fields in the structure of exporting parameters like WORD and DECWORD.
If u need to get Ruppes or Dollar infront of it u may have to pick it from table TCURC, i believe....by putting currency as input....
(or)
CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
***********Reward points,if found useful