Application Development and Automation 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: 
Read only

How to write this select query ?

Former Member
0 Likes
566

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 ?

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
Read only

Sm1tje
Active Contributor
0 Likes
543

WHERE TABNAME LIKE 'Z%'

Read only

Former Member
0 Likes
543

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

Read only

0 Likes
543

This message was moderated.