Skip to Content

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

Replace Left Outer Join in Select Qeury

Hello Experts,

This is my select query :

SELECTvbap~vbeln vbap~posnr  vbep~etenr
vbap~matnr vbap~lgort vbap~lprio vbap~zzdelv
vbap~faksp vbap~netwr vbap~abgru vbap~werks

vbap~vstel  vbap~arktx vbap~prodh vbap~vrkme
vbap~route vbep~edatu  vbep~wadat vbep~bmeng

vbep~wmeng vbep~lifsp

                    INTO TABLE gt_vbapep  FROM vbap

              LEFT OUTER JOINvbep

                      ON vbep~vbeln = vbap~vbeln AND

                         vbep~posnr = vbap~posnr

              FOR ALL ENTRIES IN gt_vbakuk

                  WHERE vbap~vbeln = gt_vbakuk-vbeln.

Now I want to put a condition where vbep~bmeng NE 0. But since VBEP table is left outer joined, I cant put condition in this select query.

After select query I can delete the entries from internal table where BMENG <> 0 but what if I am not selecting BMENG?

So require your help in this please.

Can we replace it with inner join or can we put condition in this select query itself?



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