2008 Jul 16 6:45 AM
Hi Experts,
I want to know the function module to convert currency in words.please give me function module name.
Regards,
Siva
Hi Experts,
I want to know the function module to convert currency in words.please give me function module name.
Regards,
Siva
2008 Jul 16 6:46 AM
2008 Jul 16 6:49 AM
for example currency 'INR' function module should return 'Indian currency'
2008 Jul 16 7:02 AM
Hi Siva,
Write the following Code..
Select LTEXT
INTO W_LTEXT
FROM TCURC
WHERE WAERS = W_WAERS.
If Found Help Full Do Reward.
Regards.
Eshwar.
2008 Jul 16 6:07 PM
Hi,
Check the following code:
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_AMOUNT
Regards,
Bhaskar
2008 Jul 17 6:00 AM
Hi,
Function module SPELL_AMOUNT converts an amount or number into words. It can be used as follows:
1. Convert a number into words
To do this, the transfer parameters LANGUAGE and AMOUNT have to be entered.
2. Convert an amount into words
To do this, the fields LANGUAGE, CURRENCY, and AMOUNT have to be entered.
3. Set the number of places before and after the decimal point for an amount
To do this, the parameters CURRENCY and AMOUNT have to be entered. The LANGUAGE field must be transferred with the value SPACE! This option optimizes the runtime of the function module.
The structure SPELL transfers the converted amounts. The FB enters the number of places before and after the decimal point in the NUMBER and DECIMAL fields, the amount in words in the WORD and DECWORD fields, and the figure in words in the DIGnn fields. The numbers converted into words can be protected by a star or some other FILLER.
Check this link,problem will be solved-
Regards,
Sujit
2008 Jul 17 6:05 AM
Hi
Use FM HR_IN_CHG_INR_WRDS or SPELL_AMOUNT
Here is the sample code
DATA AMT_IN_NUM LIKE PC207-BETRG.
DATA AMT_IN_WORDS(100) TYPE c.
PARAMETERS: AMOUNT LIKE AMT_IN_NUM.
CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
EXPORTING
amt_in_num = AMOUNT
IMPORTING
AMT_IN_WORDS = AMT_IN_WORDS
EXCEPTIONS
DATA_TYPE_MISMATCH = 1
OTHERS = 2
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE AMT_IN_WORDS.With Regards
Nikunj Shah
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |