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

Doubt on Select Statement

Former Member
0 Likes
345

HI Friends,

i have a requirement to select matnr,werks and mmsta from marc table.where i have input of matnr and mmsta.

The matnr in the marc table having 2 werks with different mmsta.

i was asked to select matnr not having mmsta 40.

but in marc table there is same matnr with two mmsta 37 and 40.

i want a select statement which should not pick matnr having 40.

my select statement was

select matnr werks mmsta into itab from marc

where matnr in fpso_matnr and mmsta in fpso_mmsta.

this does not work for the above condition.

please suggest me a correct statement..

Thanks,

Gokul

2 REPLIES 2
Read only

former_member156446
Active Contributor
0 Likes
323

select matnr werks mmsta into itab from marc

where matnr in fpso_matnr and mmsta in fpso_mmsta

and mmsta NE 40.

ill this not work ?

MARC is plant data.. so I guess u need to give werks also...

Edited by: jackandjay on Dec 19, 2007 12:02 PM

Read only

Former Member
0 Likes
323

Hi,

MARC is Material Plant data. If you supply Material and Plant u will get unique record for Material.

Otherwise irrespective of plant and if you need only entries not equal to 40...

then you can go ahead with Jack's reply..

Pra