Appreciate your feedback, I was able to resolve it using the MAX function.
Below is my query.
Can you suggest a good document.
it_sales_data has the sales order data. My below query works perfect.
SELECT b.mandt,b.vbeln,b.posnr,b.etenr,b.ettyp,b.edatu,
b.bmeng as vbep_bmeng,b.vrkme as vbep_vrkme,b.mbdat,
b.lifsp,b.lddat
from :it_sales_data as a
LEFT OUTER JOIN vbep as b on a.mandt = b.mandt and
a.vbeln = b.vbeln and
a.posnr = b.posnr
where b.bmeng = (select max(BMENG) from vbep as c where b.vbeln = c.vbeln and
b.posnr = c.posnr )
order by b.vbeln,b.posnr;