Purchase Order to Sales Order

Hello!

I want to pull up and put together information from a Purchase Order and the Sales Order it is connected to. I am having trouble finding a table connection to the two that doesn’t result in duplicate results. For example, I have PODetail going to Part going to OrderDtl. But it’s lining up data incorrectly. It is assigning SOs to POs that I know aren’t together.

Any suggestions?

My ultimate goal is to get the customer’s purchase order number to line up with our purchase order for it.

Thank you.

Table PORel (PO release) lines should let you tie back to the sales order release.

PORel.OrderNum
PORel.OrderLine
PORel.OrderRelNum

Hi, thank you for replying.

I am able to pull that information. I am using that table. But it’s the PO from here that I need:
image

Where we’d put the customer’s number.

Add/join the OrderHed table…

PORel.OrderNum >> OrderHed.OrderNum

First question, are your orders set up as buy to order? If they aren’t then there isn’t a direct link from your PO to a Sales Order.

1 Like

I did as you suggested, connecting them via OrderNum and Company, but the results that generate come out as 0 results.

I don’t believe we do… So not even as the previous person suggested, getting the PORel and the OrderHed connected?

Correct. Just think about it logically for a second.

Spacely Sprockets sells sprocket A to 10 customers. Today you get 3 orders for 10 sprockets for 3 different customers. You happen to have 10 in inventory right now. You purchaser sees that you will need another 20 to meet demand, and you normally have 10 in stock. So the purchaser makes a PO for 30 sprockets. Which PO goes to which customer?

The answer is, POs and Sales orders aren’t inherently linked unless you use buy to order, so that’s not really a valid question.

1 Like

I assumed that they were buy-to-order SO/PO linkups…we do a lot of it here.

Won’t work for basic inventory POs…

1 Like

If you’re just looking for the Customers PO number, that’s on the OrderHead table. (PONum.) But that has nothing to do with YOUR purchase order, that’s the PO that the customer is using to buy from you.

Hmm. I can see what you guys are saying.

One thing I just remembered that I forgot to mention, which is probably a crucial part of this, so forgive me…

We do have a link. But it’s a customized field. In the PO screen, we had someone create this:

image

Which I can pull just fine because it’s in the POHeader table. Is there a way I can find the link through there? I would probably need to go back to the people who created this…

(I do not know why we do not do Buy To Order and instead opted for this)

1 Like

If you have the specific sales order, then it should work fine. They probably did this because of costing, and other idiosyncrasies around BTO.

You’ll join the release (POrel) to the sales order header, using that UD field.

You’ll have to show us more of what you have, and explain more clearly what you are trying to get out of this for us to help you though.

2 Likes

I believe everyone here has guided me to the solution. I connected OrderHed to PORel via OrderHed.OrderNum = PORel.Number01 (the UD field).

Looks like it comes out with the correct numbers.

Thank you everyone!

1 Like