Application Development 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: 

Code Inspector issue for Read table and Loop at

tejaspat2009
Member
0 Kudos

Hello,

Kindly help me in removing below Code inspector issue which is under

Robust programming=> Search problematic statement for result of SELECT/OPEN CURSOR without order by=> information

1. message code READ_IDX_1

"Read table ...INDEX 1 for result of statement at method.

Actual code: READ TABLE lt_dfkkop ASSIGNING FIELD-SYMBOL(<fs_open>) INDEX 1.

2. Message code LOOP_EXIT

"LOOP AT itab. EXIT/RETURN/LEAVE ...for result of statement at method.

Actual code: LOOP AT lt_dfkkop_op ASSIGNING <fs_open> WHERE pymet = 'B'

AND pygrp NE space.

ev_status = text-003.

EXIT.

ENDLOOP.

Kindly help me in these two issues.

Regards

Tejas

2 REPLIES 2

Sandra_Rossi
Active Contributor
0 Kudos

Please improve the formatting it's difficult to read.

.

1. message code READ_IDX_1 "Read table ...INDEX 1 for result of statement at method.

READ TABLE lt_dfkkop ASSIGNING FIELD-SYMBOL(<fs_open>) INDEX 1.

.

2. Message code LOOP_EXIT "LOOP AT itab. EXIT/RETURN/LEAVE ...for result of statement at method.

LOOP AT lt_dfkkop_op ASSIGNING <fs_open> 
    WHERE pymet = 'B'
      AND pygrp NE space.
  ev_status = text-003.
  EXIT.
ENDLOOP.

raymond_giuseppi
Active Contributor
0 Kudos

Did you try to define lt_dfkkop as a sorted type table or fill it with a statement that insure record order (e.g. SELECT .... ORDER BY ...)