ABAP runtime errors usually occur if an ABAP program terminates unexpected or unplanned. ABAP runtime errors can indicate different problems, from a ABAP kernel error, a programming error, installation or administration errors to a resource bottleneck. Hence it is import to monitor for runtime errors and address them in a timely manner.
SAP Focused Run can collect runtime errors and provide you with collection context to analyze the root cause.
Integration Monitoring Setup
Available Monitoring Categories
The available monitoring categories are:
- ABAP Runtime: ABAP short dumps as found in ST22
Available Filter Options
ABAP Runtime
For ABAP Runtime errors, you can collect all ABAP dumps in the managed system. You can also use the following filter parameters, to restrict the data collection:
- Runtime Error~Exception: Runtime Error (ST22) ~ Exception (ST22)
- Program: Terminated program (ST22)
- User: User (ST22)
- Host: Application Server (ST22)
- Destination: Call destination from Collection Context or RFC Caller Information
- Function: Function module from Collection Context or RFC Caller Information
Available Metrics
For ABAP Runtime errors the following metrics are collected:
ABAP Runtime
- ABAP Runtime exceptions: Indicates that ABAP runtime errors were collected during the last collection
- Additional filter fields:
- Process type: Batch, Dialog, HTTP, RFC or Update
- Source IP Address: IP address of the source server if the runtime error was called by a remote caller
- Source Server: server name of the source server if the runtime error was called by a remote caller
- Additional filter fields:
- Number of ABAP Runtime Errors over period: Number of ABAP Runtime Errors during the alert calculation period
- Additional filter fields:
- Process type: Batch, Dialog, HTTP, RFC or Update
- Source IP Address: IP address of the source server if the runtime error was called by a remote caller
- Source Server: server name of the source server if the runtime error was called by a remote caller
- Additional filter fields:
Whenever SAP comes across an issue that causes it to stop processing it generates an ABAP Runtime Error. A basic example of this would be a divide by zero but there and many such errors defined in SAP such as DBIF_RSQL_INVALID_REQUEST Invalid Request.
The runtime error would be presented immediately if executing a dialog process but can be recovered any time using transaction ST22. All runtime errors that happen during a background or RFC process are also available via tcode ST22.
The runtime error contains all the details about the type of error as well as the contents of the program variables at the point of the error. for example here is an example of the description you might see for DBIF_RSQL_INVALID_REQUEST.
What Happened? The current ABAP/4 program terminated due to an internal error in the database interface. What can you do? Make a note of the actions and input which caused the error. To resolve the problem contact your system administrator. You can use transaction ST22 (ABAP dump analysis) to view and administer termination messages, especially those beyond their normal deletion date. Error analysis.
In a statement, an invalid request was made to the database interface when accessing the table “EKKO”.
SAP Runtime error transactions and ABAP programs
ST22 –ABAP runtime error
RSLISTDUMPS – List All Runtime Errors and short description
RSSHOWRABAX – Program associated with ST22
SAP Runtime error tables
SNAP – ABAP/4 Snapshot for Runtime Errors (ST22 list)
SNAPTID – ABAP Runtime Errors – Uses SNAPT as a text table so Includes first text line(TLINE)
SNAPT – ABAP Runtime Error Texts
SNAPTTREX – Exception table for translation
Runtime Error categories (SNAPTID-CATEGORY)
Field: SNAPTID-CATEGORY
Domain: S380CATEGORY
- I Internal Error
- R Error at ABAP Runtime
- Y Error at Screen Runtime
- D Error in Database Interface
- A ABAP Programming Error
- F Installation Errors
- O Resource Shortage
- E External Error
- U End User Error
- K No Error
- S ST Runtime Error
- J Internal ST Error
- X XSLT Runtime Error& Text Include (no Short Dump, only Text Module)
- & Text Include (no Short Dump, only Text Module)
- B ITS Error
- Q Error in Open SQL
- – Unclassified Error
Most common SAP runtime errors
Below is a list of some of the more common runtime errors including a link to full details of the error and what causes it.
DBIF_RSQL_INVALID_REQUEST
MESSAGE_TYPE_X
TIME_OUT
OPEN_DATASET_NO_AUTHORITY
CONVT_NO_NUMBER
GETWA_NOT_ASSIGNED
TSV_TNEW_PAGE_ALLOC_FAILED
LOAD_PROGRAM_CLASS_MISMATCH
LOAD_PROGRAM_INTF_MISMATCH
-
31 Oct 2013 5:57 am Rohit Mahajan
Run transaction ST22 to get the details of the error, and find the one for your particular run.
It will show the program line where the error occurred.
Find ‘pernr’ to get the employee’s pers.no.
Then determine the cause of error
as below:
a)In transaction SE38 display the program as above. Go to the line where the error occurred,
b)Set break point just before the line or at the line.
c)Re-run the payroll for the employee.
d)When the program stops at the breakpoint, check all the relevant data.
e)Where required, execute one line at a time, so that you can understand what is happening.Then you should be able to find the reason for the error.
If the problem is in a custom ABAP function, then consult the programmer.
If the problem is in a SAP program object,
1)find OSS notes relevant to the problem.
2)If there are any, apply the notes in the dev.system, import the employee’s data to the dev test client. Repeat the payroll as above and check if the problem is fixed.
3)If not found, report the error to SAP with an OSS message and all relevant details of data used, transaction, which pay period, expected results, etc.; follow up with SAP for a resolution
When a report or module dumps, the reason is mostly quite obvious. Some runtime errors are «catchable», but when not caught they will stop your report. If you are the user causing the dump, there is a «Debug» button available to you to start the debugger.
This is «Post mortum» debugging — where you know the patient has already died — but having a look around in the debugger can be very useful. Catchable runtime errors are handled with CATCH SYSTEM-EXCEPTIONS
using the name of the runtime error. Here’s a list of runtime errors with a brief explanation of what to look out for.
To detect semantically related runtime errors using a common name, they are combined into exception groups. You can handle catchable runtime errors in an ABAP program using the following control statements:
CATCH SYSTEM-EXCEPTIONS exc1 = rc1 ... excn = rcn. ... ENDCATCH.
The expressions exc1 … excn
indicate either a catchable runtime error or the name of an exception class. The expressions rc1 … rcn
are numeric literals. If one of the specified runtime errors occurs between CATCH
and ENDCATCH
, the program does not terminate. Instead, the program jumps straight to the ENDCATCH
statement. After ENDCATCH
, the numeric literal rc1 … rcn
that you assigned to the runtime error is contained in the return code field SY-SUBRC
. The contents of any fields that occur in the statement in which the error occurred cannot be guaranteed after ENDCATCH
.
If you don’t know which exception class to catch, you can use OTHERS
to catch all possible catchable runtime errors. Do beware: not all runtime errors are catchable !
CATCH SYSTEM-EXCEPTIONS others = 4. ... ENDCATCH.
Catching the error that would cause a dump — TRY — ENDTRY
One example problem that can not be caught with CATCH SYSTEM-EXCEPTIONS
is the example below:
APPEND 'MSGNR = 123' TO options. APPEND 'ORX' TO options. "<== ERROR HERE APPEND 'MSGNR = 124' TO options. * Dump: SAPSQL_WHERE_PARENTHESES * CX_SY_DYNAMIC_OSQL_SYNTAX CATCH SYSTEM-EXCEPTIONS others = 4. SELECT * FROM t100 UP TO 1 ROWS WHERE (options). ENDSELECT. ENDCATCH.
The solution for this is the TRY - ENDTRY
block, which is a much more precise version of the CATCH SYSTEM-ERRORS
. The above example solved:
TRY. SELECT * FROM t100 UP TO 1 ROWS WHERE (options). ENDSELECT. CATCH cx_sy_dynamic_osql_error. MESSAGE `Wrong WHERE condition!` TYPE 'I'. ENDTRY.
The exceptions hierarchy
So which exceptions are available ? And which ones can be caught with CATCH
? Note that exceptions live in exception classes, which adhere to the naming convention CL_CX_*. There’s many examples available through transaction SE24
class builder. Also note that there is a class-hierarchy on the exceptions. The top op the hierarchy is class CX_DYNAMIC_CHECK
, below is you could finr e.g. CX_SY_CONVERSION_ERROR
and below that the CX_SY_CONVERSION_NO_NUMBER
can be found. If you want to specifically catch a number conversion error, the ...NO_NUMBER
exception is your candidate of choice. It it’s all possible conversion errors you are interested in catching, the .._ERROR
candidate is better, and so on. This example doesn’t care what exception is caught — as long as it is caught:
DATA: lv_char TYPE c LENGTH 50, lv_num TYPE n LENGTH 6, lo_error_ref TYPE REF TO cx_dynamic_check. TRY. lv_num = 123. lv_char = 'Test'. lv_num = lv_char. "<= No dump (lv_num = 000000) IF lv_num = lv_char. "<= DUMP! - uncatchable !! ENDIF. CATCH cx_dynamic_check INTO lo_error_ref. MESSAGE `Conversion error` TYPE 'I'. "<= Catches nothing... ENDTRY.
Normally the dump that is produced when a conversion error happened will also state the exception that should/could be used to CATCH
it. However, there is an exception — so I found. The IF
statement above produces a dump, which can not be caught.
The solution for this is a bit of leg-work. With DESCRIBE FIELD ... TYPE ...
the type of the field can be determined. If it is N, the lv_CHAR
variable better only contains numbers.
So SAP — why is the conversion done in an IF
statement not catchable ?
-
31 Oct 2013 5:57 am Rohit Mahajan
Run transaction ST22 to get the details of the error, and find the one for your particular run.
It will show the program line where the error occurred.
Find ‘pernr’ to get the employee’s pers.no.
Then determine the cause of error
as below:
a)In transaction SE38 display the program as above. Go to the line where the error occurred,
b)Set break point just before the line or at the line.
c)Re-run the payroll for the employee.
d)When the program stops at the breakpoint, check all the relevant data.
e)Where required, execute one line at a time, so that you can understand what is happening.Then you should be able to find the reason for the error.
If the problem is in a custom ABAP function, then consult the programmer.
If the problem is in a SAP program object,
1)find OSS notes relevant to the problem.
2)If there are any, apply the notes in the dev.system, import the employee’s data to the dev test client. Repeat the payroll as above and check if the problem is fixed.
3)If not found, report the error to SAP with an OSS message and all relevant details of data used, transaction, which pay period, expected results, etc.; follow up with SAP for a resolution
We were supposed to set the Deletion Flag of a particular Network through CJ20N but when we tried to save the changes, we encountered an error saying:
«»ABAP Runtime Error
What happened?
The SAP Application had to terminate due to an ABAP runtime error.
The characteristics of the runtime error are as follows:
Date………………… 09/29/2014
Time………………… 14:51:43
Transaction ID……….. 06A547E40DA6F19693FB5CF3FC3F74CB
What can you do?
Take a note of the runtime characteristics listed above and of the
actions and entries that caused the application to terminate.
For further help with handling the problem, contact your SAP
administrator.»»
The same error is encountered when editing Material Group or even editing Network Description. Though it happens only to selected Projects. Does anyone have an idea as to what caused this?
Read these next…
Intermittent pings on certain devices that are on same VLAN/subnet
Networking
Hi,I am working as a system admin at a company.We have a computer dedicated to monitoring the panels for the facility’s equipment. Let’s say that this computer is on VLAN 2001 and DHCP is disabled on this VLAN. So every device has a static IP on this VLAN…
Wipe IronKey
Hardware
My company is throwing away some Ironkey USB drives. I grabbed a couple and as far as I know they are still good. Is there anyway I can erase them and use them as regular USB drives? I don’t have the password to unlock them.
IT Adventures: Episode One — Mind Blank
Holidays
Tell a Story day is coming up on April 27th, and I was thinking about that and wondering if we could do an interactive story on the site. So, here’s the idea. Below, I am writing a story prompt which is sort of like a Choose Your Own Adventu…
Snap! — Flipper Zero ban, Refurbished AirPods, Dark Side of AI, ChatGPT Furby
Spiceworks Originals
Your daily dose of tech news, in brief.
Welcome to the Snap!
Flashback: April 7, 1969: RFC 1 Defines the Building Block of Internet Communication (Read more HERE.)
Bonus Flashback: April 7, 2001: Mars Odyssey Orbiter Launched (Read more H…
Public IPs showing up on internal devices
Security
Hello-I am operating on a network of 250+ devices. The majority of the devices on the network are IoT devices which connect to the WLAN using a Microchip-branded WiFi chip. There are also a handful of IoT devices that connect using hard wire. The rema…
To resolve this issue, you can demark the code base between sapRotWrapper and GuiTree, and provide access of only concern objects to both the classes.
So, for the codebase share here, what you can do is to access and manage the SAP API connection with sapRotWrapper and then once the data is fetched, you can access the tree control using the GUITree.
I had update the relevant parts of your code for you.
sapRotWrapper:
using SAPFEWSELib; //... sapROTWrapperObject = new SapROTWr.CSapROTWrapper(); sapGUIROTObject = _sapROTWrapperObject.GetROTEntry("SAPGUI");
//Get the reference to the Scripting Engine sapEngineObject = sapGUIROTObject.GetType().InvokeMember("GetScriptingEngine", System.Reflection.BindingFlags.InvokeMethod, null, sapGUIROTObject, null); sapConnectionObject = sapEngineObject.OpenConnection(sapGUIConfig.EndPoint); sapCurrentSession = sapConnexionObject.Children(0);
GuiTree:
GuiTree treeFilters = getTreePath("wnd[0]/usr/ssub%_SUBSCREEN_%_SUB%_CONTAINER:SAPLSSEL:2001/ssubSUBSCREEN_CONTAINER2:SAPLSSEL:2000/cntlSUB_CONTAINER/shellcont/shellcont/shell/shellcont[1]/shell");
treeFilters.ExpandNode(" 1");
treeFilters.SelectNode(" 16");
treeFilters.TopNode = " 15";
treeFilters.DoubleClickNode(" 16");
I’m using C# in order to automate SAP GUI 7.40 with sapfewse.ocx
(inspired By How do I automate SAP GUI with c#)
I’stuck with an error on runtime when the script have to double click on leef of a tree.
private GuiApplication sapEngine { get; set; }
private GuiConnection sapConnexion { get; set; }
private GuiSession sapSession { get; set; }
sapEngine = new GuiApplication();
sapConnexion = sapEngine.OpenConnection(sapGUIConfig.EndPoint,Sync:true);
sapSession = (GuiSession)sapConnexion.Sessions.Item(0);
// ...
GuiTree treeFilters = getTreePath("wnd[0]/usr/ssub%_SUBSCREEN_%_SUB%_CONTAINER:SAPLSSEL:2001/ssubSUBSCREEN_CONTAINER2:SAPLSSEL:2000/cntlSUB_CONTAINER/shellcont/shellcont/shell/shellcont[1]/shell");
treeFilters.ExpandNode(" 1");
treeFilters.SelectNode(" 16");
treeFilters.TopNode = " 15";
treeFilters.DoubleClickNode(" 16");
// Crash Here after DoubleClickNode Method
SAP ERROR: «The SAP application had to terminate due to an ABAP runtime error.»
Note :
The same automation script manage with sapRotWrapper (SapROTWr.CSapROTWrapper) works
sapROTWrapper = new SapROTWr.CSapROTWrapper();
sapGUIROT = _sapROTWrapper.GetROTEntry("SAPGUI");
//Get the reference to the Scripting Engine
sapEngine = sapGUIROT.GetType().InvokeMember("GetScriptingEngine", System.Reflection.BindingFlags.InvokeMethod, null, sapGUIROT, null);
sapConnexion = sapEngine.OpenConnection(sapGUIConfig.EndPoint);
sapSession = sapConnexion.Children(0);
// ...
sapSession.FindById("wnd[0]/usr/ssub%_SUBSCREEN_%_SUB%_CONTAINER:SAPLSSEL:2001/ssubSUBSCREEN_CONTAINER2:SAPLSSEL:2000/cntlSUB_CONTAINER/shellcont/shellcont/shell/shellcont[1]/shell").expandNode(" 1");
sapSession.FindById("wnd[0]/usr/ssub%_SUBSCREEN_%_SUB%_CONTAINER:SAPLSSEL:2001/ssubSUBSCREEN_CONTAINER2:SAPLSSEL:2000/cntlSUB_CONTAINER/shellcont/shellcont/shell/shellcont[1]/shell").selectNode(" 16");
sapSession.FindById("wnd[0]/usr/ssub%_SUBSCREEN_%_SUB%_CONTAINER:SAPLSSEL:2001/ssubSUBSCREEN_CONTAINER2:SAPLSSEL:2000/cntlSUB_CONTAINER/shellcont/shellcont/shell/shellcont[1]/shell").topNode = " 15";
sapSession.FindById("wnd[0]/usr/ssub%_SUBSCREEN_%_SUB%_CONTAINER:SAPLSSEL:2001/ssubSUBSCREEN_CONTAINER2:SAPLSSEL:2000/cntlSUB_CONTAINER/shellcont/shellcont/shell/shellcont[1]/shell").doubleClickNode(" 16");
Is there somebody can help me ?
Note : I’ve the same graphical troubles on screen during the execution, all components are not well displayed, There’s a link ? (like in the question How to Automate SAP GUI 750 with C#)
Whenever SAP comes across an issue that causes it to stop processing it generates an ABAP Runtime Error. A basic example of this would be a divide by zero but there and many such errors defined in SAP such as DBIF_RSQL_INVALID_REQUEST Invalid Request.
The runtime error would be presented immediately if executing a dialog process but can be recovered any time using transaction ST22. All runtime errors that happen during a background or RFC process are also available via tcode ST22.
The runtime error contains all the details about the type of error as well as the contents of the program variables at the point of the error. for example here is an example of the description you might see for DBIF_RSQL_INVALID_REQUEST.
What Happened? The current ABAP/4 program terminated due to an internal error in the database interface. What can you do? Make a note of the actions and input which caused the error. To resolve the problem contact your system administrator. You can use transaction ST22 (ABAP dump analysis) to view and administer termination messages, especially those beyond their normal deletion date. Error analysis.
In a statement, an invalid request was made to the database interface when accessing the table “EKKO”.
SAP Runtime error transactions and ABAP programs
ST22 –ABAP runtime error
RSLISTDUMPS – List All Runtime Errors and short description
RSSHOWRABAX – Program associated with ST22
SAP Runtime error tables
SNAP – ABAP/4 Snapshot for Runtime Errors (ST22 list)
SNAPTID – ABAP Runtime Errors – Uses SNAPT as a text table so Includes first text line(TLINE)
SNAPT – ABAP Runtime Error Texts
SNAPTTREX – Exception table for translation
Runtime Error categories (SNAPTID-CATEGORY)
Field: SNAPTID-CATEGORY
Domain: S380CATEGORY
- I Internal Error
- R Error at ABAP Runtime
- Y Error at Screen Runtime
- D Error in Database Interface
- A ABAP Programming Error
- F Installation Errors
- O Resource Shortage
- E External Error
- U End User Error
- K No Error
- S ST Runtime Error
- J Internal ST Error
- X XSLT Runtime Error& Text Include (no Short Dump, only Text Module)
- & Text Include (no Short Dump, only Text Module)
- B ITS Error
- Q Error in Open SQL
- – Unclassified Error
Most common SAP runtime errors
Below is a list of some of the more common runtime errors including a link to full details of the error and what causes it.
DBIF_RSQL_INVALID_REQUEST
MESSAGE_TYPE_X
TIME_OUT
OPEN_DATASET_NO_AUTHORITY
CONVT_NO_NUMBER
GETWA_NOT_ASSIGNED
TSV_TNEW_PAGE_ALLOC_FAILED
LOAD_PROGRAM_CLASS_MISMATCH
LOAD_PROGRAM_INTF_MISMATCH
An ABAP program can be terminated during its runtime for a number of different reasons. The database table SNAPTID lists all existing runtime errors (in total, around 1900).
To allow clearer processing, the runtime errors are divided into categories:
Internal errors |
Error in the VM -> can only be reported to SAP using an error message. |
Errors in the ABAP runtime Errors in the screen runtime Errors in the database interface |
The system was able to roughly determine the area in which the error occurred. Next, clarify whether it was triggered by an internal error or by a programming error. |
ABAP programming errors |
Errors in the ABAP program, such as a division by zero or a catchable exception that was not caught. |
Installation errors |
These include, for example, inconsistencies between the kernel and the database. A typical installation error is therefore the error START_CALL_SICK |
Resource bottleneck |
Typical example: SYSTEM_NO_ROLL. The application no longer has sufficient memory available. |
External errors |
The error was caused by a call outside the system. Example: ● The code page of the operating system does not match the SAP system language ● An incorrect logon attempt occurred when calling outside the SAP system (for example, RFC SDK). |
End user errors |
These errors include, for example, incorrect end user printer settings. |
No error |
The program was not terminated due to an error, but rather due to deliberately performed actions. Example: If an administrator actively cancels a running transaction, the RABAX SYSTEM_CANCELED is thrown. In cases like this, no error correction is required. |
ST runtime errors |
The error occurred during a Simple Transformation (ST). The cause is a programming error in the ST program. |
Internal ST errors |
The error occurred during a Simple Transformation (ST). There is an internal error in the ST VM. |
XSLT runtime errors |
The error occurred during the execution of an XSLT transformation. |
ITS errors |
The error occurred in ITS. These are usually HTMLB errors, however the error could also be due, for example, to a resource error within the ITS. |