Skip to Content

Query help - re: Goods Receipt PO lines & previous sales


Here is what I am trying to do.

I want to write a query which will look at the ORDR/RDR1 tables - combined with OITM table - then also combine the OPDN/PDN1 tables and also the OSLP table.

On the OITM table - there is a UDF (U_Brand) which specifies the brand of a particular item in our database.

In the end I would like to have a report which will run on a daily basis (run in late afternoon - after business hours) - and export out a list of customers (specific to sales person from the OSLP table) whom have previously ordered the brand (OITM.U_Brand) of product on a Good Receipt PO that was created that day.

I'm at a loss as to how to start putting this together.

Any help here would be greatly appreciated!



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jun 01, 2017 at 06:27 AM

    Hi Rick,

    Sounds like items are at the heart of this issue, and as you need both sales and purchase data (which are hard to join), we should start with OITM and join the sales and purchase data in sub queries. Sales person data can then be joined to the sales.

    I am not entirely clear on the parameters though. Do you want to enter a brand as parameter and/or a goods receipt number, or do you just want a list of all items sold, that were purchased that day, sorted by brand?



    Add comment
    10|10000 characters needed characters exceeded