cancel
Showing results for 
Search instead for 
Did you mean: 

Problem while posting event message through ADDEVENTMSG02

Former Member
0 Kudos

Hi,

I have created an event handler through bapi_eh_post and then tried to post event message through addeventmsg02.

I am facing problem while posting event message through ADDEVENTMSG02.

Sometimes It is working properly and sometimes it won't.

Morever, Both cases are occuring for same entry in TRACKINGHEADER and  TRACKPARAMETERS.

Working Scenario:

The return parameters provide 3 entries.

Non-Working Scenario:

The return parameters provide single entry.

Basically event message for the event handler is not processed in this case, thats why no ruleset is triggered in this case.

Kindly suggest, what needs to be done to mitigate the issue.

Accepted Solutions (1)

Accepted Solutions (1)

former_member190756
Active Contributor
0 Kudos

Hi Ratnakar,

when using SE37 for Message Sending you have to call a BAPI_TRANSACTION_COMMIT afterwards otherwise it is not guaranteed that the message is processed correctly:

It is described here how to do it:

Best regards,

Steffen

Former Member
0 Kudos

HI,

I tried in this procedure, but it did not work.

Are you suggesting that after BAPI_TRANSACTION_COMMIT fm execution, the return parameter will be updated to 3 entries from a single entry in ADDEVENTMSG02.

If so, kindly share a screenshot to perform tasks after addeventmsg02 execution please.


former_member190756
Active Contributor
0 Kudos

Hello Ratnakar,

did you set the synchronous flag as described on page 6?

Are the message data in both cases the same?

What you could check if EH was locked -> table /SAPTRX/LOCKEDEH.

In this case also no rule set is processed but message is stored for later processing.

Best regards,

Steffen

Former Member
0 Kudos

HI,

did you set the synchronous flag as described on page 6?--> Yes

Are the message data in both cases the same?--> Yes

I have checked the table  /SAPTRX/LOCKEDEH and there are around 100 entries in this table.

Since entries are populated in this table, thats why no ruleset is triggered.Is this the case?

If So, how can we process the message.....means by deleting the relevant entry or by any other means.

former_member190756
Active Contributor
0 Kudos

Hi Ratnakar,

you should schedule regularly report /SAPTRX/PROCESS_LOCKED_EHS

e.g. every 10 minutes.

It checks for locked entries and processes them.

It is also described here:

Best regards,

Steffen

Former Member
0 Kudos

Thanks for the post..

The problem is resolved after execution of the mentioned program.

Answers (0)