Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

table_illegal_statment

Hi,

I am running a sapscript and calling a subroutine through it. I want to convert the numeric to words. Therefore i am using function module SPELL_AMOUNT. While executing the driver program i am getting an exception ILLEGAL_TABLE_STATEMENT while execution of the FM SPELL_AMOUNT.

Can anybody please help know what does this exception mean and what can i do to correct it?

Following is the code of the subroutine.

PROGRAM ZDHSUBPOOL.

FORM NUM_TO_WORD TABLES IN_PAR STRUCTURE ITCSY

OUT_PAR STRUCTURE ITCSY.

Tables zdhboardingpass.

DATA : SEAT_NUM TYPE zdhboardingpass-seatnum,

words LIKE spell.

READ TABLE IN_PAR WITH KEY NAME = 'SEATNUM'.

SEAT_NUM = IN_PAR-VALUE.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = SEAT_NUM

*CURRENCY = ' '

*FILLER = ' '

LANGUAGE = sy-langu

IMPORTING

IN_WORDS = words

EXCEPTIONS

NOT_FOUND = 1

TOO_LARGE = 2

OTHERS = 3.

OUT_PAR-value = words-word.

MODIFY OUT_PAR.

ENDFORM.

Regards,

Dhiraj

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question