cancel
Showing results for 
Search instead for 
Did you mean: 

joing of EKKO, EKPO, EKET and EKBE

Former Member
0 Kudos

Hi Gurus,

We want to achieve two reports with the same query. the first report is the requirement to compare the persons who created the PO and the person who received the PO (migo material doc) were same or not? To achieve this we joined tables EKKO, EKBE and EKPO in the order same order. The report started giving out only those results where EKKO - ERNAM was equal to EKBE - ERNAM. This is fine. But now we have a new requirement to create a late PO deliveries report. The users want the actual dates when the receipts were received (mat doc receipts). Because ME2N, ME2M and ME2L only give whether they are late or not but they dont give by how many days they are late. anyways to achive the late deliveries report, i joined EKET table to the as the fourth table to the already existing previous three tables. But beucase of the EKKO -ERNAM = EKBE - ERNAM criteria we are getting the resutls onyly when they match. What needs to be doen so that the both the reports can be achived from this same infoset.

Thanks

Anmusha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If this report is to be run on a regular basis, why go for a infoset based query? I believe it would be better to go for a regular Z report which will be more flexible.

Anyways if the need is to use infoset query only & want to combine both the reports, then use only the document number in the join. Then add a few lines of abap to display only the result you need.

Discuss the above with your abaper & it should be possible with a few lines of code.

Regards,

Vivek

Former Member
0 Kudos

Thanks for the info. But how can we detach the link between EKKO ERNAM = EKBE ERNAM (these are the first two tables),

Thanks

Anusha

Former Member
0 Kudos

Hi,

If the qns is just how to de-link the join, then select the join in table join view & click on delete join. But if the qns is then how to link these 2 tables, just link them based on document number. Then you will have to add few lines of abap.

But as i said it would be very simple to achieve this in a Z report than a infoset query, as it is more flexible. You will have to build in a OR condition, which says display the record if the name of creator & the person who posted the GR is same OR display the record if it meets your other criteria.

So i would strongly suggest go for a Z report & discuss with your abaper.

Regards,

Vivek

Former Member
0 Kudos

we already have the query up and running in production which displays the 1st report (PO created and MIGO mat doc created users same or not). It is the second report, PO late delvieries info that i was after to achieve with the same query. Does Z report mean an abap program?

Former Member
0 Kudos

Hi,

Yes Z program is a abap program. If the initial infoset query is already in PRD & being used & you want to go with a infoset query, then go for another infoset query to meet your 2nd need, as the first infoset would not meet your 2nd need.

Regards,

Vivek

Former Member
0 Kudos

If i go for another infoset, then which order of the tables would help me in getting the report i need. Will it be EKPO then EKET and then EKBE to make sure that i do not miss any results that might be occurring becayse of the way i join the tables

Thanks

Anusha

Edited by: anusha vemulapati on Mar 2, 2010 4:50 PM

Former Member
0 Kudos

Hi,

While posting GR, it is for Document nos. & Item nos. so you can go with EKPO EKBE & EKET.

But if it were me, i would simply not go with infoset, as it does not lend itself easily for any enhancements & is quite restrictive & requires a lot of testing to be sure the joins are not eliminating any valid records from being read.

Good luck.

Regards,

Vivek

Former Member
0 Kudos

Thanks so much for the patient replies. Even in the case of abap program, i guess these are the 3 tables that i have to communicate to the abapper to be able to read the tables and fields right?

Former Member
0 Kudos

Hi,

Yes. The above mentioned tables should meet your need.

Regards,

Vivek

Answers (0)