Curious Case of ATC – Priority 2 – Low Performance Operations on Internal Tables

This week I faced an interesting issue. There was no syntax error in the code and it worked perfectly but ATC did not like my way. It complained with a Priority 2 issue stating, “Possible sequential read on a generically typed table”. And the title of the ATC message was even scarier, “Low Performance Operations on Internal Tables”.

How on earth can one get this Quality Approved if it shows Low Performance error? On top of it, we all know how strict those Quality Reviewers are. They just look for opportunity to reject your development and make you put extra effort just to pass the QA review even though it might just be some cosmetic issue or typo.

Let me elaborate the issue. In one of the implicit enhancements I was forced to write the below logic to meet the demands of the complex business requirement. Should we use implicit enhancement or not, let’s keep that debate for some other day. Today, we have another cat to bell.

ACCOUNT_LINES is from standard SAP object and gets populated in a standard class and I wanted to DELETE a line from that table. Straight forward. Isn’t it?

I planned to move ACCOUNT_LINES data to using dynamic DATA(ps_tabname) = ‘account_lines’ and then ASSIGN (ps_tabname) to .

Well I was trying to delete an entry from dynamic table declared as ANY TABLE and there was no syntax error and code worked fine. They why was ATC check showing the DELETE line as an issue?

This is the ATC message which I got.

I tried to fool ATC using pseudo comment “#EC CI_ANYSEQ. But it did not suppress the issue.

Investigative Questions from group members and my response:

If you use DELETE TABLE you must specify primary key, in your case it works because it uses implicit full-table key, I assume. Did you try using only DELETE statement?
Ans: If I use DELETE I’m getting error.

Can you share declaration of FS_ACCOUNT_LINES and please?
Ans: is of TYPE ANY TABLE.

FS_ACCOUNT_LINES is an in-line declaration in the loop

Before you can use: DELETE WHERE (‘KOART‘) EQ ‘K‘ AND (‘SHKZG‘) EQ ‘S‘.
Ans: I tried that, but ATC check still cries foul.

What is ATC telling?
Ans: ATC message below.

Have you tried DELETING with INDEX?
Ans: Yes, all works fine code wise but getting the same error in ATC.

Where do you fill ACCOUNT_LINES table?
Ans: ACCOUNT_ LINES is filled in a standard class and I want to delete a line from that table.

Look the group members fired some questions. Although they could not provide me the exact solution, but they surely did try to help me. Do not worry about the outcome. Your intentions should be right.

When one member asked me to show the ATC message, I happened to read it one more time. The message says, Possible sequential read on a generically typed table. This keyword Generically caught my eyes. I wondered, isn’t TYPE ANY TABLE a generic type?

In fact, the hint was already there in the message. Something clicked in my mind and I planned to declare it as TYPE INDEX TABLE. I do not remember using TYPE INDEX TABLE that often.


Check, initially I had declared TYPE ANY TABLE.

I redeclared it as TYPE INDEX TABLE.

Since is of TYPE INDEX TABLE, I tried to DELETE using INDEX. And, Bingooo…. It worked. ATC liked my new way. No more ATC issue for the DELETE statement.

Lesson learnt: If we try to DELETE a row of table of TYPE ANY using INDEX or DELETE using Work Area, ATC treats it as an issue. May be it considers the table to be too generic. So, in such cases, declare the table as INDEX Table and confidently DELETE using INDEX.