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: 

Inline declaration specifying type

schoutenk
Explorer
0 Kudos

As of 7.40 we can finally make use of inline data declarations.

Can you use an inline data declaration and specify the type at once?

For example when I do a select on a database type I want to use a hashed type as the output type. But when I use an inline data declaration it will always generate a STANDARD TABLE.

SELECT matnr, maktx
FROM makt
INTO @DATA(lt_makt) <-- This should be a hashed table with key MATNR
  WHERE spras = sy-langu.
1 ACCEPTED SOLUTION

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

No, in SELECT this isn't possible.

It is possible in other write positions, where the type of the source is completely known.

2 REPLIES 2

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

No, in SELECT this isn't possible.

It is possible in other write positions, where the type of the source is completely known.

0 Kudos

That was a fast answer. Thanks Horst.

Too bad this isn't possible (yet). Maybe a feature for in the future?