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: 

How to write this select query ?

Former Member
0 Kudos
67

Hi,

I need to write a select query where i need to retrieve the names of the cutomised tables (Starting with Z or Y)

The select query

SELECT * FROM xyz INTO TABLE itab_xyz WHERE TABNAME = 'Z*'

doesn't work.

What's the correct way to write this ?

3 REPLIES 3

Sm1tje
Active Contributor
0 Kudos
44

WHERE TABNAME LIKE 'Z%'

Former Member
0 Kudos
44

It will give you all give you all taable in Y* AND Z* RANGE.

Ranges:R_TAB for <tabname>.       " Dic ref

R_TAB-low = 'Y*'.
R_TAB-high = 'ZZ*'.       "ZZ* iS equvalent to Z* no issues here
R_TAB-options = 'I'.
R_TAB-sign = 'BT'.

Append R_prog.

SELECT * FROM xyz INTO TABLE itab_xyz WHERE TABNAME in r_TAB.

Regards,

Gurpreet

0 Kudos
44

This message was moderated.