com.sap.conn.jco

## Class AbapException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.sap.conn.jco.JCoException
      - - com.sap.conn.jco.AbapException

- All Implemented Interfaces:
    Serializable

      public class AbapException
      extends JCoException

  A convenience class on top of JCoException that reports exceptions, which occurred in an SAP system, while processing a function module. Server functionality for JCo implementing a function module in Java could also define such exceptions in their interface, and hence throw such an exception.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.sap.conn.jco.JCoException

      `JCO_ERROR_ABAP_CLASS_EXCEPTION, JCO_ERROR_ABAP_EXCEPTION, JCO_ERROR_APPLICATION_EXCEPTION, JCO_ERROR_CANCELLED, JCO_ERROR_COMMUNICATION, JCO_ERROR_CONCURRENT_CALL, JCO_ERROR_CONFIGURATION, JCO_ERROR_CONVERSION, JCO_ERROR_CREATE_SESSION, JCO_ERROR_DATA_PROVIDER_ERROR, JCO_ERROR_DESTINATION_DATA_INVALID, JCO_ERROR_DESTROY_SESSION, JCO_ERROR_DSR_LOAD_ERROR, JCO_ERROR_EXTENSION, JCO_ERROR_FIELD_NOT_FOUND, JCO_ERROR_FUNCTION_NOT_FOUND, JCO_ERROR_ILLEGAL_ARGUMENT, JCO_ERROR_ILLEGAL_STATE, JCO_ERROR_ILLEGAL_TID, JCO_ERROR_INITIALIZATION, JCO_ERROR_INTERNAL, JCO_ERROR_INVALID_HANDLE, JCO_ERROR_INVALID_REPOSITORY_CACHE, JCO_ERROR_JARM_LOAD_ERROR, JCO_ERROR_LOGON_FAILURE, JCO_ERROR_NOT_SUPPORTED, JCO_ERROR_NULL_HANDLE, JCO_ERROR_PASSIVATE_SESSION, JCO_ERROR_PASSWORD_CHANGE_REQUIRED, JCO_ERROR_PROGRAM, JCO_ERROR_PROTOCOL, JCO_ERROR_REGISTRATION_DENIED, JCO_ERROR_REPOSITORY_SERIALIZATION, JCO_ERROR_REQUEST_CANCELLED, JCO_ERROR_RESOURCE, JCO_ERROR_RESTORE_SESSION, JCO_ERROR_SERVER_DATA_INVALID, JCO_ERROR_SERVER_STARTUP, JCO_ERROR_SESSION_REF_NOT_VALID, JCO_ERROR_SHAREABLE_CONTAINER, JCO_ERROR_STATE_BUSY, JCO_ERROR_SYSTEM_FAILURE, JCO_ERROR_TIMEOUT, JCO_ERROR_UNSUPPORTED_CODEPAGE, JCO_ERROR_XML_PARSER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbapException(String key)` Creates an exception with the specified key.
    `AbapException(String key, String message)` Creates an exception with the specified key and the given message text.
    `AbapException(String key, String messageClass, char messageType, String messageNumber, String[] messageParameters)` Creates an instance of the exception object with the specified key and more information for ABAP messages (so-called T100 messages).

  - ### Method Summary

    - ### Methods inherited from class com.sap.conn.jco.JCoException

      `getGroup, getKey, getMessageClass, getMessageNumber, getMessageParameter, getMessageParameters, getMessageText, getMessageType, toString`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AbapException

          public AbapException(String key)

      Creates an exception with the specified key. This constructor is normally used in the server's `handleRequest()` methods to throw an exception which is part of the function interface definition. In such a case the SAP system will not raise a system failure. If however the specified key is not a defined exception for the currently processed function module the SAP will raise a system failure.
      Parameters:
        `key` - the key for the exception as specified in the function interface

    - #### AbapException

          public AbapException(String key,
                       String message)

      Creates an exception with the specified key and the given message text.
      Parameters:
        `key` - the key for the exception
        `message` - a message text describing the exception cause

    - #### AbapException

          public AbapException(String key,
                       String messageClass,
                       char messageType,
                       String messageNumber,
                       String[] messageParameters)

      Creates an instance of the exception object with the specified key and more information for ABAP messages (so-called T100 messages).
      Parameters:
        `key` - the key for the exception as specified in the function interface
        `messageClass` - the specified ABAP message class.
        `messageType` - the specified ABAP message type, e.g. 'A' or 'E'
        `messageNumber` - the specified ABAP message number
        `messageParameters` - the specified ABAP message parameters, can be a maximum of 4

Copyright © 2016 SAP. All Rights Reserved.