Automate

 View Only
  • 1.  Query to Pull When the last time a Material has been ordered by Plants and material types

    Posted 06-13-2025 16:22

    Need help to query to pull when the last time a material has been ordered by plants and material types. This is to start looking at archiving materials. 



    ------------------------------
    Carlos Velez
    Southwire Company, LLC
    ------------------------------


  • 2.  RE: Query to Pull When the last time a Material has been ordered by Plants and material types

    Posted 06-16-2025 16:35

    Hi Carlos

    We have a query which pulls NB purchase order details using tables EKPO & EKKO and a few pieces of criteria. We don't use material type, but that is an option in table EKPO. The reason for the EN language key criteria is to prevent multiple rows of output for each material. Is this what you are looking for (see attached), or are you looking to understand the last time a customer ordered a specific material?



    ------------------------------
    Vanessa Kutasi
    Foundation Admin./Application Analyst II
    Idexx Operations, Inc.
    USA
    ------------------------------

    Attachment(s)

    xlsx
    PO_Details_NB.xlsx   60 KB 1 version
    Qsq
    PO_Details_NB.Qsq   536 KB 1 version


  • 3.  RE: Query to Pull When the last time a Material has been ordered by Plants and material types

    Posted 06-18-2025 08:40

    It does not seem to working for me I entered several materials and left dates wide open and still receive 0 results. 



    ------------------------------
    Carlos Velez
    Southwire Company, LLC
    ------------------------------



  • 4.  RE: Query to Pull When the last time a Material has been ordered by Plants and material types

    Posted 06-18-2025 14:47

    Hi Carlos

    I was able to entered a couple hundred material numbers, I left the plant and date fields blank and was able to pull in several results. I understand you are wanting details from MARC/MARA as well. If the fields you want are in the EKPO & EKKO tables, I would try capturing them there first. If you have tested with the MARC/MARA tables added to the query I shared (or a query you built), it may be that the join needs to be converted, or you may need to run a subsequent query to pull in those additional details. I also find that sometimes the order of the tables can have an impact. 



    ------------------------------
    Vanessa Kutasi
    Foundation Admin./Application Analyst II
    Idexx Operations, Inc.
    USA
    ------------------------------



  • 5.  RE: Query to Pull When the last time a Material has been ordered by Plants and material types

    Posted 06-18-2025 15:36

    I found my issue however will this report pull all them that are left open. I only want to pull unopen orders with designated materials by a date range. Does that make sense? 



    ------------------------------
    Carlos Velez
    Southwire Company, LLC
    ------------------------------



  • 6.  RE: Query to Pull When the last time a Material has been ordered by Plants and material types

    Posted 06-18-2025 15:43

    Hi Carlos

    Glad you found the issue! The query I shared will pull all orders within. Both tables have a few status options which you may be able to use as criteria to filter out closed orders, or output only open orders. I'm not sure which would be the one you want as I'd have to dig a bit. I'm off the next couple of days, but am happy to continue to help if you are still having troubles when I return. 



    ------------------------------
    Vanessa Kutasi
    Foundation Admin./Application Analyst II
    Idexx Operations, Inc.
    USA
    ------------------------------



  • 7.  RE: Query to Pull When the last time a Material has been ordered by Plants and material types

    Employee
    Posted 06-18-2025 16:33

    HI Carlos

    One place to check is for delivery complete - it's at the line item level

     

    X means complete and space means not.  Will that work?

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------



  • 8.  RE: Query to Pull When the last time a Material has been ordered by Plants and material types

    Posted 06-18-2025 16:47

    Yes, that certainly does help. 



    ------------------------------
    Carlos Velez
    Southwire Company, LLC
    ------------------------------