cancel
Showing results for 
Search instead for 
Did you mean: 

Rule for stop processing of expected event message

Former Member
0 Kudos

Hi Experts,

I am just wondering which rule/action will fulfill below requirement .

I want to stop processing of event message for one of expected event .

I do not want to stop processing in preprocessing function module as i need to create a error log and trigger alert .

QUIT EVENT MESSAGE PROCESSING rule works for unexpected event only .

1) How to fill NOT_RELEVANT field in table EH_EXPEV.

2) If I populated INVALID_DATA field in preprocessing , will it reach to ruleset to create error log and trigger email .

Thanks in Advance ,

Rajesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

1) How to fill NOT_RELEVANT field in table EH_EVMSG EH_EXPEV.

Former Member
0 Kudos

Hi Rajesh,

Is there any reason why you want to populate non_relevant in EVMSG table? If you don't care then try activity STOP_PROCESSING and see if it works for you.

For preprocessing, if you add invalid_data flag = 'X', I am guessing it should still go through ruleset. Haven't tried it but breakpoint should help.

Thanks,

Vishnu

Former Member
0 Kudos

Hi Rajesh,

1. Create a new custom activity function in ruleset and try to call /SAPTRX/CL_EH_EVENT_MSG_MODEL ->  UPDATE_EH_EVMSG to update "X" flag in

l_eh_evmsg-not_relevant = i_irrelevant.

2. Then trigger email.

Check and let me know whether this will work.

Let me check other ways also.

Regards


GGOPII

Former Member
0 Kudos

Hi Vishnu ,

STOP_PROCESS do not resolve my issue since it create lock table entry which clears by batch job .

If I add INVALID_DATA as X in preprocessing , will it not post entry in EH_EVMSG then I am good ?

Regards,

Former Member
0 Kudos

Hi Gopi ,

My basis concern is that I should be able to run ruleset to trigger email and at the same time , event should not be updated to database . It would be great if i can avoid any entry in EH_EVMSG . If I can not avoid then I will check the option you suggested .

Regards,

Rajesh

former_member190756
Active Contributor
0 Kudos

Hi,

if you set the invalid flag it won't go through the ruleset anymore.

I think best way would be to trigger the alert and write log from inside the pre processing function.

Best regards,

Steffen

Former Member
0 Kudos

Rajesh,

STOP_PROCESSING will not create locked entries if you do not use the locked entries flag in STOP_PROCESSING activity params.

Former Member
0 Kudos

Hi Rajesh,

If you do not want to post and update event, then the best way would be built in preprocessing and directly trigger alert as mentioned by Steffan.

Regards

GGOPII

Former Member
0 Kudos

Hi Gopi , Hi Steefan ,

i would have surely gone for that option , however that will need a good developer who can understand the logic from ruleset and use the same logic in preprocessing properly .

Since i am not comfortable on that side so I think i should go for option where i will keep logic of triggering email and error message on ruleset . Only thing i will update EH_EVMSG table with IRRELEVANT indicator as Gopi proposed .



/SAPTRX/CL_EH_EVENT_MSG_MODEL ->  UPDATE_EH_EVMSG to update "X" flag .


In this way , although event is reported in EM but since IRRELEVANT indicator is set so any reporting requirement can look into this .


More over I will create a rule set for not to update event in TM /ECC . So i think i should be good .


Do you guys see any other issue .


Regards,

Rajesh

Former Member
0 Kudos

Hi Rajesh,

I have manually updated "X" flag in NOT_RELEVANT in an existing event to check whether it is visible in EH_LIST.

The event message is not still visible in EH_LIST.  So, if you think this is good then you can go ahead with this approach.  I couldn't see any issue unless until if run any report and check this flag specifically to ignore or include.

Edited[Gopi]

Regards


GGOPII

Former Member
0 Kudos

Rajesh,

Looks like your preference is to write logic in ruleset to make it irrelevant but /SAPTRX/CL_EH_EVENT_MSG_MODEL->UPDATE_EH_EVMSG is a protected method.You cannot just call it outside of the model class. Make sure it works before you spend lot of time designing and documenting it.


Thanks,

Vishnu

former_member190756
Active Contributor
0 Kudos

Hi,

never tried this for Expected Events but i doubt it will work.

Even if the EH_EVMSG gets the irrelevant flag i think the EE will be reported then.

Own methods you could add as Enhancement with:

(1) start Class Builder (SE24) for class /SAPTRX/CL_EH_EVENT_MSG_MODEL

    in display mode

(2) The "Methods" tab appears

(3) Select menu function "Class  >Enhance"

(4) The "Create Enhancement Implementation" popup appears;

    create an enhancement implementation here

(5) after creating it you come back to the "Methods" tab, but now you

are in mode "Enhance class "

(6) scroll down to the end of the methods list; here you can add a

  new method now ...

  That new method will be automatically connected to

  your enhancement impelmentation (you can see that in column

  "Enhancement implementation")

Then you could also call protected methods.

Best regards,

Steffen

Former Member
0 Kudos

Hi Gopi ,

How did you set EH_EVMSG as not relevant manually . Did you enter value while executing BAPI ADD EVENT MESSAGE 02 ?

I want to set this and want to see if solution will work .

I want to see that if event message is reported and EH_EVMSG is set as Not relevant , will event be shown as reported event in execution button of freight order .

Regards,

Rajesh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vishnu , Hi Steffan , Hi Gopi ,

Thanks for your valuable suggestion .

We are planning following method to call protected method of /SAPTRX/CL_EH_EVENT_MSG_MODEL class .

1) Create a sub class of SAPTRX/CL_EH_EVENT_MSG_MODEL and create a public method .

2) We will call UPDATE_EH_EVMSG from method of above subclass .

Please check following SCN link and let me know your view .


https://scn.sap.com/thread/278775


Regards,

Rajesh

Former Member
0 Kudos

Yep, try it out. I like the Steffen's idea though. In this way if your update_eh_evmsg doesn't work, you can create your own Zquit_processing as well which does not check for expected events.

Let me know if you need any additional help.

Thanks,

Vishnu