‎2008 Jan 17 7:58 AM
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
‎2008 Jan 17 8:03 AM
Hi Santhosh,
Can you point out what is going wrong? Did you try to put a break-point in your code to be sure that at least "WORD" is getting the value you expected?
Regards,
John.
‎2008 Jan 17 8:03 AM
Hi Santhosh,
Can you point out what is going wrong? Did you try to put a break-point in your code to be sure that at least "WORD" is getting the value you expected?
Regards,
John.
‎2008 Jan 17 8:14 AM
thant for you responce
i tried to check like that but my code is not triggring
‎2008 Jan 17 8:19 AM
Hi Santosh,
Could you please try to activate the Script debugger (SE71) to find out why your coding is not getting triggered?
Regards,
John.
‎2008 Jan 17 8:34 AM
Hi,
in script, did you write something like this?
Perform SPELL_AMOUNT in program ZSPELLAMOUNT.
using &Field1&
changing &Field2&
Endperform.
Regards,
Sooness
‎2008 Jan 17 8:11 AM
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 index 1.
IF sy-subrc = 0 .
check i_intpar-value CO '0123456789 '.
wa_RWBTR = i_intpar-value.
else.
exit.
ENDIF.
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.
READ TABLE i_outpar index 1.
if sy-subrc = 0.
WRITE WORD TO i_outpar-value.
CONDENSE i_outpar-value NO-GAPS.
MODIFY i_outpar INDEX sy-tabix TRANSPORTING value.
endif.
ENDIF.
ENDFORM.