cancel
Showing results for 
Search instead for 
Did you mean: 

table invalid index

Former Member
0 Kudos

Hello everyone.

I have a webdynpro program which call a pdf form.

sometimes,some of our users are getting a dump "TABLE_INVALID_INDEX".

The error is on row which try to delete itab on specific index . (delete itab index lv_idx).

When the same pdf is being called from a regular sap program (not webdynpro), it runs OK.

Any ideas what can be the problem?

thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi ami,

The lv_indx value 0 is the reason for dump.

you put condition before delete statement like below.

if lv_index is not initial.

delete itab index lv_index.

endif.


ramakrishnappa
Active Contributor
0 Kudos

Hi Ami,

Either lv_idx has value 0 or the value which is more than the no. of lines in table.

You need to find out how the value lv_idx is getting passed/filled.

Try to check condition before deleting as below

describe itab.

if lv_idx > 0 and lv_idx <= sy-tfill.

delete itab index lv_idx

endif.

Regards,

Rama

Former Member
0 Kudos

Hi,

I think there is no conditional check before deleting records from internal table.If Delete statement is written with index as below,

For eg: DELETE itab INDEX lv_index.

In above example, if the index value SY-TABIX = 0, then the error may occur.So that you may be able to analyze why the index value is Zero.

Thanks

KH

Former Member
0 Kudos

Hi ami,

Could you tell me what value you are getting in lv_idx?

What is data type of lv_idx?

Thanks,

Marimuthu.K

Former Member
0 Kudos


iv_idx is from type i.

I think the value i'm getting is 0 but i'm not sure because i can not put debug on that code

because it does not happen consistently and not for all users.

Former Member
0 Kudos

Hi,

Try this  and check.

DATA LV_INDEX TYPE SY-TABIX.

Thanks

KH