You can use the recordset object to query for open PO's.
This can be a simple query, or it can get more complex, depending on your needs.
Something like this...
SELECT * FROM OPOR WHERE DOCSTATUS = 'O' AND CANCELED <> 'Y'
... will get you a list of all of the currently open PO headers. However, an open PO may have been partially paid, or partially received. The PO header remains open until all line items have been closed.
If you're looking for a way to find PO's that have not had any partial receipts, invoices, or rtv's against them then the solution will need to consider the LineStatus field on the POR1 table as well.
Regards,
Demetree
Add a comment