Skip to Content
0
Former Member
Jul 23, 2009 at 09:54 AM

How to replace Below Joins in select query ?

18 Views

SELECT ko~ebeln     ko~lifnr     a1~name1
         ko~bsart                   " Purchasing Document Type
         po~menge                   " PO quantity
         po~meins                   " PO Unit
         po~netpr                   " Net Price
         ko~kdate                   " End of validity period
         po~pstyp                   " Item category in PO
         po~wepos                   " Goods Receipt indicator
         ko~spras                   " Language Key
         ko~frggr                   " Release group
         ko~frgsx                   " Release strategy
         ko~frgke                   " Release Indicator
         po~matnr
         po~txz01
         po~ebelp
         po~werks
         po~lgort
         ko~waers
         ko~ernam
         ko~aedat
         po~netwr
         po~repos
    INTO TABLE itab_details
    FROM   ekko AS ko INNER JOIN ekpo AS po
             ON ko~ebeln = po~ebeln
          INNER JOIN t161 AS t1
             ON ko~bsart = t1~bsart
            AND ko~bstyp = t1~bstyp
          INNER JOIN lfa1 AS a1
             ON ko~lifnr = a1~lifnr
   WHERE ko~ebeln IN s_ebeln
     AND po~loekz IN s_loekz
     AND po~werks IN s_werks
     AND po~lgort IN s_lgort
     AND ko~lifnr IN s_lifnr
     AND ko~bukrs IN s_bukrs
     AND t1~bsart IN s_bsart
     AND po~matnr IN s_matnr
     AND ko~ernam IN s_ernam
     AND ko~aedat IN s_aedat
     AND po~knttp IN s_knttp
     AND ko~ekgrp IN s_ekgrp
     AND po~pstyp IN s_pstyp.