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

error abap statement (processing an internal table)

1190_5939_439
Active Participant
4,810

error abap statement (processing an internal table)

1 ACCEPTED SOLUTION
Read only

gustavo_gil
Participant
3,633

Hi Harry!

Abinath is absolutely correct, but I would like to add to his comment that for best practices and better performance, you could replace modify + index or modify + workarea using field-symbols!

Best Regards,

8 REPLIES 8
Read only

SimoneMilesi
Active Contributor
0 Likes
3,633

Did you check if you are in one of the 3 options suggested by the dump log?

Read only

Abinathsiva
Active Contributor
3,633

Hi

Within the loop modifying the internal table needs work area or modify using index...

Read only

0 Likes
3,633

Can you give me an example ? Thanks ?

Read only

1190_5939_439
Active Participant
0 Likes
3,633

how to check it ?

Read only

gustavo_gil
Participant
3,634

Hi Harry!

Abinath is absolutely correct, but I would like to add to his comment that for best practices and better performance, you could replace modify + index or modify + workarea using field-symbols!

Best Regards,

Read only

matt
Active Contributor
0 Likes
3,633

Or a reference.

LOOP AT itab REFERENCE INTO DATA(record_line).
  recordline->field1 = ....
Read only

Sandra_Rossi
Active Contributor
3,633

You say "how to check it", is there anything you don't understand in the 3 (and even more) short dump points?

  1. You use "MODIFY itab". If it's inside a "loop at itab", then INDEX can be omitted. Otherwise (for instance "loop at other_itab") it fails.
  2. If your loop doesn't use the syntax "LOOP ... USING KEY" then ignore the remark, otherwise use "MODIFY ... USING KEY ..."
  3. If your "MODIFY itab" is after a "DELETE" it will fail. Don't do MODIFY if the line has been deleted.

I see that there are other points mentioned (4 concerning mesh, maybe other points).

There can be other possibilities like itab with keys and you try to change the keys, etc.

If you want more assistance, please provide your LOOP AT and exact type of itab.

Note that you are using an internal table with header lines, this has been obsolete for a long long time. Never use header lines (only exception: SELECT-OPTIONS).

Read only

1190_5939_439
Active Participant
0 Likes
3,633

because there is not value in the itab. if the same issue , Please check the internal table .