Automate

 View Only
  • 1.  Query on several not-linked tables

    Posted 10-28-2022 07:50

    Hi forum
    For a given load script, I would like to validate certain data before load. As the script contains loops, this function does not work.

    I therefore have an idea of adding a "preburner" sheet, where the end user can add the specific data and then have a query at the first step in a chain of scripts. If the query returns the requested data, they will be copied to the subsequent sheet.
    Unfortunately, the data are not linked via tables (or infosets/logical databases). Eg Work center, Functional location and material master.

    I assume that I have to chain specific queries for each table CRHD, IFLOT and MARC

    Can you confirm this approach is the way to go?

    Or has anyone solved the "query on several independent tables in one go" in any way?

    I'm on Winshuttle 20.2.8

    Br Michael



    ------------------------------
    Michael Lund | Senior Business Analyst
    Novo Nordisk A/S | (453) 075-1686
    ------------------------------


  • 2.  RE: Query on several not-linked tables

    Employee
    Posted 11-03-2022 15:54
    HI Michael

    Am not following what the query is doing related to validating data.  Can you please elaborate?  Screen shots are helpful.

    Also, can you just create a script for the tcode and then exit instead of posting at the end and call it a validate script?  The users could run the validate script instead of the validate button, and then choose the post script.  Would that work?

    Sigrid

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



  • 3.  RE: Query on several not-linked tables

    Posted 11-04-2022 04:11
      |   view attached

    Hi Sigrid

    I will elaborate on the process. I have also attached an illustration.

    The scenario is that end user wants to have new task lists (TL) and maintenance plans (MP) created in SAP. 
    The end user gives information (Functional loc (Floc), Equipment (Eqm) and components for TL) to super user, who fills in the remaining data in the main load sheet load via Winshuttle into SAP.
    To make life easier for super user (avoid load errors) we want the end user to check in advance, that the provided floc, eqm and comp actually exist in SAP. The end user is not supposed to load anything, thus it is not possible to validate any transaction. The super user cannot validate either as the load scripts contains parallel loops.
    So my take on this was to let the end user run a query to verify the existence of the data or to catch any misspellings.

    I made it work by chaining three individual query scripts.  If data exist (and downloaded to query sheet as a confirmation), they are subsequently copied from the query sheet to the main load sheets in the same excel workbook. The downside is if the data do not exist, the query silently returns nothing. I have handled this with conditional formatting. Then the end user will notice.
    But if it could be made simpler, I would really like to do that :-)
    Br Michael



    ------------------------------
    Michael Lund | Senior Business Analyst
    Novo Nordisk A/S | (453) 075-1686
    ------------------------------

    Attachment(s)

    pdf
    Load_flow1.pdf   201 KB 1 version


  • 4.  RE: Query on several not-linked tables

    Employee
    Posted 11-04-2022 16:43
    Hi Michael

    Thanks for the additional details.  From my perspective, you have 3 options:
    1. You could use the Queries, you mentioned. 
    2. You could use a Transaction script for each object to display them (open them), and you will get an error if they don't exist.
    3. You could use create the validation version of the script to create the task list.  You could use system account so that the end users can run it, since it doesn't post anything

    Hope that gives you some ideas.

    Sigrid

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