Automate

 View Only
Expand all | Collapse all

Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

  • 1.  Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-29-2020 12:24
    Hello - are there any suggestions on why a Script (TCode = CK91) runs successfully in Debug mode but fails in RUN mode. The Runner user has the permissions to the TCode.  I recorded  the script in Standard Mode, then in Batch mode and the results are the same. Any suggestions on how to fix the script? Thank you!

    ------------------------------
    Vicky Muresan | Master Data
    Synergy55 | 847-687-7413
    ------------------------------


  • 2.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-30-2020 04:01
    Hi Vicky,

    I have never created a script for this specific transaction, but I had similar issue with other transactions. Sometimes in DEBUG mode a green message appear in the bottom of SAP screen, and usually is related to the script trying to focus in a disabled/hidden screen field. It will still work in DEBUG but it will fail in Run mode. Please debug step by step and check for any messages in every step. 
    This could be result from a different layout in the screen between your SAP and the user's.

    Regards,


    ------------------------------
    Andre Monteiro | Senior Systems Administrator
    UK Power Networks
    ------------------------------



  • 3.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-30-2020 08:17
    Hi Vicky,
    I would try slowing down the script as I call it is running to fast. I use the renew sessions after [n] transactions. I have always used 1. This will slow down the system to allow it to process the transaction.  This option  is located in the mapping part of Winshuttle to the right in properties in the script area.
    My second option is to run stop on errors.  



    ------------------------------
    Benjamin Kielas | Supervisor SAP Material Master Data
    Generac Power Systems, Inc. | 2625106580
    ------------------------------



  • 4.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-30-2020 09:37

    Hi Benjamin – Thank you for your feedback! These are new settings I was not aware of.

     

    Just to clarify, to make sure I understand correctly what you suggest and it applies to my case.

     

    I am using Winshuttle to automate about 16 steps of the BOM Process.  This is one of the steps – STEP5 "Create Procurement Alternatives (CK91)" for One material – Finished good.

     

    Are you suggesting to add "Renew Session" to the Prior Step STEP4 , and possibly to each of the Steps, so I add a latency between executing steps, so SAP completes the process before going on to the next one, even if all these transactions are on the same material. Is that correct?

     

    Thank you!    

     

    Vicky Muresan

    Project Manager
    Composites One LLC | Synergy55 LLC
    85 W Algonquin Road, Suite 600, Arlington Heights, IL 60005-4421

    P: 847.687.7413 |

    vicky.muresan@synergy55.com

     

    This message and any attachments are intended only for the addressee. The information contained in this message may be confidential and constitute proprietary or nonpublic information. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by email.

     






  • 5.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-30-2020 10:33

    Vicky

    As I understand your process I would start with CK91 step if that is where it is getting hung up at. I assume you have tested each step on its own. That is my process before bring them all together by testing each step of loading. If they all run without issue then when you put them together it maybe something else.

     

    Run between 3 to 5 lines of data. Just 1 line does not allow WS to process the delay.

    Use RUN on each step on its own to see if each step works without using debug. If the step does not work add the delay in and retest the step.

     

    Hope this helps

    Ben Kielas

     






  • 6.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-30-2020 10:50

    Hi Benjamin – yes, I tested each of the steps individually and then passed to the Business (Runner license) to run the steps.

     

    I will add the Renew Session in the Prior Step, and see what happens.

    Thanks again!   

     

     

    Vicky Muresan

    Project Manager
    Composites One LLC | Synergy55 LLC
    85 W Algonquin Road, Suite 600, Arlington Heights, IL 60005-4421

    P: 847.687.7413 |

    vicky.muresan@synergy55.com

     

    This message and any attachments are intended only for the addressee. The information contained in this message may be confidential and constitute proprietary or nonpublic information. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by email.

     






  • 7.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-30-2020 08:20
    Hi Vicky -

    Is your Start SAP Gui checkbox checked?  Typically if something runs in debug mode, which is a foreground mode, and does not run successfully in normal run mode, which is a background mode, Start SAP Gui is needed. There may be something or a certain screen you are going to in that transaction which was never designed to be run in the background, so the Start SAP Gui will mimic that.

    Thanks!

    ------------------------------
    JENNIFER HWANG | SE
    Winshuttle North America
    ------------------------------



  • 8.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-30-2020 09:23

    Hi Jennifer – thank you for your feedback. The GUI Checkbox is checked.

     

     

    Vicky Muresan

    Project Manager
    Composites One LLC | Synergy55 LLC
    85 W Algonquin Road, Suite 600, Arlington Heights, IL 60005-4421

    P: 847.687.7413 |

    vicky.muresan@synergy55.com

     

    This message and any attachments are intended only for the addressee. The information contained in this message may be confidential and constitute proprietary or nonpublic information. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by email.

     






  • 9.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-30-2020 10:17
    Hello Vicky,

    We would need to see screenshots of either your process for this tcode or the Debug run. Then review the script mapping against those. Sometimes in Debug it may seem like it is working but you may be manually clicking a button or an action that is moving the run forward instead.

    There is a small possibility that GUI scripting mode may be required if non-batch and batch mode are not working, however seeing the above items would help determine that better. Please feel free to open a Support ticket, send these over and we can help you.

    Thanks!
    -Shelby

    ------------------------------
    Winshuttle Support |
    Winshuttle North America |
    ------------------------------



  • 10.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Employee
    Posted 07-30-2020 12:07
    Hi Vicky

    Only time for a question suggestion - and I haven't scripted that tcode - or if I have, I don't remember. :)

    When I run into that issue, I check the box to Start SAP GUI on the RUN tab and try again.  It usually fixes the issue, since in debug, the GUI is started.

    HTH.  If not, I'll circle back to check out the tcode tomorrow.

    Best Regards,
    Sigrid

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



  • 11.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-30-2020 13:38

    I second the check box on GUI scripting.

    I forget about that myself some times.






  • 12.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Employee
    Posted 07-30-2020 18:05
    Hi again Vicky

    Attaching a simple example that works in non-batch without controls and no Launch GUI checked.  Note this is with the inventory change option, since I didn't have anything configured for the default - production.  Each option shows a different screen, so you'd have to record one for each option you want to automate.

    You didn't mention the product version - I'm using 12.1 with the Winshuttle function module 12.1.  I looked in the function module for this tcode, and there is no override for the recording mode that would happen if you default to standard mode.  There is one for CK91N, but you aren't using that. 

    Hope the example helps.

    Best Regards,
    Sigrid



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

    Attachment(s)

    Txr
    CK91_InventoryChange.Txr   82 KB 1 version
    xlsx
    CK91_InventoryChange.xlsx   4 KB 1 version


  • 13.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-31-2020 16:23
    Thank you, Sigrid!
    I will even try the CK91N as one of the users is this transaction and then Change to CK91 to create the Procurement Alternatives.  

    Best regards,
    Vicky Muresan






  • 14.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-31-2020 09:08
    Hi Vicky,
    If you can consistently run the script but your user cannot, it might also be useful to compare SAP Parameters (System>User Profile>Own Data.)  We have a script that requires the parameter FIT_ALVC to be deleted from a user's profile before the script will run correctly.

    This may not be relevant at all to your t-code, but wanted to mention it just in case.

    Best of luck!

    ------------------------------
    Caitlin Michael | BNSF 
    ------------------------------



  • 15.  RE: Winshuttle script runs fine in DEBUG mode and Fails in RUN Mode

    Posted 07-31-2020 11:19

    Thank you, Caitlin for your feedback!  Really helpful to keep in mind.

     

     

    Vicky Muresan

    Project Manager
    Composites One LLC | Synergy55 LLC
    85 W Algonquin Road, Suite 600, Arlington Heights, IL 60005-4421

    P: 847.687.7413 |

    vicky.muresan@synergy55.com

     

    This message and any attachments are intended only for the addressee. The information contained in this message may be confidential and constitute proprietary or nonpublic information. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by email.