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: 

Determine Internal Table Type using inline declaration

philipdavy
Contributor

Hi Experts,

Is it possible to determine the type of internal table while we declare inline internal table in select statement. By default it is coming as standard internal table.

Ex

Select field1, field2 from DBtable into table @data(itab).

**/- I need itab to be sorted internal table. I know that sorted, hashed table needs to be/can be further qualified with unique/non-unique sorted keys. But anyways of achieving the same using inline declaration as of 7.40 or 7.5 or any future plans to bring the same. 
3 REPLIES 3

horst_keller
Product and Topic Expert
Product and Topic Expert

Up to now, the answer is no.

philipdavy
Contributor

Horst Keller,

I really appreciate your quick answer. You people did a great job by introducing great features in ABAP and your timely response for the ABAP 7.40/50 related queries is highly commendable. 🙂 🙂

PS: Ever had any internal discussion/thought about the query which I raised. Because sometimes it looks strange that you can have inline declaration for standard table but not for others.

horst_keller
Product and Topic Expert
Product and Topic Expert

Ever had any internal discussion/thought about the query which I raised.

Of course, but there's so much to do.

A very dirty workaround:


IF 'X' = 'Y'.
  SELECT SINGLE ... 
         FROM ... 
         WHERE 'X' = 'Y'
         INTO @DATA(wa).
ENDIF.

DATA itab LIKE ... TABLE OF wa WITH ...

SELECT ...
       INTO TABLE @itab.