09-11-2008 7:11 AM
Hi,
I have used this function to get the text of the total amount, it did work.
What the problem I am facing is that, when text returned, it all lenght(even most part is empty) is displayed and consumes needless lines:
CALL FUNCTION 'SPELL_AMOUNT'
I mean imported text in IN_WORDS of this function is not condensed.
CONDENSE : spell-word no-gaps.
It is still displayed as 255 char long.
What is the problem?
Thanks.
deniz.
09-11-2008 8:03 AM
Hi
Refer this code:
DATA: MONEY LIKE PAYR-RWBTR,
IN_LETTERS LIKE SPELL,
text type string.
MONEY = 1000.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = MONEY
IMPORTING
IN_WORDS = IN_LETTERS
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
text = IN_letters-word.
condense text no-gaps.
WRITE :
/ MONEY,
text.
Regards,
Sravanthi
09-11-2008 7:13 AM
09-11-2008 7:33 AM
Hi,
You can try this.
data: text type string.
text = spell-word.
condense text no-gaps.
09-11-2008 8:03 AM
Hi
Refer this code:
DATA: MONEY LIKE PAYR-RWBTR,
IN_LETTERS LIKE SPELL,
text type string.
MONEY = 1000.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = MONEY
IMPORTING
IN_WORDS = IN_LETTERS
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
text = IN_letters-word.
condense text no-gaps.
WRITE :
/ MONEY,
text.
Regards,
Sravanthi
09-11-2008 8:14 AM
Hi,
you have used CONDENSE : spell-word no-gaps but the spell-word is a strusture with NUMBER, DECIMAL, CURRDEC, WORD , DECWORD etc.
so if we need to condense the word then we use :
CONDENSE spell-word-word no-gaps.
plz check below code:
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = amt
CURRENCY = curr
LANGUAGE = language
IMPORTING
IN_WORDS = WORDS
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
txt1 = WORDS-word.
condense txt1 no-gaps.
WRITE : txt1.
thanx.
Edited by: Dhanashri Pawar on Sep 11, 2008 9:15 AM