Skip to Content
0
Former Member
Sep 15, 2014 at 02:34 PM

How to change from inner join to for all entries?

340 Views

Hi,

how to change this code from inner join to for all entries in. could you please suggest me.

SELECT a~vbeln

a~lifsk

a~vdatu

a~bstzd

a~z2brgew

a~kunnr

FROM vbak AS a

INNER JOIN vbuk AS b

ON a~vbeln = b~vbeln

INTO CORRESPONDING FIELDS OF TABLE db_tab

WHERE a~vkorg IN vkorg AND

a~bstzd IN bstzd AND

a~submi IN submi AND

a~lifsk IN lifsp AND

a~vdatu IN vdatu AND

a~vtweg IN vtweg AND


a~auart NOT IN ('ZREF', 'ZRED', 'ZRES', 'ZREU' ,'ZREN', 'ZRDO', 'ZORF' ,'ZRF1', 'ZRUD') AND


( ( a~lifsk <> ' ' AND

b~abstk <> 'C' AND

b~gbstk <> 'C' ) OR ( a~lifsk = ' ' AND

b~cmgst = 'B' AND

a~vbtyp <> 'H' AND

b~abstk <> 'C' AND

b~gbstk <> 'C' AND

b~gbstk <> ' ') ).