cancel
Showing results for 
Search instead for 
Did you mean: 

SAP query-Table join

0 Kudos

Hello experts,

I am trying to create a query using five different tables EKKO,EKPO,EKEK,EKKT and LFA1 but i am unable to get the desired output.The generated report only shows Scheduling agreement documents.It is not showing Purchasing documents.Kindly guide me the correct process to join these tables.Thanking you in advance.

Accepted Solutions (1)

Accepted Solutions (1)

JL23
Active Contributor
0 Kudos

if you include EKEK with an inner join then you will only get records that have an entry in EKEK. Normal POs do not appear there.

You need an outer join for EKEK table

0 Kudos

Hello Jurgen,

Thank you very much for your reply.After your explanation i was able to understand the concept of inner join and outer join and successfully created my query.

regards,
Durgesh Tambat.

Answers (2)

Answers (2)

Prasoon
Active Contributor
0 Kudos

Hi,

   Go to SQ02 and maintain the link to EKEK table as "left outer join" by right clicking on the link as shown below:.

   Generate the info set again and then test the query again.

Regards,

AKPT

0 Kudos

Hello,

Thank you very much for your reply.After your explanation i was able to understand the concept of inner join and outer join and successfully created my query.

regards,
Durgesh Tambat.

former_member183424
Active Contributor
0 Kudos

Its very tough to find the problem with given information.

As you are saying that you only got the SA document, Is it showing correct value and all data for SA document ?

Check anywhere you are filtering the document type (only for scheduling agreement).

0 Kudos

hello dev,

Thank you for your quick response. i am getting all columns in the report as needed but it is only showing me information related to scheduling agreement document. i want query to read purchasing documents also.

Regards,

Durgesh Tambat