cancel
Showing results for 
Search instead for 
Did you mean: 

Required Event Message Count after posting Event

Former Member
0 Kudos

Hi Gurus,

        I need total number of event message posted for Event handler if its exceeds the limit(Example 25 Event Message).I need to trigger an alert.

I hope we can do this by rule set.

1.   I got existing event handlers information form the below code

       wa_eh_data = i_eai-eh_model->eh_data( it_tables ) .

2.In wa_eh_data-EVMSG i got all the existing event message but not the current one.

3.we get current event message information from i_eai-event_msg

4.we can sum up

  Total no of Event message =   wa_eh_data-Evmsg( Existing event message) + i_eai-event_msg (Current Event Message)

5.if Total no of Event message > 25 Alert is triggered

6.My concern here is after 25 message.If multiple event message is posted.Mail will get triggered for each message as per rule set.

7.Is there any possibility to control this ? multiple event message ?

Please let me know my approach is correct.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ram,

If I understand your requirement properly, you want to send Alert only when exceeds 25 but not multiple times.

Doesn't that mean the condition

5.if Total no of Event message > 25 Alert is triggered

should be                                        

5.if Total no of Event message = 26 Alert is triggered

So incase you get more than 26, it wont send alert

Or am I missing something in understanding your requirement ??

Please explain.

Thanks,

Deb

Former Member
0 Kudos

Hi Debabrata,

          Thanks for quick response.i need to Send alert if event message count > 25 in EH.

after 25.i need to send alert for 26,27,28.......(beyond 25 i need to send message)

Former Member
0 Kudos

Yes, in that case your logic is correct and should work. Is it not ??

Former Member
0 Kudos

Yes i hope it should work but in case of multiple event message( example 5 message posted in single shot and exceeds 25 ) is posted.It will trigger 5 separate emails.it will too many mails in this case.searching for option to consolidate to single email.

Former Member
0 Kudos

oh ok..I got it.

So, for this purpose, you have to probably use a Global Internal table (in global data section of your activity/condition function group) to save the Batch Guid (I_EAI-EVENT_MSG-HDR-BATCH_GUID), Evt ID and say a "Already Processed" flag.

Make an entry in this internal table during the 1st run of the same Batch, if the total count is > 25.

Thanks,

Deb

former_member190756
Active Contributor
0 Kudos

Hi,

you could also check field LAST_EVMSG_NBR in the /SAPTRX/EH_HDR table.

I'm not sure if it is available during rule set processing but it would be the easiest way.

Best regards,

Steffen