2010 Feb 22 9:42 AM
hi friends i am running the report RF_SPELL but in the output it is giving wrong value.
like if i use the default value of the the program that is : 123456789.12
then the output for the decimal part is :
one thousand two hundered.what i want is it should be : twelve.
what could be the problem.
hi friends i am running the report RF_SPELL but in the output it is giving wrong value.
like if i use the default value of the the program that is : 123456789.12
then the output for the decimal part is :
one thousand two hundered.what i want is it should be : twelve.
what could be the problem.
2010 Feb 22 9:43 AM
code is :
REPORT RF_SPELL.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.
PARAMETERS:
SPRACHE LIKE SY-LANGU DEFAULT SY-LANGU,
WAEHRUNG LIKE PAYR_FI-WAERS DEFAULT 'DEM',
BETRAG LIKE PAYR_FI-RWBTR DEFAULT '123456789.12',
FILLER(1) TYPE C DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK 1.
TABLES: PAYR_FI, SPELL.
AT SELECTION-SCREEN OUTPUT.
IF WAEHRUNG IS INITIAL.
PAYR_FI-WAERS = '0'.
ELSE.
PAYR_FI-WAERS = WAEHRUNG.
ENDIF.
AT SELECTION-SCREEN ON WAEHRUNG.
IF WAEHRUNG IS INITIAL.
PAYR_FI-WAERS = '0'.
ELSE.
PAYR_FI-WAERS = WAEHRUNG.
ENDIF.
START-OF-SELECTION.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
LANGUAGE = SPRACHE
CURRENCY = WAEHRUNG
AMOUNT = BETRAG
FILLER = FILLER
IMPORTING
IN_WORDS = SPELL.
PERFORM BETRAG_SCHREIBEN.
WRITE:
/'SPELL-DIG15', SPELL-DIG15,
8 SPELL-DIG14,
15 SPELL-DIG13,
22 SPELL-DIG12,
29 SPELL-DIG11,
36 SPELL-DIG10,
43 SPELL-DIG09,
50 SPELL-DIG08,
/ SPELL-DIG07,
8 SPELL-DIG06,
15 SPELL-DIG05,
22 SPELL-DIG04,
29 SPELL-DIG03,
36 SPELL-DIG02,
43 SPELL-DIG01.
SKIP 2.
WRITE:
/ SPELL-WORD(64),
/ SPELL-WORD+64(64),
/ SPELL-WORD+128(64),
/ SPELL-WORD+192.
SKIP.
WRITE:
/ SPELL-DECWORD(64),
/ SPELL-DECWORD+64(64).
SKIP 2.
WRITE:
/ SPELL-NUMBER,
SPELL-DECIMAL.
FORM BETRAG_SCHREIBEN.
NEW-PAGE NO-TITLE.
IF WAEHRUNG EQ SPACE OR WAEHRUNG EQ '0'.
WRITE:
/(23) BETRAG CURRENCY '0'.
ELSE.
WRITE:
/(23) BETRAG CURRENCY WAEHRUNG, WAEHRUNG.
ENDIF.
SKIP 2.
ENDFORM.
2010 Feb 22 12:08 PM
is there any kind of settings in the system configuration for each curency type(like INR.USD,EURO) because when i take the currency as INR then the decimal part is read correctly