‎2007 Jun 18 8:34 AM
please explain about import and export paramters of spell_amount
‎2007 Jun 18 8:40 AM
data : TOTAL1(10) TYPE I.
DATA begin of in_word occurs 0.
include structure spell.
data end of in_word.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = TOTAL1
CURRENCY = CHWAERK
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = in_word
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3Regards
Gopi
‎2007 Jun 18 8:38 AM
Hi
Import parametrs
AMOUNT 0
CURRENCY LIKE SY-WAERS SPACE
FILLER SPACE
LANGUAGE LIKE SY-LANGU SY-LANGU
Export paramter
IN_WORDS LIKE SPELL
Reward points for useful Answers
Regards
Anji
‎2007 Jun 18 8:39 AM
Hi,
DATA v_int TYPE i VALUE '1000'.
DATA words LIKE SPELL.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = v_int
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = words
.
WRITE words-word.
Please close the thread if it is answered
Thanks
hari krishna
‎2007 Jun 18 8:39 AM
see the below example for all the parameters of the Function Module .....
REPORT ZSPELL.
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '1234510'.
SY-TITLE = 'SPELLING NUMBER'.
PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
FORM SPELL_AMOUNT USING PWRBTR PWAERS.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = PAMOUNT
CURRENCY = PWAERS
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
ENDFORM. " SPELL_AMOUNTGirish
‎2007 Jun 18 8:40 AM
data : TOTAL1(10) TYPE I.
DATA begin of in_word occurs 0.
include structure spell.
data end of in_word.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = TOTAL1
CURRENCY = CHWAERK
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = in_word
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3Regards
Gopi
‎2007 Jun 18 8:40 AM
Hi,
chk this prog by increasing the amount
REPORT ZSPELL.
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '123451022343333235'.
SY-TITLE = 'SPELLING NUMBER'.
PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
FORM SPELL_AMOUNT USING PWRBTR PWAERS.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = PAMOUNT
CURRENCY = PWAERS
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
ENDFORM. " SPELL_AMOUNT
<b>Reward points</b>
Regards
‎2007 Jun 18 4:29 PM
‎2007 Jun 18 4:32 PM
thanq for answer could you explain how we can cover decimals in this
‎2007 Jun 18 7:47 PM
Hi
Pass the amount after Decimal to the Spell amount seperately and then concatenate the two parts of the amount.
For example : 30.60 USD
Store the amount in a character string. Split the string at decimal point using a SPLIT statement.
DATA: amount_total(10),
round(7),
dec_part(3).
DATA: dec(1) TYPE c VALUE '.',
amount_total = '30.69'.
SPLIT amount_total AT dec INTO round dec_part.
First pass variable 'round' to Spell_amount and then in the second call pass variable 'Dec_PART' and concatenate the two results.
Reward points if helpful.
Regards
Waseem Imran
then concatenate the results. and the resulting string will be 30 Dollars 60 Cents.