Skip to Content

table invalid index

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jan 19, 2015 at 09:44 AM

    Hi ami,

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

    What is data type of lv_idx?

    Thanks,

    Marimuthu.K

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 19, 2015 at 10:01 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 20, 2015 at 02:19 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 20, 2015 at 05:09 AM

    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.


    Add comment
    10|10000 characters needed characters exceeded