BAQ - Join Problem

,

Hi. We are putting into place a procedure to monitor our tooling work - this will include linking to Sales Orders received from the Customers and Purchase Orders placed with Suppliers. We are using UD01 as the ‘Header’ table for the information. I am creating a dashboard for this to be monitored and have a summary tab that groups everything together with total ordered, invoiced, etc.

My problem is that I also want a detail tab but as we could have multiple Sales Order Lines and / or Purchase Order lines for one lot of work and all my attempts have resulted in the SO rows and the PO rows being linked together (see pic). The problem with this is that we want to use grouping and summarizing and it is obviously then giving false results. I feel like I should know how to do this but I am going round in circles… can anyone help?

I think you would have to do this as a union of two subqueries (one for sales orders and POs).

And I mean that you pick one as the TopLevel query and the other as a union-type subquery.

It is a pain to do it this way. I would love to know if there is a better way. But I think that is the way.

So, I say this assuming you are on E10, which is what the post says. But your profile says 8.03, and that doesn’t have subqueries, right?

I have also been advised to look into union on another site. I haven’t used it before so going to go through my training data and the Epicor manual.

We are on E10 now but were on V8 when I created my profile and I’m not sure how to change it!

Thanks for your help - I will come back if I struggle with the union :slight_smile: Tracy

1 Like

​Think I’ve cracked it! Thank you for the pointer in the right direction :grinning: Tracy

1 Like