Tip of the Week – Get Technical Information in SAP
When creating a script, whether Transaction, Direct or Query, you might want to lookup technical information in SAP. That technical information can include:
- SAP Field names – including data type and length
- SAP screen names
- SAP OK codes
Examples:
SAP Field names and Screen names:
In the script in Expert View, you can see:
- SAPLBUS_LOCATOR-3000, which is Program + Screen Number on row 13
- BUT000-NAME_ORG1, which Table and Field name (note that sometimes a tcode uses a structure, so table name isn't always a true table)
To see this in the SAP GUI, go into the tcode and navigate to the data you are working with – below is tcode BP General Data:
Position your cursor on the Name row 1 and click F1 – then click the Technical Information icon like below
You will see the screen and field names
Why would you need this?
- Sometimes you have a long script or a script someone gave you, and you need to try to figure out where you are in the script to make modifications
- You can add a field to your script by simply copying a row with another field in the same screen in the script and fill in the technical name. This is especially helpful for fields in a table, because not all columns are automatically captured. It's then good to click Synchronize on the Mapping tab to get the description and datatype/length
- You are trying to find a field in a BAPI and the description may be different but the technical name is usually the same.
- You want to write a query and need the technical name to find it in the tables you want to use. In this example if it's a table or transparent table, then you can use it as the table name, but if it's a structure, you'll want to search for a table in Query.
SAP OK Codes:
For scripts, as you navigate in a Transaction, every function key or Enter or click on a tab is associated with an OK Code. SAP uses the OK Code to determine what to do/where to go next from the screen you are on. You can see the available OK Codes by opening a tcode in the SAP GUI, navigating to a field, and clicking F1. Double click in the Status to see the OK codes for this Tcode and screen:
Expand each section and see the OK codes available
You can double click on one if it is cutoff, like above and see the complete OK Code, aka Function Code
Scroll down to see the rest of the OK Codes
Normally as you walk through a recording, the OK codes are captured, and you don't need to worry about it. But you can use this functionality to:
- Debug a script. If you see an OK code you don't recognize, you usually can view it in the steps above or running in Debug mode.
- Modify a script. You can look for the OK code to navigate or perform a function you didn't capture in a script. Examples:
- you created an Update script, and now you want to save it as a Download script, thus the last step wouldn't save but instead exit.
- you might have an IF condition depending on data in the script to navigate differently, such as a differing material type in a material create script.
Note that sometimes OK codes are not listed in the popup. There may be instances where you need to:
Looking up technical information isn't required, but I hope you can see it can be helpful.
Happy scripting!
Sigrid
------------------------------
Sigrid Kok
Precisely Software Inc.
------------------------------