Skip to Content

SELECT default values with FOR ALL ENTRIES option

Hello All,

I am trying to construct a range table while fetching the data from database as below using default values for some fields:

TYPES: BEGIN OF ty_ranges,
         sign   TYPE ddsign,
         option TYPE ddoption,
         low    TYPE string,
         high   TYPE string,
       END OF ty_ranges.

DATA: lr_plants TYPE TABLE OF ty_ranges.

SELECT 'I' AS sign, 'EQ' AS option, werks AS low
  INTO TABLE @lr_plants
  FROM t001w.

But the problem is I cannot use FOR ALL ENTRIES option with this. I could not find any details on ABAP keyword documentation on this restriction.

I am curious to know why. Is there a performance issue? And, is there any other way to achieve this? (I am aware of using LOOP after the SELECT statement. I am trying to avoid that).

Thank you

Dhananjay

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers