Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to change from inner join to for all entries?

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 <> ' ') ).

Former Member
Not what you were looking for? View more on this topic or Ask a question