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

select

Former Member
0 Likes
571

hello all,

i need to do select to table mseg for all ebeln that start with 2.

is anyone know how can i do that?

thanks,

dana.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
546

try this

select * from mseg into table itab where ebeln like '2*'.

5 REPLIES 5
Read only

Former Member
0 Likes
547

try this

select * from mseg into table itab where ebeln like '2*'.

Read only

Former Member
0 Likes
546

Hi,

Try like this,

DATA : v_ebeln type ekko-ebeln value '2*'.

and use this in your select query.

data : v_ebeln type ekko-ebeln value '4*'.

data itab like table of EKKO with header line.

Select * from ekko into table itab where ebeln > v_ebeln.

Loop at itab.

write 😕 itab-ebeln.

endloop.

Hope it helps.

Prashanth

Read only

Former Member
0 Likes
546

Hello,

Try like this.

Data: a1(2).

Concatenate '2' '%' into a1.

select * from mseg into itab where ebeln like a1.

If useful reward.

Vasanth

Read only

Former Member
0 Likes
546

Have a look at below link. http://www.sapdb.org/7.4/htmhelp/8c/ccce27c71c11d2a97100a0c9449261/content.htm.

Instead of '2*', You should use select * from mseg into table itab where ebeln like '2%'.

Best Regards,

Vibha Deshmukh

*Plz mark useful answers

Read only

Former Member
0 Likes
546

hi all,

thank you very much.

it work.