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

Help required in code in select statement

Former Member
0 Likes
705

Hello All,

I want to select all the entries from table dd02l where 'ZCUST*'

Can any one tell me how to write this code.


  CONCATENATE  'tabname =' '''ZVHF_CUST*'''
    INTO where_clause SEPARATED BY space.

i tried in the above manner but didn't succeeded.

Regards,

Lisa

Edited by: Lisa Roy on Apr 2, 2008 11:45 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
683

Hi Lisa,

try with like operator..

select * from dd02l into table it_dd02l where TABNAME LIKE 'ZCUST%'.

pls check the % operator where to put it exactly..

Regards

Syed A

9 REPLIES 9
Read only

Sm1tje
Active Contributor
0 Likes
683

data: gt_dd02l type table of dd02l.

select * from dd02l into table gt_dd02l where TABNAME LIKE 'ZCUST%'.

Edited by: Micky Oestreich on Apr 2, 2008 5:48 PM

Edited by: Micky Oestreich on Apr 2, 2008 5:48 PM

Edited by: Micky Oestreich on Apr 2, 2008 5:49 PM

Read only

Former Member
0 Likes
683

Hello Micky,

I am getting a systax error field = is unknown.

Regards,

Lisa

Read only

Former Member
0 Likes
683

Post your query, if that is the error, probably you have a '=' that shouldn't be there

Read only

Sm1tje
Active Contributor
0 Likes
683

Sorry, i was a bit sloppy in writing the code. The correct code was edited the last time. Now it should be ok, but you have probably solved this problem using all the other answers.

Read only

Former Member
0 Likes
684

Hi Lisa,

try with like operator..

select * from dd02l into table it_dd02l where TABNAME LIKE 'ZCUST%'.

pls check the % operator where to put it exactly..

Regards

Syed A

Read only

Former Member
0 Likes
683

hi,

do this way..


select single * from dd02l  where tabnam like 'ZCUST%'. 

Read only

former_member194669
Active Contributor
0 Likes
683

Try this way


  data : v_like(7) type c.
  concatenate 'ZCUST%' space into v_like.
  select * from dd02l into table i_dd02l
    where tabname like v_like.

Read only

Former Member
0 Likes
683

Hi,

Try like this:

select * from dd02l into table it_dd02l

where tabname LIKE 'zvhf_cust%'.

Regards,

Bhaskar

Read only

Former Member
0 Likes
683

TYPES T_DD02L TYPE DD02L.

DATA : IT_DD02L TYPE STANDARD TABLE OF T_DD02L.

SELECT * FROM DD02L INTO TABLE IT_DD02L

WHERE TABNAME LIKE 'Z%'.