cancel
Showing results for 
Search instead for 
Did you mean: 

DTP Error : TABLE_INVALID_INDEX

11-01-2021 4:35 AM
2425 views 3 comments
0 Likes
SAP Managed Tags
Subscribe

Dear BW Experts,

Yesterday Basis did the system Upgrade successfully. I have restarted the process chain. While running DTPs are failing. As i checked the error, the message is Internal session terminated with a runtime error TABLE_INVALID_INDEX (see ST22). This error was occurring on 2 to 3 DTPs. Please find the below snap for your reference. There are some DTP routines written. There is no recent changes in DTP routine and this load is running from 2015 onwards. Please find the routine written in DTP.

form c_PSPID
tables l_t_range structure rssdlrange
using i_r_request type ref to IF_RSBK_REQUEST_ADMINTAB_VIEW
i_fieldnm type RSFIELDNM
changing p_subrc like sy-subrc.
* Insert source code to current selection field
*$*$ begin of routine - insert your code only below this line *-*
DATA: l_idx LIKE sy-tabix.
READ TABLE l_t_range WITH KEY
fieldname = 'PSPID'.
l_idx = sy-tabix.
DATA: lt_capex TYPE STANDARD TABLE OF /bic/tzm01capex,
ls_capex TYPE /bic/tzm01capex.
SELECT * FROM /bic/tzm01capex
INTO TABLE lt_capex.
LOOP AT lt_capex INTO ls_capex.
READ TABLE l_t_range WITH KEY
fieldname = 'PSPID'.
l_idx = sy-tabix.
l_t_range-low = ls_capex-/bic/zm01capex.
l_t_range-high = ''.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
APPEND l_t_range.
MODIFY l_t_range INDEX l_idx.
ENDLOOP.
p_subrc = 0.
*$*$ end of routine - insert your code only before this line *-*
endform.

Thanks.

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

ThorstenHoefer
Active Contributor
0 Likes

Hi,

please check your code. You usean append and modify

APPEND l_t_range.
MODIFY l_t_range INDEX l_idx.

Try something like this:

tables l_t_range type atandart table of rssdlrange,
       wa_range like line of l_t_range.

delete l_t_range where fieldname = 'PSPID'.
wa_range-fieldname = 'PSPID'. 
wa_range-sign= 'I'. 
wa_range-option = 'EQ'. 

LOOP AT lt_capex INTO ls_capex.
  wa_range-low = ls_capex-/bic/zm01capex.
  insert wa_range into table l_t_range.
endloop.