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 querry

Former Member
0 Likes
494

Hi Friends,

I need the bewtp to check twice with E and Q, My select querry is picking all the data. Pls check the select statement and correct it

SELECT ebeln

ebelp

belnr

budat

menge

dmbtr

matnr

werks

bewtp into corresponding fields of table lt_ekbe FROM ekbe

WHERE matnr IN so_matnr

AND budat IN so_budat

and bewtp EQ 'E'

OR bewtp EQ 'Q'.

Thanx and regards,,

Turbin

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
469

SELECT ebeln

ebelp

belnr

budat

menge

dmbtr

matnr

werks

bewtp into corresponding fields of table lt_ekbe FROM ekbe

WHERE matnr IN so_matnr

AND budat IN so_budat

and <b>( bewtp EQ 'E' OR bewtp EQ 'Q' )</b>.

Do the changes as highlighted.

Regards,

Ravi

Note : Please mark all the helpful answers

4 REPLIES 4
Read only

Former Member
0 Likes
470

SELECT ebeln

ebelp

belnr

budat

menge

dmbtr

matnr

werks

bewtp into corresponding fields of table lt_ekbe FROM ekbe

WHERE matnr IN so_matnr

AND budat IN so_budat

and <b>( bewtp EQ 'E' OR bewtp EQ 'Q' )</b>.

Do the changes as highlighted.

Regards,

Ravi

Note : Please mark all the helpful answers

Read only

messier31
Active Contributor
0 Likes
469

Hi Line,

Try following......

SELECT ebeln

ebelp

belnr

budat

menge

dmbtr

matnr

werks

bewtp

into corresponding fields of table lt_ekbe FROM ekbe

WHERE matnr IN so_matnr AND

budat IN so_budat AND

( bewtp EQ 'E' OR bewtp EQ 'Q' ) .

hope this helps you...

Enjoy SAP.

Pankaj Singh.

Read only

Former Member
0 Likes
469

SELECT ebeln

ebelp

belnr

budat

menge

dmbtr

matnr

werks

bewtp into corresponding fields of table lt_ekbe FROM ekbe

WHERE matnr IN so_matnr

AND budat IN so_budat

and (bewtp EQ 'E' OR bewtp EQ 'Q' ).

Message was edited by:

V.S.N.A.Subhakar Ramineni

Read only

Former Member
0 Likes
469

<b>Just for your info</b>, we can acheive the same as below too...

SELECT ebeln ebelp belnr budat menge 
              dmbtr matnr werks bewtp 
              into corresponding fields of table lt_ekbe 
              FROM ekbe
              WHERE matnr IN so_matnr
              AND budat IN so_budat
              and bewtp <b>IN ('E', 'Q').</b>

Kind Regards

Eswar