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 QUERY

Former Member
0 Likes
848

Hi Abappers,

I want to fetch data from a table where plant = 1901 and meins is KG or L20 and msehi is KG or L20.

How shud i formulate the query.

Thanks,

Mansi.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
823
select * 
           from ztable
            into table itab 
            where werks = '1901' and
                      meins in ('KG' , 'L20') and
                      msehi in ('KG' , 'L20').
7 REPLIES 7
Read only

Former Member
0 Likes
824
select * 
           from ztable
            into table itab 
            where werks = '1901' and
                      meins in ('KG' , 'L20') and
                      msehi in ('KG' , 'L20').
Read only

Former Member
0 Likes
823

SELECT * FROM

ZTABLE

where

werks = '1901' and

meins in ( 'KG' , 'L20' ) and

msehi in ( 'KG' , 'L20').

Read only

Former Member
0 Likes
823

Write the query like this

select * from table into table in_table

where werks = '1901'

and meins = ('KG' 'L20')

and msehi = ('KG' 'L20').

reward points if it is helpful

Thanks

Seshu

Read only

amit_khare
Active Contributor
0 Likes
823

select * from <table> where plant = 1901

and ( meins =kg

or meins = L20 )

and ( msehi = KG

or msehi = L20 ).

Regards,

Amit

Read only

Former Member
0 Likes
823

Hi,

Use the statement as below.

Select <fields> from table <table name> into tbale <internal table>

where plant = '1901' and

means = ( 'kg' or 'L20' ) and

msehi = ( 'KG' or 'L20' ).

Regards,

Ram

Read only

naveen1241
Participant
0 Likes
823

select * from <table> to <itab>

where plant = '1901'

and meins in ('KG', 'L20')

and msehi in ( 'KG' , 'L20').

Read only

Former Member
0 Likes
823

hi mansi,

select *

from ztable

into table itab

where werks = '1901' and

meins in ('KG' , 'L20') and

msehi in ('KG' , 'L20').

if useful reward some points.

with regards,

suresh babu aluri.