Tips to Troubleshoot Winshuttle Scripts

By Maria Simpson on Apr 1, 2021

Hi Winshuttler!

Whether you’re new to Winshuttle Studio or you’re a long-time user, having the ability to troubleshoot a Winshuttle script is key to achieving success. Winshuttle scripts help you extract or load data into SAP, so being able to quickly fix a script gives you more time to focus on strategic, value added tasks, and helps you achieve success with your SAP data. To learn more about how Winshuttle Studio helps you automate your SAP processes, whether it’s master data or transactional data, take a look my previous blog on the 3 modules of Winshuttle Studio.

When you create a Winshuttle script, you’ll want to follow our Studio best practices. Unfortunately, issues can still arise with these scripts after you create them and test them with different scenarios, data, SAP systems, etc. Or maybe the script worked before and now suddenly, it’s not working. There are many reasons why this could happen. For example, SAP functionality has changed, a user has different settings in their SAP system, new data is being used that is causing issues that haven’t happened before, etc. Getting errors can be discouraging, but there is hope! There are several ways to troubleshoot a Winshuttle script and with a little practice, you’ll be able to fix scripts easily and efficiently.

Before seeing an error, you’ll need to run or validate the Winshuttle script. Here is some helpful documentation on running Transaction scripts and Query scripts. Within Winshuttle Studio we’ve also provided helpful options for error management. These options give you more control over how you manage script errors.

Before we dive into the tips to troubleshoot Winshuttle scripts, let’s look at some of the common types of errors you might encounter:


1. Data issue – Error often reflects specific field issue

  • Bad data or missing data
  • Data creates unexpected action, screen, or pop-up
2. Run-time issue – Error often includes “Runtime”

  • Recording mode issue
  • Screens or actions in script only designed for manual interaction (or you might need to use GUI scripting or a BAPI/RFM with Winshuttle Direct)
3. Script issue – Error often includes “No batch input data”

  • Extra or missing screen
  • Function code (OK code) issue (learn more about OK codes in this blog)
  • Cursor position issue
  • Missing field

Now that you’ve seen some of the common errors, let’s get to the good stuff. I’ve broken down tips to troubleshoot the scripts based on Transaction, Direct, or Query. Please note that Direct scripts have the same extension as Transaction scripts (.TxR), but you will most likely need to troubleshoot them differently.

Tips to Troubleshoot Transaction Scripts

  • Check the functionality and data between SAP systems
  • Debug (run step-by-step)

When you choose debug on the run screen, SAP will open in the foreground and you’ll have a small OK code window to interact with during debug mode. Click the green check in the OK code window to continue moving through each step of the script on the SAP screen and avoid clicking on the SAP screen during debug mode.

  • Manually go through steps in SAP
  • Change the recording mode in the Map tab

When you get a runtime error, like the example above, try changing the recording mode from Standard Non-Batch to Standard Batch or vice versa.

  • Change the run settings
  • Add or modify fields, screens, conditions, loops, or skip screens
  • For a GUI script, make sure all other SAP sessions are closed

Modifying a script can be tricky, so I highly recommend watching my webinar on troubleshooting scripts (60 min). You can also watch this webinar on conditions (60 min) and this webinar on loops (60 min) to get a better understanding of how, where, and when to add conditions and loops.


Tips to Troubleshoot Direct Scripts

  • Try the BAPI/RFM in transaction code SE37
  • Review the documentation within Direct (if available)
  • Search the web for tips (Google is your friend!)
  • Check field formats, especially date fields (ex. YYYYMMDD)
  • If there is a read BAPI/RFM for the object, use it to see field formats
  • Check the padding on every field in the Map tab

  • Check Excel formatting with loops
  • Check for X tables

When you use a table and there is an associated X table, you will need to add an entry in the X table as well for the same fields used in the main table. In the example below, the table CLIENTDATA has an associated X table, CLIENTDATAX. We selected 4 fields in the CLIENTDATA table, so we must select those same 4 fields in the CLIENTDATAX table.

I highly recommend watching this webinar on Direct (60 min) to get a better understanding of how to use Winshuttle Direct and SAP transaction code SE37. The webinar will also go over padding, loops, and X tables.


Tips to Troubleshoot Query Scripts

  • Check conversion exits (v12.1 and above)

A conversion exit is a method SAP uses to normalize the data in SAP tables. Some fields will have a conversion exit available. A conversion exit can be applied to a field by clicking Conversion Exit in the Workspace tab.

  • Test padding on criteria fields

I recommend watching this webinar on Query best practices (30 min) to get a better understanding of how to use Winshuttle Query.

I hope I’ve given you more confidence to troubleshoot and fix your Winshuttle scripts. I believe in you and I know you can do it! You can learn more about the content in this blog and see the troubleshooting methods in action by watching the webinar I did on troubleshooting Winshuttle scripts (60 min).

Our support team has created hundreds of articles that might have a solution for the issue you’ve encountered, so I recommend checking our Support articles. If you’re still running into issues, you’re always welcome to reach out to our excellent Winshuttle Support team. You can also post a question or issue in our awesome Winshuttle Community site.

Happy Winshuttling!




About the author

Maria Simpson

Maria has been a part of the Winshuttle team for over a decade. In that time, she has expanded her skill set to become a dedicated Solutions Engineer with an expertise in SAP. This, along with prior SAP experience, enables her to use over 13 years of combined knowledge to connect proficiently with her fellow SAP users. Maria is passionate about sharing Winshuttle’s leading data management solutions, and with SAP being an integral part of a company's essential needs and future growth, she aims to help everyone enjoy the benefits that SAP provides.

Questions or comments about this article?

Tweet @Winshuttle to continue the conversation!