cancel
Showing results for 
Search instead for 
Did you mean: 

Message not assigned to Handler

Affan_alavi
Explorer
0 Kudos


Hi,

I'm encountering an issue with message assignment to valid handlers.

Scenario: I'm creating 1000 handlers and messages simultaneouly from an application system. I am able to be all 1000 EH and Mesages created in EM with no errors, however around 20 messages are still not assigned to handlers.

1. I've checked the /SAPTRX/LOCKEDEH table and do not see any entires for locked handlers

2. The handler is active

3. I cannot see any entry for the message in the /saptrx/eh_evmsg table

4. When i reprocess the handler, the message gets assigned

Does anyone know why this happens and how do we resolve this automatically?

Accepted Solutions (1)

Accepted Solutions (1)

former_member190756
Active Contributor
0 Kudos

Hi Affan,

as Gopi said the EH were not processed look into the mentioned table.

For you scenario a maybe better solution would be to send the messages and create with the message the EH. This would prevent the situation you have.

Check SPRO:

Event Management

     Event Messages, Status Queries, Web Interface and EM OData Service

          Define Criteria for Event Message Processing

-> EH Generation Functions

Criteria for Creating Event Handlers

You define criteria so that the system uses a plug-in function module to create an event handler on the basis of an event message.

For example, you use smart tags in your warehouse that create an event handler in SAP Event Management when a package is collected. SAP Event Management checks if it has already created an event handler for this object before creating one.

Best regards,

Steffen

Affan_alavi
Explorer
0 Kudos

Hi Gopi/ Steffen,

Yes, these messages are in the  /SAPTRX/EVM_UNPR table.

However, like Gopi mentioned, shouldn't SAP EM periodically check and assign the messages to the right handler? I think sequence of message and EH creation should not be an issue and EM should be able to handle this.

Is there a program which can be run to have a recheck on unprocessed messages and create?

Creating a handler using EH generation function might not be a viable option because:

1. Since the messages and handlers are being triggered by SAP TM

2. The volume of messages is going to be huge (close to half million per day) and having an additional EH generation function checked in EM might impact the system performance.

Thanks,

Affan

former_member190756
Active Contributor
0 Kudos

Hello Affan,

the messages will automatically processed when the corresponding EH is created.

But in your mass creation scenario i think that some because of the simultaneous creation it comes to situations that it won't work for some EHs as they were created in the same time.

For such use cases the EH Generation function was designed.

Best regards,

Steffen

Former Member
0 Kudos

Hi Affan,

As suggested by Steffan, you can use EH Generation Functions to achieve this.  We are using  EH Generation functions for different scenarios for current client and we are posting more than half million (beginning of the month it reached 1 million too) data everyday without any issues.  Yes, it would impact system performance little bit not major level, but purely how you effectively implement the program logic that would mitigate the risk of system performance.

Like Event Handler lock program, SAP can provide a utility event program for unprocess event message (like /SAPTRX/COLLECT_UNPROC_EVMSG) to process.

If SAP provides the solution that would save many clients issue in future instead of implementing EH Generation Function including you.

Steffen and Daniel, could you take this request if possible?

Regards


GGOPII

Affan_alavi
Explorer
0 Kudos

I don't think we would be able to change the way both SAP systems communicate this late in the project. looks like the AOT configurations should not be used in high volume scenarios.

I'm exploring another option of having the messages moved into the same queue as EH creation request. this should atleast reduce the instances of simulatenous calls to both EM objects.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Affan,

When the event message processed, it would check EH exists when you sent along with EH.  The event message may have sequence problem like event message comes before Event Handler created.

Can you check in the table /SAPTRX/EVM_UNPR those 20 event messages were sitting here?


Sequence when event message arrives to SAP EM:


1. Store event message /SAPTRX/EVM_HDR table

2. Check tracking id exist for EH ID, if unsuccessful

3. Then create an entry in /SAPTRX/EVM_UNPR


Once Event handler created, unprocessed event messages automatically assigns to relevant event handlers.


Regards


GGOPII