cancel
Showing results for 
Search instead for 
Did you mean: 

Check for the event notification

pietro_marovello
Employee
Employee
0 Kudos
194

Dear All,

I have this requirement: the posting of a specific expected event in the EM system should be conditioned to the posting of another specific event: i.e. I  can register the expected event EE005 only if the event EE003 was already posted.

Is it possible to have this kind of check, and how?

I know that exists in the rule set the method "ARE_PRIOR_REQS_MET", but it is not what I'm searching for: in fact that method cannot prevent the registration of the event in the EM system, but only the rules that I have in the rule set.

Again, in the expected event profile there is a customizing related to "Expected event requirements" (with a flag for "Predecessor required"), but I have not so clear how it works: someone can help me?

Thank you very much!

Pietro

Accepted Solutions (0)

Answers (5)

Answers (5)

butschbacher
Explorer
0 Kudos

Hi Germán,

could you debug in EE_RESET method and check what happens there?

Is the EE LOAD_END reset here?

Best regards,

Steffen

butschbacher
Explorer
0 Kudos

Hi Germán,

please try to add activity EE_RESET before STOP_PROCESSING.

Specify Event Code for LOAD_END as Activity Parameter. This should reset the EE.

Best regards,

Steffen

german_diaz94
Explorer
0 Kudos

Thanks again

I added the activity EE_RESET

ejemplo1.png

And I posted the event "load end"

In SLG1 trasaction is visible that the EE_RESET and STOP PROCESSING activities were activated due to the event Load Begin was not reported

ejemplo2.png

However, the event "LOAD END" was reported successfully

I don't understand where is my mistake

Regards, I appreciate all your help

Germán

butschbacher
Explorer
0 Kudos

Hi Germán,

if actual event is e.g. LOAD_END und you want to check if LOAD_BEGIN was reported:

- Check IS_EVENT_LOAD_END

- if true check IS_EVENT_REPORTED (for Load Begin)

- if true do the stuff for LOAD_END e.g. SEND_DATE_TO_TM

- if false STOP_PROCESSING

Create similar rule tasks for other events you want to check.

Best regards,

Steffen

german_diaz94
Explorer
0 Kudos

Hi Steffen

Thanks for your help

I tried the following as you suggested me example3.png

In IS_EVENT_REPORTED is referred to "LOAD BEGIN"example2.png

but I can report the Load End although the event LOAD BEGIN is not reported yet (example5.png)

In SLG1 transaction, you can see the activity STOP PROCESSING was performed (example6.png)

But the event was reported.

I would appreciate if you could tell me where is my mistake.

Thanks a lot for all

Regards

Germán Díaz

german_diaz94
Explorer
pietro_marovello
Employee
Employee
0 Kudos

Hi Steffen,

thank you very much for your quick answer!
I solved my problems using the methods IS_EVENT_REPORTED + STOP_PROCESSING.

Now, for my knowledge, someone can explain me how the customizing in the expected event profile related to "Expected event requirements" ("EE requir. type" and "Set rule" fields, "Predecessor required" flag) works?

Best regards,

Pietro

german_diaz94
Explorer
0 Kudos

Hi Pietro

I have the same requirement: "Register the expected event only if the predecessor event was reported".

I tried to use the methods that you mentioned above in my Z rule set (IS_EVENT_REPORTED + STOP_PROCESSING)


My doubts are:

-How can I know which should be the previous task of the activity that contains the method?

-The activity "IS_EVENT_REPORTED" must be after the activity "SEND_DATE_TO TM" or after "IS_EVENT_LOAD_END" activity?

I collocated the activity "STOP_PROCESSING" after "IS_EVENT_REPORTED", but I have not achieved that the load end event can't be reported if the load begin event has not been posted.

Thanks and regards

Germán Díaz

former_member190756
Active Contributor
0 Kudos

Hi Pietro,

ARE_PRIOR_REQS_MET

in combination with

STOP_PROCESSING

Stop the processing of the current event message

Functionality

This method enables you to stop the processing of the event message. The attribute MY_NO_EH_UPDATE of the event handler model is set. This prevents all updates for this event handler during the event message processing. If you want to log the combination of the event handler GUID and the event message GUID in the table /SAPTRX/LOCKEDEH for processing later, you have to set activity parameter 1 LogAsLocked to value 'X'.

Return code:

  • Always 0.
Parameters

Parameter-1 (LogAsLocked) : Enter 'X' if you want to log the combination of event handler GUID and event message GUID in the table /SAPTRX/LOCKEDEH for reprocessing later with report /SAPTRX/PROCESS_LOCKED_EHS.

should do it.

Best regards,

Steffen

former_member190756
Active Contributor
0 Kudos

Activities:

IS_EVENT_REPORTED

IS_EE_IN_DATE_SEQ

could also be helpful in conjunction with STOP_PROCESSING.

Best regards,

Steffen