10-29-2015 4:54 AM
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?
Thanks,
Onkar
10-29-2015 6:01 AM
10-29-2015 8:17 AM
Well if there are records in VBRP, you get same result with inner join. If there are none, BMENG will be initial so you will exclude those -> Convert to INNER JOIN or elaborate on exact requirement.
Regards,
Raymond