title: selecting in 4 tables with conditions
body: <p>i need to select vbeln from likp and i have to select only vbeln that has been marked 'C' in vbuk. and from that likp-vbeln(delivery) i have to search/select for its carrier in vekp and after searching for the carrier I then have to search/select its shiptype from another table. i have table with 7 fields, in the code below im selecting some deliveries but i dont know how to add the condition in vbuk table because i dont need to select from vbuk. thanks. the code is below:</p>
  
  <pre><code>SELECT likp~vbeln
       tab~shiptype
       vekp~carrier
       vekp~service
       COUNT( DISTINCT vekp~shipment )
       SUM( vekp~packagecount )
       SUM( vekp~rate ) FROM vekp
    INNER JOIN tab
    ON tab~carrier = vekp~carrier INNER JOIN likp
    ON vekp~delivery = likp~vbeln INTO itab
    WHERE likp~erdat IN so_date AND
          vekp~delivery = likp~vbeln AND
          vekp~carrier = tab~code
          GROUP BY vbeln shiptype carrier service.
  </code></pre>