0% found this document useful (1 vote)
508 views17 pages

Forward Error Handling (FEH) For Proxy

Forward Error Handling (FEH) for Proxy is a concept to handle forward errors in a Process Flow. FEH is based on the concept of retry, confirm and discard. It is used to handle a forward error in the Process Flow of a process. The information contained in this document is confidential and proprietary to TATA Consultancy Services. It may not be released in whole or in part outside TCS for any purpose without the express written permission of TCS.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
508 views17 pages

Forward Error Handling (FEH) For Proxy

Forward Error Handling (FEH) for Proxy is a concept to handle forward errors in a Process Flow. FEH is based on the concept of retry, confirm and discard. It is used to handle a forward error in the Process Flow of a process. The information contained in this document is confidential and proprietary to TATA Consultancy Services. It may not be released in whole or in part outside TCS for any purpose without the express written permission of TCS.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Forward Error Handling (FEH) for Proxy

24/01/2013

CIAL
Saritha Rema
SAP

[email protected]

Confidentiality Statement
Include the confidentiality statement within the box provided. This has to be legally
approved
Confidentiality and Non-Disclosure Notice
The information contained in this document is confidential and proprietary to TATA
Consultancy Services. This information may not be disclosed, duplicated or used for any
other purposes. The information contained in this document may not be released in
whole or in part outside TCS for any purpose without the express written permission of
TATA Consultancy Services.

Tata Code of Conduct


We, in our dealings, are self-regulated by a Code of Conduct as enshrined in the Tata
Code of Conduct. We request your support in helping us adhere to the Code in letter and
spirit. We request that any violation or potential violation of the Code by any person be
promptly brought to the notice of the Local Ethics Counselor or the Principal Ethics
Counselor or the CEO of TCS. All communication received in this regard will be treated
and kept as confidential.

Table of Content
1.

Forward Error Handling ....................................................................................................................................... 4


1.1

2.

Process Flow ....................................................................................................................................................... 7


2.1

3.

Implementation of Action Class ................................................................................................................... 9

Post Processing Office ....................................................................................................................................... 12


4.1

Proxy Class .................................................................................................................................................. 7

Action Class ......................................................................................................................................................... 9


3.1

4.

Configuration............................................................................................................................................... 4

Retry, Confirm and Discard Modes............................................................................................................. 15

1. Forward Error Handling


FEH is a concept to monitor and resolve errors in asynchronous inbound processing on the receivers side for
Enterprise Services.
Error and Conflict Handler (ECH) is the error handling tool implementing the concept of FEH. For monitoring
purposes it reuses the tool Post Processing Office (PPO) for displaying error handling orders.

1.1 Configuration
Step1: Activate Error and Conflict Handler in TCODE SPRO.

This will activate the ECH at ERP instance level.

Step2: Business Component and Business Process

This configuration is optional and only required for custom objects and is part of the Post Processing
Office.
TCODE: SM30, View: /SAPPO/VS_BPROC

Step3: Define Process Data

This is where the Action Class (from Proxy Class) is assigned to the Business Component and Business
Process. TCODE: SM30, TABLE: ECHVC_PROCESSES

Action Class Name

Step4: Define Post Processing

Assign the ECH Business Component and Business Process to the Post processing Business Component and
Business Process. TCODE: SM30, TABLE: ECHVC_PP_PROCESS

Step5: Proxy Class & Method Assignment

This configuration will link the Business Component & Process to the Proxy Class & Method.
Note that the proxy class here is an interface object.
Without this configuration, you will get an Exception is not handled error during the runtime, in the RFC
Queue.

TCODE: SM30, TABLE: FEHVC_PROXY2CMPR

We defined different Business Process for each interface to identify the proxy class and method from
Action class. Action class will be generic to all incoming proxys.

2. Process Flow
SAP ERP
Inbound Service

Proxy Framework
Standard Proxy Logic

Proxy Class
(Custom Class, implementing Proxy
Interface,
Auto-generated)
Action Class
(Custom Class, implementing ECH
Interface: IF_ECH_ACTION, collecting
error messages for FEH)
Standard Proxy Logic, including:
- Persistent (Store the data for
Postprocessing)

Inbound proxys in ERP system normally throws an exception in case something went wrong. FEH process will try
to change this behavior and whenever an exception is thrown, the message will be passed to the ECH service in
order to be able to process it in Post Processing Office.

2.1 Proxy Class


Proxy Class is auto-generated while implementing the service in the ERP environment via SPROXY.
Steps:
1. Add in Constructor and get_instance Methods to retrieve the protocol.

No Parameters added. Exceptions defined for constructor as shown below.

Implement the constructor and get_instance methods.


Define Attributes as below:

2. Implement the method from the Proxy Interface:


Add the Business logic inside Proxy Method.
Exceptions and parameters declared as below.

3. Action Class
Action Class is manually created in TCODE SE24, to cater for the processing in Async service.

3.1 Implementation of Action Class


1. Implement the interface IF_ECH_ACTION

2. Create attribute SO_INSTANCE

3. Implement the methods for IF_ECH_ACTION (mandatory for all methods):

IF_ECH_ACTION~S_CREATE: Method use to create the instance of the Action Class.


Implement the Action Class COLLECT_ERROR method. This is the method collects the error and posts in
PPO desktop.
During the collect, the object type & object key can be passed to the ECH framework. This info will be used
to display the available processing methods in Post Processing.

10

The error messages will have the below status (Transferred to external application) in transaction SXMB_MONI.

In case if there are no errors, the document would be posted successfully and SXMB_MONI will have the message
status
processed successfully.
In TCODE: /n/SAPPO/PPO2 (Edit Postprocessing Order), the screen looks as shown below

11

4. Post Processing Office


1. /SAPPO/PPO2 Edit Postprocessing Order
2. /SAPPO/PPO3 Display Postprocessing Order
Process changes Order status
from New to Inprocess

If no error exist, we can send out confirmation message in this method, or we can let the application send out the
message, e.g. via output type.

12

These action buttons are controlled by the FEH


Implemented Interfaces in the Action Class:
1. Repeat
2. Confirm
3. Discard

= method IF_ECH_ACTION~RETRY
= method IF_ECH_ACTION~FINISH
= method IF ECH ACTION~FAIL

Status change

The Error Category is determined by the logic


in the Action Class (COLLECT_ERROR) and
passed into the FEH Collect method.
Different service will have different logic to
determine the Error Category, and it can be
only determined by the Error Type, Error Class
& Error ID.
The Mode is determined based on the
configuration in TCODE ECH_RESOL_COMP

FEH-PPO Default Resolution Strategy Configuration (ECH_RESOL_COMP)

This configuration will control the FEH-PPO Processing Mode, Retry Mode, etc:
a.
b.
c.
d.

e.

13

[Column Group, Retry Modus] The Automatic Retry intervals by assigning to specific group, plus
activating batch job via TCode: /SAPPO/RESUBMIT
[Column Conf. Mode] This can control whether the object in error can be reprocessed manually or
not.
[Column Disc. Mode] This can control whether the object in error can be discarded.
[Column Persistent, Transient] These controls whether the object in error should be reprocess by
system, before it is transfer to the post processing (persistent).
Use case: if the object is locked by other user, system will try to reprocess it before it is transfer to
postprocessing.
[Column Error Category] This has to match the error category raised in the program/proxy class.
The program will typically derive the error category based on the error message, error type and
error class. The logic to derive this error category depends on the service (typically it picks up the
first error or abort message from the processing).

FEH Error Category


DCE.ITE
PRE
PRE.AUE
PRE.TEE.LRE
PRE.VAE

14

Description
Customizing Error
Process Error
Authorization Error
Lock Error
Value Error

4.1 Retry, Confirm and Discard Modes


1. Method: IF_ECH_ACTION~RETRY
When PPO issue Repeat action, this method will be called.
We can issue the Success/Error service in this method.
The flow logic:
1. Initialize the FEH class with the retry object id:
cl_feh_registration=>s_retry
2. Fetch the component and Business Process from Order header based on Order ID in PPO.
3. Fetch the Interface and Method mapped to the Business process in PPO configuration to get
the Class name.
4. Get the structure details from Payload tables.
5. Create the structure dynamically and retrieve the Inbound data:
Call method from [FEH Class Instance]->retrieve_data
6. Call the class and method dynamically to reprocess the Business logic.
7. Conclude the retry process:
Call method from [FEH Class Instance]->resolve_retry
8. Note on return parameter: E_EXECUTION_FAILED & E_RETURN_MESSAGE
If the return parameter E_EXECUTION_FAILED is set to ABAP_TRUE, the post processing will be
terminated with error message = E_RETURN_MESSAGE and all the processing/validation
messages will not be displayed:
If it is leave empty ( = ABAP_FALSE ), the processing/validation error messages will be handled
by the resolve_retry method, and will be displayed in the post processing:
Note: Upon successful reprocessing, there is no detail message, such as Accounting Document No xxx Created. It
only displays Posting Successful at [date & time].

2. Method: IF_ECH_ACTION~FAIL
When PPO issue Discard action, this method will be called.
We can issue the Discard/Error service in this method.
The flow logic:
1. Retrieve the Inbound service data by calling method: cl_feh_registration=>s_retrieve_data.
2. Register the error to ECH/Post processing by calling method: cl_feh_registration=>s_fail.
This is where the error data are written into the database and Post processing is completed.
9.
3. Method: IF_ECH_ACTION~FINISH
15

When PPO issue Confirm action, this method will be called.


We can issue the Confirm/Success service in this method.
The flow logic:
Conclude the ECH/Post processing by calling method: cl_feh_registration=>s_finish.

16

Thank You

Contact
For more information, contact [email protected](Email Id of ISU)

About Tata Consultancy Services (TCS)


Tata Consultancy Services is an IT services, consulting and business solutions
organization that delivers real results to global business, ensuring a level of certainty no
other firm can match. TCS offers a consulting-led, integrated portfolio of IT and ITenabled infrastructure, engineering and assurance services. This is delivered through its
unique Global Network Delivery ModelTM, recognized as the benchmark of excellence in
software development. A part of the Tata Group, Indias largest industrial conglomerate,
TCS has a global footprint and is listed on the National Stock Exchange and Bombay
Stock Exchange in India.
For more information, visit us at www.tcs.com.

IT Services
Business Solutions
Outsourcing
All content / information present here is the exclusive property of Tata Consultancy Services Limited (TCS). The content /
information contained here is correct at the time of publishing. No material from here may be copied, modified, reproduced,
republished, uploaded, transmitted, posted or distributed in any form without prior written permission from TCS.
Unauthorized use of the content / information appearing here may violate copyright, trademark and other applicable laws,
and could result in criminal or civil penalties. Copyright 2011 Tata Consultancy Services Limited

17

You might also like