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

Reg Select Query

Former Member
0 Likes
815

Hi Guys,

I need a help on the select query...could you please help me out, here is my requirement.

I need to pick up all the ztables from the table DD02L so for this I wrote a select statement as follows..

data : begin of i_table occurs 0,

tabname like dd02l-tabname,

end of i_table.

select tabname from dd02l into table i_table where tabname = 'z*' .

write:/ .

but I am getting sy-subrc as 4...

points will be rewarded ..

Regards,

Ravi Ganji

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
753

Please use CAPS and pattern:

select tabname from dd02l into table i_table where tabname <b>LIKE 'Z%'</b> .

Kind Regards

Eswar

6 REPLIES 6
Read only

Former Member
0 Likes
754

Please use CAPS and pattern:

select tabname from dd02l into table i_table where tabname <b>LIKE 'Z%'</b> .

Kind Regards

Eswar

Read only

Former Member
0 Likes
753

data : begin of i_table occurs 0,

tabname like dd02l-tabname,

end of i_table.

select tabname from dd02l into table i_table where tabname <b>LIKE</b> 'Z%' .

write:/ .

REGARDS

SHIBA DUTTA

Message was edited by:

SHIBA DUTTA

Message was edited by:

SHIBA DUTTA

Read only

Former Member
0 Likes
753

Hello Ravi,

U need to do like this.

data : begin of i_table occurs 0,

tabname like dd02l-tabname,

end of i_table.

select tabname from dd02l into table i_table where tabname <b>like</b> '<b>Z</b>*' .

or

select tabname from dd02l into table i_table where tabname <b>like</b> '<b>Z</b>%' .

If useful reward

Vasanth

Read only

Former Member
0 Likes
753

Hi ,

Use this Select query .

select tabname from dd02l into table i_table where tabname like 'Z%' .

Regards ,

Senthil

Message was edited by: Senthil

senthil kumar

Read only

anversha_s
Active Contributor
0 Likes
753

hi,

do this

data : begin of i_table occurs 0,
tabname like dd02l-tabname,
end of i_table.

data : i_z_table like i_table .

select tabname from dd02l into table i_table.

loop at i_table.

if  i_table-tabname+0(1) =  'Z'..
append i_table to i_z_table.
endif.

endloop.

in i_z_table contain all ztables.

Rgds

Anver

Read only

Former Member
0 Likes
753

Hi Ravi ,

Use the command

<b>select tabname from dd02l into table i_table where tabname like 'Z%'.</b>

Regards

Arun