Automate

 View Only
  • 1.  Err:The control could not be found by id.

    Posted 12-11-2024 10:55

    Hello to the community,

    I am facing an unexpected issue with the error in subject.

    I have recorder a GUI script for RECN transaction in one of our Non Production SAP systems.

    This script is working fine in all our Non Production SAP system but throws the error in subject very early in the script when executed in Production system.

    To my understanding the SAP systems (non prod - prod) are technically identical hence I am unable to get my head around this and am hoping the community might shed some light.

    Looking forward to hearing communities' ideas.

    Note: I have restricted access to Production SAP system hence my usual workaround of re-recording a failing script in the system the issue occurs, is against the current authorisation policy.



    ------------------------------
    Rodion Pustovalov
    Knowledge Community Shared Account
    Burlington MA
    ------------------------------


  • 2.  RE: Err:The control could not be found by id.

    Employee
    Posted 12-12-2024 15:33

    Hi Rodion

    This is not my area of expertise.  A couple of general things you could check:

    • did you record using GUI scripting?  If so, does prod allow SAP scripting?  You'd have to ask your Basis team.
    • are the tcode settings in non-prod and prod identical?  Sometimes tcodes have pop-ups and/or defaults that aren't the same between SAP systems and cause the script to throw an error.  The key would be where in the script is this happening?  Can you run in debug mode?

    Hope that gives you a few ideas,

    Sigrid



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



  • 3.  RE: Err:The control could not be found by id.

    Posted 12-17-2024 12:02

    Hello Sigrid,

    Thank you for your comments. Please find my replies below:

    • did you record using GUI scripting? - Yes. If so, does prod allow SAP scripting? - Yes. You'd have to ask your Basis team.
    • are the tcode settings in non-prod and prod identical? - Yes. Sometimes tcodes have pop-ups and/or defaults that aren't the same between SAP systems and cause the script to throw an error. - No differences between the systems. The key would be where in the script is this happening? - It happens in the first field of the script that is supposed to be updated as per the data sheet. Can you run in debug mode? - I don't see any additional information in debug mode for this kind of error but will arrange one and update.


    ------------------------------
    Rodion Pustovalov
    Knowledge Community Shared Account
    Burlington MA
    ------------------------------



  • 4.  RE: Err:The control could not be found by id.

    Posted 17 days ago

    Hello,

    Update: Debug mode does not show anything additional to the script throwing the error and cancelling the run.

    Happy to hear any thoughts on this.



    ------------------------------
    Rodion Pustovalov
    Knowledge Community Shared Account
    Burlington MA
    ------------------------------



  • 5.  RE: Err:The control could not be found by id.

    Posted 17 days ago

    Hi Rodion

    There are 3 usual suspects that I have noticed with GUI recordings and this error.

    1. An unexpected pop-up
      1. Different scenarios may act differently - for instance in RECN - company codes/contracts may have different requirements causing SAP to perform different actions.
    2. Buttons are in different locations for different SAP Themes
      1. For this reason, I use the top menu (File, Edit, Go etc.) as much as possible to navigate to different views.
    3. How SAP acts the first time you enter a t-code vs how it acts the 2nd time 
      1. For instance KSU5 has a pop up for "Controlling Area" the first time you enter the transaction, however, subsequent entries for KSU5 do not have this pop-up. The script however will look for this pop-up every time, so requires an "If First Transaction" statement. 

    I hope this helps!



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



  • 6.  RE: Err:The control could not be found by id.

    Posted 16 days ago

    Hello,

    I would have both SAP systems open side by side and complete each step manually looking for any differences in fields and settings. In addition any fields that are greyed out, not input-able as the script might be selecting it even though it is not meaning to. I would also check if you have any default settings in Production that are different to Quality. i.e. for material master you can save specific tabs, Sales Orgs, Plants that you use often in your day to day work. I would have the script reset these early on so that it removes peoples personally saved sap screen options. 



    ------------------------------
    Martin Axon
    Master Data Specialist
    Thermo Fisher Scientific (UK)
    ------------------------------



  • 7.  RE: Err:The control could not be found by id.

    Posted 13 days ago

    Hello Rodion,

    GUI scripting mode scripts are notorious for being over sensitive and breaking. I have seen examples where if someone's excel data file was sized different, the script would through that error. The equivalent of Studio GUI scripting mode in SAP directly is called "SAP script recording and playback". I would suggest trying this out and seeing if it still fails. SAP Script recording and playback  The recording will be a VBS file. If it works in SAP, you can compare the VBS (I would save and open in notepad to review the code) with the Studio script mapping. If it fails using that, it will fail in Studio.

    I choose to use BAPIs/RFMs instead. 



    ------------------------------
    Shelby Murrell
    SAP Functional Lead
    MONSTER ENERGY
    [USA]
    ------------------------------