Developer Guide For EMMA
Developer Guide For EMMA
Developer Guide For EMMA
The generic tool Enhanced Message Management Analysis (EMMA) analyzes any
collection of T100 like messages. A one-stop shop for the analysis of executed business
processes, automatic handling of possible exceptions via built-in case management, and
KPI analyses in BW. The following are the three main features/functionalities:
• Message analysis
Monitor business processes (dialog transactions or background jobs that create
application logs, IDoCs, background job logs, workflow logs, system logs, etc.) at
one central place instead of going to several different transactions. View statistical
information, i.e. number of business objects processed, number of successfully
processed and erroneous objects, and number of messages logged. The messages
are grouped per business object. Directly drill down to the business objects
involved in the messages.
• Case Management
Define exceptions based on combination of messages and the business objects
within to create cases and use role resolution to distribute them. This can be done
just with customizing and no programming is necessary.
EMMA is a generic framework where all the executed business processes (either within a
SAP or non-SAP system) can be monitored and analyzed. The framework is based on the
messages raised or issued by the executed processes and it does not matter where they are
stored originally. In this document we will discuss what needs to be done in order to
analyze a process/job in EMMA.
1. Define the Business Process Area (BPA) and Business Process Code (BPC) if
they have not yet been defined in the system. This should be defined by the
Solution Management with the help of the application owner/developer for SAP
delivered processes while customers can define their own processes by using the
SAP standard naming conventions for customers.
4. If the application/process is not writing the logs (application log, workflow log,
IDOC or etc) anywhere in the system, then you have to create one.
5. Create log messages for the start and end of each business object processed.
Let’s look into to the details for each task.
2. Customizing in IMG
There are two parts of customizing.
- Codes for business process and area (BPC and BPA) with switch as not active
(customer should decide to activate it or not)
- Class methods to read and analyze the messages for a process. These methods
need to be classified for each delivered business process code (BPC)
For details please check the section 4.4.2 in the cook book.
Every business process that is going to be monitored via EMMA must write
messages in the system i.e. the information about the business object in the
process during its execution. Some applications have their own database to store
these messages for example IDoc, Job logs, System log, Workflow etc, while the
others take the advantage of provided BASIS database tables to store these
messages. These messages raised/issued by the business processes are stored in
application log. We recommend that every application and process should write a
message to identify the processed business object. Remark: twice the some text
Since ERP 2005 (SP 8) release we have a new class ‘CL_EMMA_BPC’. This
class has several methods. Each method is described in brief with its functionality.
Please use them and replace the old/existing function modules in your application
(highly recommended) with these new methods. These new methods are very
efficiently designed and do not cost high processing time. Below are the new
methods with description and there functionalities.
Note: Above methods do not update the application log but the applications are required
to do it by themselves as we do not offer or support this functionality anymore (mainly
due to performance reasons). Simply said these methods just prepare the EMMA-011/012
messages for your application and return the assembled messages back to it. Then the
application can decide how to store it in the log.
Note: If you are still using the old EMMA function modules and the FI-CA or IS-U
macros to log application log messages, then for technical reasons please make sure that
at least one information message has been logged in the application log before; and if not
then please create a dummy message so that the EMMA message can get logged in the
system. Otherwise the EMMA-011 message might not get logged in the system creating
erroneous results.
Examples
In this section we will take a look at how different applications or components of SAP
and Non-SAP systems are utilizing and working with EMMA.
Customizing
The correct customizing needs to be maintained and delivered by each application
owner. Please follow the cookbook (chapter 4) with presentation for pictorial
elaboration to maintain the customizing in IMG.
Special conditions
Within a business process there could be one or more collaborations, each
consisting of one or more transaction or events or services. See example below
Business Process
Business ... Business
Process Process Create Long Term Contract
Collaboration
Transaction Forecast Component
Requirements
Transaction
Send Planning Document
...
Supplier
Customer
Collaboration Place Order
Ship Materials
Arrange Payment
Consider the example of the creation of a sales order process. It is usually a pretty
simple process and it can also be a very common process as well. Let’s review the
sales order process for our example (see fig 2).
Fig: 1
In the above example the business process is distributed over different systems
which mean that the information is also distributed over multiple systems as well
(see fig1). So the biggest technical challenge is how to reconcile it in one place
and how to achieve this. The only way to get this run time information is to
capture it via logs. The next big challenge is how to correlate the logs of a process
distributed over different systems. For this a unique GUID needs to be created at
the time of execution of process and when the entry is created in the table
EMMA_HDR. This unique GUID has to be passed to all the steps of the
processes (including the external systems as well). This unique GUID is the only
way to link all the logs of the same process. EMMA keeps that GUID in its job
record.