You are on page 1of 22

Orange County Convention Center

Orlando, Florida | May 15-18, 2011

Forward Error Handler Error Handling for


Asynchronous Web Services
Krishnakumar (KK)
Ramamoorthy
Deloitte Consulting LLP

[ Agenda
Motivation for this session

About the Tool Key Learning Points


How to use it Best Practices

Lessons Learned Key take aways

Real Experience. Real Advantage.

[ Errors are Inevitable..

Real Experience. Real Advantage.

[ Forward Error handler (FEH)


Built on Post
Processing Office
(PPO) toolset

Monitoring

Role based alerts

Notifications

Customizable error
categories
Automatic resolution
of transient errors

Forward
Error
Handler

Forward navigation
to the underlying
application data

Proactive alerting
through emails and
SMS

Automatic
Reprocessing

Error
Correction

Payload Editor to fix


data errors
Built for error
handling by business
users

Forward Error Handler is a framework whereas Error and


Conflict Handler (ECH) is the toolset for handling errors
Real Experience. Real Advantage.

[ Typical Asynchronous Service Integration


Enterprise Service
Builder

WSDLs

SAP
Business
Suite

Service Proxy Class

SAP PI

XI

WS-RM

Inbound
Queues
Service Implementation

Service
Consumer

WS-RM
Yes

Raise
Exception

Real Experience. Real Advantage.

Errors?

No

Application

[ Asynchronous Service Integration with FEH


XI

SAP PI

Inbound
Queues

SAP
Business
Suite

Service Implementation

FEH Action Class

Service
Consumer

WS-RM

Yes

Errors?
No

Monitoring

Notifications

Application

Forward
Error Handler
Auditing

Payload Editor

Reprocessing
Manual /Automatic

Real Experience. Real Advantage.

[ Code Sample Service Implementation w/o FEH

Fill Error Details

Raise Exception on Error

Raise Proxy Exception

Real Experience. Real Advantage.

[ Code Sample Service Implementation with FEH


Declare an Action Class

Execute the business logic in


the Action Class

Errors? Initialize FEH/ECH

Use Collect method to pass


error information to the ECH
Call method Callback so that
the error can be handled using
Post Processing Office (PPO)

Real Experience. Real Advantage.

[ Action Class
The action class implements the business logic of the service
To enable FEH, the action class must also implement the interface,
IF_ECH_ACTION
Following methods of interface IF_ECH_ACTION must be
implemented to handle the errors using PPO
Method

Description

S_CREATE

Used for creating an instance of the action class

RETRY

Used to implement the Retry logic in case of errors; usually


will call the Execute method of the action class to execute
the business logic

FINISH

Used to confirm the PPO message after resolving the error


and posting the message using RETRY method; can be
used for sending positive acknowledgement to the sender

FAIL

Used to discard the message if the errors cannot be


corrected ; can be used for sending negative
acknowledgement to the sender

Real Experience. Real Advantage.

[ Code Sample Action Class


S_CREATE

S_FAIL

S_FINISH

Real Experience. Real Advantage.

10

[ Code Sample Action Class contd


S_RETRY

Create an instance of the FEH


for the PPO object in error
Retrieve the structure
definition for the payload

Retrieve the payload data in


to the structure
Execute the business logic to
post the data

Real Experience. Real Advantage.

11

[ Error and Conflict Handler (ECH) monitor


Resolution Options

Multiple Application specific tabs

Invoke Payload Editor to edit data

Descriptive Error Messages


Real Experience. Real Advantage.

12

[ Configuration Settings
1. Activate FEH Globally
Cross Application Components -> Process and Tools for Enterprise Applications ->
Enterprise Services -> Error and Conflict Handler -> Activate Error and Conflict
Handler

2. Define ECH Process Data


Cross Application Components -> Process and Tools for Enterprise Applications ->
Enterprise Services -> Error and Conflict Handler -> Define Process Data
(View : ECHV_PROCESS)

Real Experience. Real Advantage.

13

[ Configuration Settings Contd


3. Define Software Component for PPO
Cross Application Components -> General Application Functions -> Post Processing
Office -> Software Components -> Define Software Components
(View : SAPPO/VC_CMPNT)

4. Define Business Process for PPO


Cross Application Components -> General Application Functions -> Post Processing
Office -> Business Processes -> Define Business Processes
(View : /SAPPO/VC_BPROC)

Real Experience. Real Advantage.

14

[ Configuration Settings Contd


5. Assign ECH to PPO
Cross Application Components -> Process and Tools for Enterprise Applications ->
Enterprise Services -> Error and Conflict Handler -> Define Post Processing
(View : ECHS_PP_PROCESS)

6. Assign Proxy Class & Method to ECH


View : /SAPPO/VC_BPROC

Real Experience. Real Advantage.

15

[ Overview of Configuration Settings


ECH Settings

Resolution
Strategy

Authorizations for
Payload Editor

PPO Settings

Assign
Priorities

Work Lists

Software Component
ZINT_SAMPLES

Software Component
ZINT_SAMPLES_PPO

Business Process
ZFEH_ERROR_HANDLER_SAMPLE

Business Process
ZFEH_PPO

Action Class

Persistence Class
Notification Class

Real Experience. Real Advantage.

WS Proxy Class
WS Proxy Method

Edit Transaction

Business Objects

Display
Transaction

Custom tabs in
Order Area

16

DEMO
Common Error Handler Framework

Real Experience. Real Advantage.

17

[ Common Error Handler Framework


1. Create a method called PostBusinessLogic in the service
implementation class and implement the business logic
2. In the main method of the service implementation class, call the
Execute method of the Action Class
3. Pass the input data as well as name of the service implementation
class to the Execute Method
4. In the Execute Method, using Run Time Type Services (RTTS),
create an instance of the service implementation class
5. Pass the input data to the method PostBusinessLogic of the
service implementation class instance created above

Real Experience. Real Advantage.

18

[ Common Error Handler Framework contd


6. On Error, trigger PPO order creation using FEH; pass the service
implementation class name to the PPO object using the
I_HIDDEN_DATA parameter of the Collect method

7. In the S_RETRY method, retrieve the hidden data to get the name
of the service implementation class
8. Using Run Time Type Services (RTTS), create an instance of the
service implementation class
9. Pass the input data to the method PostBusinessLogic of the
service implementation class instance created above

Real Experience. Real Advantage.

19

[ Best Practices
1. Plan for using the FEH even before starting to code interface
programs
2. Design a Common Error Handling framework to minimize
development and user training effort
3. Define the Security role framework for handling interface errors
using FEH, early in the implementation
4. Design the Notification Framework early in the implementation
5. Identify training needs for using the FEH user interface

Real Experience. Real Advantage.

20

[ Key Learnings
1. Forward Error Handler (FEH) is the tool of choice for handling
Asynchronous Service Errors in Business Suite Applications
2. FEH allows role based proactive error handling and monitoring
3. FEH can be used for changing the payload data using an out-of-the
box editor

4. FEH can be used for both automatic and manual error processing
5. FEH provides application specific error information and forward
navigation within the application
6. FEH can be customized to suite specific customer requirements

Real Experience. Real Advantage.

21

Thank you for participating.


Please remember to complete and return your
evaluation form following this session.
For ongoing education in this area of focus, visit
www.asug.com.
SESSION CODE: 3714

Real Experience. Real Advantage.

You might also like