Skip to Content
Author's profile photo Former Member

POV: FEH or AIF or Custom Error Handling

Any typical SAP implementation landscape, has a  multitude of 3rd Party or Legacy Systems. Business Operations mandate interface between the 3rd party systems and SAP.  In such a situation, errors on interfaces are inevitable due to multiple point of failures.  The diagram below depicts such failure points

5-3-2013 9-59-22 AM.png

The following is a brief description of the various POF.



Functional Errors

Errors that occur as a result of incorrect business data

Technical Errors

Errors that occur as a result of technical capability not operating as anticipated


An event that will kick-off a Business process in SAP


Moving data from the source system to PI


Moving data from the PI to the target system


Logic used within the SAP system to process the data


Mapping data from source to destination


Point of Failure

The errors on the Point of Failures (  Trigger/Extract/Load/Transformation) can be handled via multiple robust techniques, such as CCMS/Alert Monitoring in PI etc.

This blog focuses on the Point of Failure “PROCESS”. This is a step during interface processing when data is processed locally in the SAP system.  There are error situations e.g.  Locking Business Objects like Business Partners, Purchase Orders etc. or Missing Configuration etc. which could lead to failures in the transactions being processed.

In most cases these errors need to be resolved locally on the target system, without a restart from the source. 

What I have seen as Typical Requirements for such situations are :

  1. A generic/plug-able framework required. This should be reusable across all interfaces
  2. Ability to display errors in a consistent manner. This should easily be understood by business users
  3. Ability to  re-process errors, in some cases automatically as well
  4. Ability to support multiple inbound communication protocols like IDOCs and Proxies.

Given these,  the next question is to determine a technology which can meet the above requirement.  There are multiple technologies available from SAP to support this some examples are FEH (  Forward Error Handler), AIF ( Application Interface Framework), along with custom solutions which can be built. 

Let us start with a brief description of such technologies.

Forward Error Handler:

Forward Error handler is a technology available in the ABAP Runtime, based on SAP’s ECH ( Error and Conflict Handler Framework).  This leverages the SAP Post processing office.  It has support only for Asynchronous messages with an integration pattern involving inbound ABAP Proxies.

Error monitoring and display is done within the post processing office ( transactions /SAPPO/PPO2 and /SAPPO/PPO). 

More Details can be found here

Application Interface Framework:

SAP AIF or Application Interface Framework is a robust tool from SAP, which supports Interface development and error handling.  It has support for both IDOC and Proxy based integration pattern.  It has support mainly for Async messages. Error monitoring can is handled via the transaction /AIF/ERR etc.

More Details can be found at–idoc-processing-with-aif-actions

Custom Error Handling Framework:

In many cases, custom error handling frameworks are build using the robust SAP IDoc Monitoring technology.  In case of proxy based integration pattern, custom error idocs are generated, with a structure similar to the inbound proxy from within the inbound proxy code.  These Idocs can capture locking error as well as transient configuration errors.  The error monitor is the default transactions like WE02/WE05 etc. and reprocessing can happen via transactions like BD87.

In my opinion the frameworks above can be compared as below, based on the given parameters.




Custom Framework

Licensing Cost

No additional Cost

Has additional Licensing cost

Minor custom development cost

Interface Pattern-Synchronous




Interface Pattern- Asynchronous




Support for ABAP Proxies




Support for IDOCs




Error Monitoring

Yes – Via Post Processing office

Yes – via /AIF/ERR

Yes – via standard Idoc tools

Framework Development Effort



Yes – to build reusable classes for generating IDOCs from proxies


Mostly Technical Perspective – XML payload like representation, difficult for business users to comprehend

Mostly Technical Perspective

Uses standard IDOC transactions like WE02/WE05/BD87,  business users habituated with this

Start-up Configuration


Major – including setup and installation ( Configurations similar to FEH)

minor ( Includes defining partner profiles)

Payload Manipulation

Yes – via PPO


Yes – via IDOC transactions

Error Reprocessing

Yes – Manual and Auto

Yes – Manual

Yes – Manual and Auto

In my opinion, the choice of the framework should be tied to one of the above parameters.  Just as an example of a few business case examples:

Custom frameworks can be used when:

  • Cases in which cost, business user usability is important.
  • Majority interface patterns are IDOC Based and do not require additional transformations at the target.
  • Configuration/Installation time needs to be reduced.

FEH can be used when:

  • In case of Integration patterns heavily using SAP Enterprise services

AIF can be used when:

  • When cost and configuration is not a factor
  • Target side mapping( post PI mapping ) is required.
  • Patterns need to support both IDOCs and Proxies.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Michal Krawczyk
      Michal Krawczyk


      nice compare but please add a few things:

      1. if you share links please include the AIF and FEH blogs from SDN (many on PI space)

      so the users can start up working on that if they want/need to



      2. on the compare table - there are also some changes to be done:

      a) with AIF - there's no automated error processing - so please remove it from the table

      unless you know a report for autoamted reprocessing of AIF errors

      b) start up configuration - same effort for both (the only diffrence is installation in terms of AIF)

      c) usability navigation - AIF - this is only for business users not at all for technical people - the whole idea of AIF is that it's used by business people

      d) development effort - with AIF in case of IDOCs or custom proxies you need to do the coding yourself, same thing with FEH in case you want to go for custom proxy - so there's certainly a coding effort involved

      Thank you for considering those changes,


      Michal Krawczyk

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks Michal.

      I have done a few updates to my Blog.

      A few remarks though.

      Development Effort is the actual framework development effort,

      On the usability front, though AIF gives a lot of flexibility to business users, to define rules/mappings etc along with robust Error monitoring transactions,  I have been on clients where business users require a more simplified view of the errors, with special drill-up and drill-up capabilities.

      for e.g., I have been on a Utility Client, and they want to use EMMA cases to report errors.  The advantage being, the ability to roll-up errors to SAP business objects, and easy launch of  base ECC transactions.

      In some cases ( typically in case of upgrades/re-implementations) users are comfortable with IDOCs and their structures, to understand and resolve errors.

      Author's profile photo Michal Krawczyk
      Michal Krawczyk


      thank you, I appreciate it,


      Michal Krawczyk

      Author's profile photo Former Member
      Former Member

      Hi Abhishek Vinayaka,

      on the data declaration is missing for

        i_partner        = i_partner
          i_credit_sgmnt   = i_credit_sgmnt
          i_amount         = i_amount
          i_currency       = i_currency
          i_checkrule      = i_checkrule
          i_checkseverity  = i_checkseverity
          i_retrieval_flag = i_retrieval_flag
          i_effective_date = i_effective_date
          i_log_reference  = i_log_reference
          it_schedule      = it_schedule ?

      Can you give this data declaration?

      Additional the blog says: „Prerequisites: Standard FSCM Credit Worthiness Scenario has been enabled in ECC/PI. “ What needs to be done before the implementation of BADI_SD_CM? Do you mean the following points need to be implemented?

      WS-RM Based Integration.
      Step 1: Navigate to SOAMANGER

      Step 2: Selection of the Server Proxy Name

      Step 3: Service Creation (Server)

      Step 4: Setting Up Bindings (Server)

      Step 5: Setting up Security Details (Server)

      Step 6: Choosing the Binding Name (Server)

      Step 7: Display End-point (Server)

      Step 8: Select the consumer proxy

      Step 9: Define Logical Port (Consumer)

      Step 10: Configure logical port (Consumer)

      Step 11: Set Up Service User for Web Service Consumption

      So both WS-RM and FSCM via Direct Update in ECC need to be configured at the same time?