Class AbapErrorInfo


  • public final class AbapErrorInfo
    extends java.lang.Object
    This class represents an instance of BAPI RFC Return structure information.
    • Constructor Summary

      Constructors 
      Constructor Description
      AbapErrorInfo​(java.lang.String message, java.lang.String errorNum, java.lang.String severityFlag)
      Create a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getInternalSource()
      Miscellaneous context information.
      java.lang.String getMsg()
      Get the message string.
      java.lang.Integer getMsgNum()
      Get the message number.
      boolean isError()
      Get the error indicator.
      boolean isMissingUserError()
      Convenience method to determine if error indicates that the specified user does not exist.
      boolean isWarn()
      Get the warning indicator.
      void setInternalSource​(java.lang.String s)
      Miscellaneous context information.
      java.lang.String toString()
      Make string representation of this instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbapErrorInfo

        public AbapErrorInfo​(java.lang.String message,
                             java.lang.String errorNum,
                             java.lang.String severityFlag)
                      throws java.lang.IllegalArgumentException
        Create a new instance.
        Parameters:
        message - The message returned from SAP RFC.
        errorNum - The error number indicator.
        severityFlag - The severity indicator from the RFC.
        Throws:
        java.lang.IllegalArgumentException - if any params are null.
    • Method Detail

      • getMsg

        public java.lang.String getMsg()
        Get the message string.
        Returns:
        The message.
      • getMsgNum

        public java.lang.Integer getMsgNum()
        Get the message number.
        Returns:
        The message number.
      • isError

        public boolean isError()
        Get the error indicator.
        Returns:
        true if ABAP error was returned, false otherwise.
      • isWarn

        public boolean isWarn()
        Get the warning indicator.
        Returns:
        true if ABAP warning was returned, false otherwise.
      • setInternalSource

        public void setInternalSource​(java.lang.String s)
        Miscellaneous context information.
        Parameters:
        s - The value.
      • getInternalSource

        public java.lang.String getInternalSource()
        Miscellaneous context information.
        Returns:
        s The value.
      • isMissingUserError

        public boolean isMissingUserError()
        Convenience method to determine if error indicates that the specified user does not exist.
        Returns:
        true if getMsgNum() == 124.
      • toString

        public java.lang.String toString()
        Make string representation of this instance.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A formatted string of the as follows: {SEVERITY}: {MESSAGE} {(ERROR_NUMBER)} {(CONTEXT)}.