Skip to Content
2
Former Member
Jul 08, 2013 at 01:23 PM

union in a select

2545 Views

Hi,

can anybody tell me whether the following sql stardard is possible in abap and how I can emulate the same?

select * from sapsr3.mast@st1_desarrollos WHERE mandt = 300 AND werks = '1100' AND stlan = '1' AND stlal = '01' union select * from sapsr3.mast@st1_desarrollos WHERE mandt = 300 AND werks = '1100' AND stlan = '1' AND stlal = '02' AND trim(matnr) not in (select distinct trim(matnr) from sapsr3.mast@st1_desarrollos where mandt = 300 AND werks = '1100' AND stlan = '1' AND stlal = '01')

Thanks in advance.

Regards.