Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

joining tables

Former Member
0 Likes
1,388

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
924

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

4 REPLIES 4
Read only

Former Member
0 Likes
924

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

Read only

Former Member
0 Likes
925

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

Read only

Former Member
0 Likes
924

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

Read only

0 Likes
924

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