!--a11y-->
Event Handler Updating 
By updating event handler data, the system can check how event messages are processed for an event handler. To do this, the system needs the expected events that belong to an event handler and the rule set in accordance with the Customizing settings made in SAP Event Management (SAP EM).
You use current event handler data to track and evaluate objects or processes that you have determined to be relevant to supply chain event management.
● You have specified the following in the application system:
○ The application object types
○ The condition for determining the application object type
○ The function for determining expected events
○ The control, system, and info parameters
To do so, in Customizing, choose Integration with SAP Components ® Interface to Event Management.
● You have defined the following in SAP EM:
○ The event handler types
To do so, in Customizing for Event Management, choose Event Handlers and Event Handler Data ® Event Handlers ® Define Event Handler Types.
○ The condition for determining the event handler type
To do so, in Customizing for Event Management, choose Event Handlers and Event Handler Data ® Event Handlers ® Define Conditions for Event Handler Types and Event Handler Sets.
○ The expected event profile
To do so, in Customizing for Event Management, choose Event Handlers and Event Handler Data ® Expected Events ® Define Profiles for Expected Events.
○ The parameter profile
To do so, in Customizing for Event Management, choose Event Handlers and Event Handler Data ® Parameters ® Define Parameter Mapping.
○ The status attribute profile
To do so, in Customizing for Event Management, choose Event Handlers and Event Handler Data ® Status ® Define Status Attribute Profiles.
○ The rule set
To do so, in Customizing for Event Management, choose Reactions to Event Messages ® Define Rule Sets.
● You have set up Customizing for the application interface and have installed the corresponding visibility process in the application system or have defined your own process. The visibility process allows you to connect to your business objects in the application system.
For more information, see the SAP Service Marketplace at service.sap.com/scm ® Supply Chain Event Management ® Visibility Processes ® Generic Configuration Guide.
● You have configured the RFC connections between the application system and SAP EM.
To do this, execute the following:
○ In Customizing for the application system, choose Integration with SAP Components ® Interface to Event Management ® Define System Configuration ® Define RFC Connection to SAP EM.
○ In Customizing for Event Management, choose General Settings in SAP Event Management ® Define RFC Connection to Application System.
● If you want to log changes to data relevant to event handlers, you have defined the relevant indicator with the corresponding level of detail. For more information, see the Implementation Guide (IMG) for Event Management under Event Handlers and Event Handler Data ® Event Handlers ® Define Event Handler Types.
The steps for updating an event handler are shared between the application system and SAP EM, as for creating event handlers.
...
1. You save your document in the application system.
2. The application system executes the following:
...
a. It extracts the data container for the business object so that SAP EM can use the application object ID to check if an event handler with the corresponding event handler type can be found.
b. It determines which SAP EM system is responsible for the application object type. (An application system can work with several SAP EM systems simultaneously.)
c. It specifies the business process type (BPT) of the business object.
d. It retrieves the application object types for the BPT from the application system and determines whether they are relevant to supply chain event management.
e. It creates control parameters for all application objects that are SCEM-relevant.
3. The application system checks if the event handler has the correct status for the application object, that is, it has not been set to inactive (for example, for testing purposes).
4. SAP EM executes the following:
...
a. It standardizes the control parameters that have been sent from the application system into a view that it can process.
b. It checks if suitable event handlers already exist.
If it does not find any suitable event handlers, it continues to execute the checks for generating an event handler.
If it finds a suitable event handler, it uses this and updates the event handler.
c. It sends the result of the check to the application system.
5. The application system continues to process the confirmed application objects.
6. The application system then executes the following:
...
a. It collects all the data from the parameter containers. This includes:
■ Expected events
■ Control parameters
■ Info parameters
■ Tracking IDs
■ Query IDs
■ Business object keys
■ Event data
■ Application object IDs
■ Queue names
You can define in the application system that SAP EM is to delete the control parameters, info parameters, query IDs, or tracking IDs that belong to a relevant application object.
b. It sends the flag for sending the collected data to SAP EM.
When the application system continues with the saving process, it sends the data; see also step 6e.
c. It marks open communication processes for a status update in the status table.
When the application system continues with the saving process, it performs the status update; see also step 6e.
d. It flags the application log for an update.
When the application system continues with the saving process, it updates the application log; see also step 6e.
e. It returns to saving the business object. All actions that have been marked for execution are completed in the application system.
7. At the same time, SAP EM determines the event handler type and updates the event handler with the relevant expected events and status attributes. SAP EM also standardizes the data from the parameter containers in the application system into a view that it can process. Then it calls the activities for updating the process and sends the confirmation of the completed transactions to the application system.
SAP EM deletes any control parameters, info parameters, query IDs, or tracking IDs that belong to a relevant application object.
If you have activated logging with change documents and use activities in the rule set that change data relevant to change documents, SAP EM updates the corresponding change documents.
