Skip to Content
0
Former Member
Jan 17, 2008 at 07:58 AM

spell_amount

43 Views

Hi,

my reqirement is in one of my window i need to dispaly amount in words.

here driver program is stanard one .

i tried to dispaly that one with itcsy structure but it si not working

i am pasting my code bellow

PROGRAM ZSPELLAMOUNT.

FORM SPELL_AMOUNT TABLES I_INTPAR STRUCTURE ITCSY

I_OUTPAR STRUCTURE ITCSY.

DATA: WA_RWBTR TYPE RWBTR.

DATA: WA_ZBUKR TYPE DZBUKR.

DATA: WORD TYPE IN_WORDS.

READ TABLE i_intpar WITH KEY name = 'PAYR-RWBTR'.

IF i_intpar-value CO '0123456789 '.

  • UNPACK i_intpar-value TO RWBTR.

ELSE.

wa_RWBTR = i_intpar-value.

ENDIF.

SELECT RWBTR

FROM PAYR

INTO wa_RWBTR

WHERE ZBUKR = wa_ZBUKR.

ENDSELECT.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = WA_RWBTR

  • CURRENCY = ' '

  • FILLER = ' '

  • LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = WORD

EXCEPTIONS

NOT_FOUND = 1

TOO_LARGE = 2

OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

READ TABLE i_outpar WITH KEY name = 'WORD'.

WRITE WORD TO i_outpar-value.

CONDENSE i_outpar-value NO-GAPS.

MODIFY i_outpar INDEX sy-tabix TRANSPORTING value.

ENDFORM.

here i need to spell the amount In of field RWBTR.

please give me solution .this is very urgent