Entering content frameFunction documentation Fault Message Type Locate the document in its SAP Library structure

Use

Fault message types are designed for application-specific errors that occur on the inbound side and that are reported back to the sender or persisted in monitoring.

Application-specific here means that the application on the inbound side triggers the error itself because, for example, the request message did not contain sufficient information.

Integration

A fault message type is a special message type that can be used in message interfaces. As with a message type, a fault message type is made up of data types (see below). Fault message types are not permitted for asynchronous outbound message interfaces.

Prerequisites

See the Prerequisites section in introduction to interface development.

Features

Structure of a Fault Message Type:

Data Part

Use

Standard Data
(obligatory)

Use this data part to return the fault message standard information for an error at runtime. All fault message types reference for this part the data type ExchangeFaultData and, indirectly, the data type ExchangeLogData. These data types are automatically created in a namespace when you create the first fault message type there.

Additional Data (optional)

Use this data part to attach any additional application-specific information to the fault message. To do so, reference any data type in the same software component version or in a sub-software component version.

When a proxy is generated from a message interface, an exception class is generated for a fault message type that you can use to handle application errors at runtime (also see the example below).

Also see: Fault Messages (ABAP) or Fault Messages (Java).

Activities

  1. Create a fault message type in the design maintenance of the Integration Builder (see: Creating a New Object).
  2. Enter a description for your fault message type.
  3. The fault message only comprises the standard data part in the default setting. If you require the additional data part, check the checkbox Additional Data and specify a data type for the structure of this data. The data type can be in the same software component version or in a sub-software component version.
  4. Save your changes.

Example

In the example below, an ABAP receiver reports back to a Java sender that an application error has occurred during inbound processing:

This graphic is explained in the accompanying text

To handle the error, you first create a fault message type Fm in the Integration Repository that is referenced by both message interfaces. When you generate the proxies for the message interfaces, the exception classes FmException (Java) and CX_FM (ABAP) are generated. The graphic shows how the error is transferred after the application on the ABAP side has transferred the corresponding data to the exception class CX_FM and triggered it with RAISE. The proxy framework generates a fault message from the exception class data that is sent to the sender. The exception for the exception class FmException is then triggered at the sender so that the error can be handled there.

 

 

 

 

Leaving content frame