Literals in ABAP OpenSQL?

starting from ABAP 7.5*, you can use Host Variables to achieve your requirements.

Please define lv_i and lv_eq as Char type.

data lv_i type char1 value 'I'.
data lv_eq type char2 value 'EQ'.

I tried with my own by selecting from T001. It is working perfect.

data:
  lr_t_bukrs type range of bukrs.

select @lv_i, @lv_eq, bukrs from t001 into table @lr_t_bukrs up to 10 rows.

Update from @Jagger,

you can also use constants in the OPEN SQL directly.

select 'I', 'EQ', bukrs from t001 into table @lr_t_bukrs up to 10 rows.

Tags:

Abap

Opensql