Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Possible Sequential Read Access for a Sorted Table(SCI): LOOP with Where Clause.

Former Member
0 Likes
6,423

Hi All,

Can any body explain me why the SCI Warning occurs in LOOP ENDLOOP with WHERE Clause in Sorted Table.

Scenario:


Field f1 & f2 is a non-key field.

Loop at lt_sorted into lwa_sorted where ( f1 EQ value OR f1 EQ value ) AND f2 = value.

Endloop.

The above statement gives SCI warnings as Possible Sequential Read Access for a Sorted Table.

Thanks in advance.

Pradeep.

1 REPLY 1
Read only

Former Member
0 Likes
2,905

Well, if your two fields you use in the WHERE clause are no key fields, you will have a sequential read on the internal table. That's the hint from the check.

Now you can solve this by several changes.

If you table has many rows, I would prefer to define a secondary index with the two affected fields. First field should be F2 because it has only one equal condition in your WHERE.