09-07-2009 10:57 AM
Hi all,
When i try to update an internal table i get the dump TABLE_ILLEGAL_STATEMENT.
My code is as below:
read table l_fieldcat with key fieldname = 'CCARD1' into wa_fieldcat.
wa_fieldcat-seltext_M = 'Credit Card 1'.
wa_fieldcat-seltext_l = 'Credit Card 1'.
wa_fieldcat-seltext_s = 'Credit Card 1'.
Modify l_fieldcat from wa_fieldcat.
do you think i should add the clause sy-index to it ?
thanks,
Gols
09-07-2009 10:59 AM
HI,
Using SY-INDEX will be good in above Modify statement.
Please tell exactly at which line this error come??
09-07-2009 11:03 AM
As per my understanding
seltext_M will be of 10 character and you are assigning more characters to it , hence dump is coming .
Hope it resolves your issue .
09-07-2009 11:03 AM
Hi,
If 'modify' statement is not in the loop, then use 'modify table' and
read table l_fieldcat into wa_fieldcat with key fieldname = 'CCARD1'.
09-07-2009 11:04 AM
Modify table is not in loop, i will try to use your solution now.
However my problem is solved using the sy-tabix addition,
thanks