Source: DMF/PuC/MFCS/StockTransaction_v2_MSEG.sql

/* 
ekko - header ordens (transferencias, ordem de compra e allocations)
ekpo - items das ordens 
eket - delivery schedule 
EKBE - recebimentos das ordens (recebimentos
Lips - detail shipment
likp - header shipments (rtv e shipments)
VBAK - header da venda
VBAP - detail da venda
FRET - liga a PO com a venda (usamos no PR1) 
*/
--------------
 
   SELECT M.BWART, 
          M.MBLNR, 
          M.EBELN, 
          EKKO.BSART, 
          EKKO.LIFNR, 
          M.WAERS, 
          M.WERKS, 
          M.LGORT, 
          M.BUKRS, 
          M.INSMK, 
          M.BUDAT_MKPF, 
          M.CPUDT_MKPF, 
          M.CPUTM_MKPF, 
          M.EBELP, 
          M.MATNR, 
          M.MENGE, 
          M.SHKZG, 
          M.DMBTR, 
          M.VBELN_IM, 
          M.VBELP_IM, 
          m.* 
     FROM sap_slt_prod_pv1.MSEG m
LEFT JOIN sap_slt_prod_pv1.EKKO ekko on m.ebeln = ekko.ebeln
    WHERE BWART = '101';