Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

spell_amount

Former Member
0 Likes
707

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
657

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.

5 REPLIES 5
Read only

Former Member
0 Likes
658

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.

Read only

0 Likes
657

thant for you responce

i tried to check like that but my code is not triggring

Read only

0 Likes
657

Hi Santosh,

Could you please try to activate the Script debugger (SE71) to find out why your coding is not getting triggered?

Regards,

John.

Read only

0 Likes
657

Hi,

in script, did you write something like this?

Perform SPELL_AMOUNT in program ZSPELLAMOUNT.

using &Field1&

changing &Field2&

Endperform.

Regards,

Sooness

Read only

dev_parbutteea
Active Contributor
0 Likes
657

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.