‎2007 Aug 04 9:37 AM
hi experts,
I am making Purchase Requisition report. for that i have to use EBAN, EKPO, EKKO, LIPS, and LIKP tables. User enters Purchase requisition no. on that condition it fetches data. I have joined EBAN and EKPO and the data fetches correctly. but how can I join other tables in the same select statement.
Required field from lips and likp is----
Delivery No. (VBELN)
Delivery Date. ( when delivery created) (ERDAT)
Delivery material. (MATNR)
Delivery Qty. (LFIMG)
PGI.
***************************************************
my select statement is -
******************************************************
SELECT EBANBADAT EBANLFDAT EBANBANFN EBANMATNR EBANMENGE EKPOEBELN EKPOEBELP EKPOSTATU EKPOAEDAT EKPOMATNR EKPO~MENGE
EKPOMEINS EKPONETPR EKPOPEINH EKPOWERKS
INTO CORRESPONDING FIELDS OF TABLE IT_EKKO
FROM EBAN LEFT OUTER JOIN EKPO
ON EBANBANFN = EKPOBANFN
AND EBANBNFPO = EKPOBNFPO
WHERE EBAN~BANFN IN S_BANFN.
***************************************************************************************
THANKS.
KHAN.
‎2007 Aug 04 3:08 PM
Hi
Join EKPO and EKKN tables with EBELN and EBELP and take the VBELN and POSNR fields
which are nothing but sales order number and Sales order item
pass these VBELN and POSNR fields to LIPS-VGBEL and VGPOS and fetch the data from LIPS and LIKP tables
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Aug 04 10:52 AM
hi
in ekko and ekpo common is ebeln.
so u can join with it.
where as in likp , lips and ekpo common is netwr
i think it may be useful for u
regards
vidya
‎2007 Aug 04 3:08 PM
Hi
Join EKPO and EKKN tables with EBELN and EBELP and take the VBELN and POSNR fields
which are nothing but sales order number and Sales order item
pass these VBELN and POSNR fields to LIPS-VGBEL and VGPOS and fetch the data from LIPS and LIKP tables
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Aug 06 4:55 AM
Please see this link for joininng the table
<a href="http://">http://www.geocities.com/sapcircle/Relations.pdf</a>
" page no 25 for LIKP & LIPS.....
reward points if it is usefull .....
Girish
‎2007 Aug 12 3:28 PM
for better performance don't use joins instead of that use FOR ALL ENTRIES statement.if you use joins limit number of tables to 3 only.
p.surendarreddy