Automate

 View Only
  • 1.  Duplicate data returned in query

    Posted 06-28-2021 12:15
      |   view attached
    Hi everyone,
    I am hoping someone else has previously had this issue and knows where I may be going wrong.

    I have built a query where the requirements are as follows:
    - Look at sold-to parties maintained on a list
    - Return sold-to party number, sales org, sales office, sales group, sales group name text, currency and attribute 10 value.
    - Off that sold to list, also return all SH/SF partners, their account numbers, Attribute 1, 3, 5 and address data

    Criteria are distribution channels. I also have EN as a criteria for sales group text language.

    When I run the query, I am getting heaps of duplicate values. Example attached. I also tried the EN criteria for the attributes, but that didn't solve it.

    I appreciate any tips anyone can offer. Thank you!

    ------------------------------
    Megan O'Leary | Information Systems/Information Technology Technology Professional
    Bose Corporation | +1.508.766.8736
    ------------------------------

    Attachment(s)

    xlsx
    Table_20210628_112146.xlsx   14 KB 1 version


  • 2.  RE: Duplicate data returned in query

    Employee
    Posted 06-28-2021 13:28
    Hi Megan

    Duplicates can be caused by a number of factors, including joins, search criteria, etc.

    You've shared your excel file but we'd need to see your query to get a better idea.  

    You've also shared that you're using a list for input values, so an idea of what you're using for that would be helpful, as well.

    Lastly, please advise whether you're using ECC or S4.

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 3.  RE: Duplicate data returned in query

    Posted 06-28-2021 14:18
      |   view attached
    Hi Sigrid,
    Thank you for your reply! I understand there are many factors which can get me to where I am now. My query is attached.

    The input values are the list of accounts which provide sell-through information. This query is only related to those accounts, so rather than pull everything in the system, I've just added those to the list.

    System of record is ECC.

    Thank you very much!
    -Megan

    ------------------------------
    Megan O'Leary | Information Systems/Information Technology Technology Professional
    Bose Corporation | +1.508.766.8736
    ------------------------------

    Attachment(s)

    Qsq
    Alloy_Report.Qsq   495 KB 1 version


  • 4.  RE: Duplicate data returned in query

    Employee
    Posted 06-28-2021 15:55
    Hi Megan

    I sent a reply but there were other things wrong.

    For queries in general, add one table a time and test you output.  That way you'll catch duplicates.  I suggest you:

    1. get your sold to data correct with no duplicates - KNA1 and KNVV - matching on KUNNR
    2. then add your partners KNVP - again match on KUNNR
    3. then you'll need to add sales data KNVV and customer data KNA1 again to map to the partners.  Make sure you join on the partner customer field KUNN2, not the customer field at the top KUNNR like you were doing.
    4. you will also need to decide how you match up the sales area data.  I believe the first KNVV and the 2nd KNVV need to be joined by sales org, dist channel and division, but you may have different reasoning.  Example my customer 1000 is in sales org 1000, dist channel 10, division 00 - the partner customer ship to (or whatever) would also need to be in the same sales area, right?  So both KNVV tables need to have the same sales area.
    5. add whatever tables you need for additional data and text descriptions.  again, check your output at each step
    6. use a dynamic IN operator, and have it read the data from your excel file somewhere.  See the doc here - at the bottom to use a dynamic list:  https://docs.winshuttle.com/studio-en-12-1-x-online-help-studio-w-connect/12/in-operator.htm 

    Best Regards,
    Sigrid


    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------