Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Declaration of internal tables, an interesting case occurred

Hi folks,

I just found something funny to make some objects, have two internal tables called itab1 and itab2, the itab1 is a TYPE SORTED TABLE coming from a TYPES statement called y_itab as show below:



Already itab2 was declared LIKE TABLE OF itab1 as shown above.

When performing code verification, SAP returns me with these two warnings below:


My question ... Knowing that the LIKE statement is used to declare an object when another has already been declared in the program (correct me if I'm wrong) and that the itab2 equals itab1, why these warnings occur?


BR,


Raphael Pacheco.


PS: Do not post codes, post explanations, let's discourse oks?

replied

Let the correct answer:

The statement should be presented only itab2 LIKE itab1 because itab2 received itab1 of characteristics correctly. Despite giving warning, the itab2 LIKE TABLE OF itab1 statement causes the SAPSQL_PARSER_TODO_WARNING dump when used in SQL query.

Why this happened:

The internal table systemically was assembled as follows:

So, in a more visible, it would thus be:


ITAB2 [ ITAB1[ FIELD1 , FIELD2 ,  ...] ] (Or also called as "TABLE_LINE").


BR,


Raphael Pacheco.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question