01-17-2008 10:15 AM
Hi,
i tried to display amount in words with using itcsy structure. because
my driverprogram is standard one. i writeen code but i am getting dump and i am not getting value in i_oupar table i am pasting my cod ebellow
PROGRAM ZSPELLAMOUNT.
FORM SPELL_AMOUNT TABLES I_INTPAR STRUCTURE ITCSY
I_OUTPAR STRUCTURE ITCSY.
DATA:I_PAYR TYPE TABLE OF PAYR,
WA_PAYR TYPE PAYR.
DATA: WA_RWBTR TYPE RWBTR.
DATA: WA_ZBUKR TYPE DZBUKR.
DATA: WORD TYPE string.
DATA: wa_ZNME1 TYPE DZNME1.
READ TABLE i_intpar WITH key name = 'payr-ZNME1'.
IF i_intpar-value co'0123456789'.
UNPACK i_intpar-value TO wa_znme1.
else.
wa_ZNME1 = i_intpar-value.
endif.
select rwbtr znme1 from payr
into corresponding fields of table i_payr
where znme1 = wa_znme1.
*LOOP AT I_PAYR INTO WA_PAYR.
READ TABLE i_PAYR INTO wa_PAYR WITH KEY RWBTR = WA_RWBTR.
*ENDLOOP.
READ TABLE I_OUTPAR WITH KEY NAME = 'WA-RWBTR'.
WRITE WA_RWBTR TO I_OUTPAR-VALUE.
CONDENSE i_outpar-value NO-GAPS.
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
.
APPEND ipayr_final.
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 'IPAYR-RWBTR'.
WRITE WORD TO i_outpar-value.
*
CONDENSE i_outpar-value NO-GAPS.
MODIFY i_outpar INDEX sy-tabix TRANSPORTING value.
ENDFORM.
01-17-2008 10:35 AM
Hi
u have to write a routine in ur script text editor.
PERFORM ZNAME IN PROGRAM ZVBAP_FETCH.
USING &VBDKA-VBELN&
CHANGING &VTEXT4&
CHANGING &KNVK-PARGE&
ENDPERFORM.
This is the example routine.write the code in the above format in ur script-text editor and instead of using spell amount function module use this FM.
HR_IN_CHG_INR_WRDS.
I hope this thing will help you.
Reward if useful
Thanks and Regards,
Arun.j
01-17-2008 10:35 AM
Hi
u have to write a routine in ur script text editor.
PERFORM ZNAME IN PROGRAM ZVBAP_FETCH.
USING &VBDKA-VBELN&
CHANGING &VTEXT4&
CHANGING &KNVK-PARGE&
ENDPERFORM.
This is the example routine.write the code in the above format in ur script-text editor and instead of using spell amount function module use this FM.
HR_IN_CHG_INR_WRDS.
I hope this thing will help you.
Reward if useful
Thanks and Regards,
Arun.j
01-17-2008 11:02 AM
hi santosh
Your Fm is correct and even logic seems correct , just check that u have place ur perform ar right place .
put a break point on this Form and checl whether value is coming in internal table.
hope it helps.
rewards point if it helps u
01-17-2008 11:06 AM