Automate

 View Only

Tip of the week - Trigger a query in SAP to prevent duplicate entry

  • 1.  Tip of the week - Trigger a query in SAP to prevent duplicate entry

    Employee
    Posted 16 days ago
      |   view attached

    Hello! 

    I wanted to share how you can use simple form elements to interactively check and prevent duplicate entries when capturing data through Evolve forms. 

    Let's say there is a unique identifier field in SAP such as Tax number for a Customer (KNA1) or SSN for an employee record etc. 

    As the user enters a value in the TaxNumber field, we want to check immediately if this data already exists in SAP and if so, throw an error message.

    This prevents potentially duplicate records being entered and interactively alerts the user before moving on. 

    Here is how to set this up in Composer. 

    1. Prepare your Query script in Studio and import into your Form solution. Input = tax number, Output = all customers with that tax number. 
    2. Setup the webservice control for the Query to execute when the value in the input field changes
    3. Set the value of "Get Record Count Only" to True. When this is set, the Logfield contains the record count (Not the Record Count field, don't ask me why, that's just how it is!) 
    4. Create a rule on the LogField to show a message if the Logfield value >0 (which means the data already exists) 
    5. Optionally, you can format the tax number field if logfield >0 to further highlight the issue. 
    6. You can hide all the query related outputs in a separate group to keep the UI clean. 

    Screenshots: 

    QUERY (for SAP ECC -> KNA1 Tax number field) 

    BEHAVIOR when a unique tax number value is entered: 

    BEHAVIOR when a previously existing value is entered: 

    Webservice Settings:

    Rules on Logfield: 

    Hope this helps you build interactive forms to help your users save time and improve data quality. 

    Happy building,

    Jayasri



    ------------------------------
    Jayasri Varyani
    SE
    *Precisely Software Inc.
    ------------------------------