cancel
Showing results for 
Search instead for 
Did you mean: 

Issue during EH creation from Ruleset

Former Member
0 Kudos

Hi,

We are creating event handler manually through ruleset in one scenario by copying most of the parameters from an existing one.

Event Handler is getting created successfully but all the event message is also getting triggered of the original one for the new EH ..

May I know, how to stop processing of event messages for the new one and why it is getting triggered.

Regards,

Ratnakar Mishra

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ratnakar,

Stop copying the tracking ids from old EH if they are not relevant. If you still want the same tracking ids, then change the starting date/time of the tracking ids to future so that the old messages from old EH are not copied.

Thanks,

Vishnu

Former Member
0 Kudos

Hello,

For the First Event Handler (system generated), there is no tracking start and end date.. Although I am putting start and end date in the newly created one, still all the event message got triggered.

Is there any other way to stop it..

Also Is it possible to copy the event messages of the original one to the new one  but without processing ruleset for all the event messages for the new one.

Regards,

Ratnakar

Former Member
0 Kudos

Hi Ratnakar,

Are start dates out of range of your current event messages? Then it should have worked. Please do some dubug around this.

Also, as Steffen requested, what's your scenario. Maybe be there are alternate solutions which might help your design like creating from EH Generation Functions.

Thanks,

Vishnu

former_member190756
Active Contributor
0 Kudos

This could be debugged here:

/SAPTRX/CL_EH_EVENT_MSG_MODEL Method PROCESS_MSG_40

* Check Event Handling and Tracking Start/End Date
   CHECK me->check_start_end_dates( <evm_hdr> ) = co_true.


If the message is not in the range it should not be processed.


There is now way to stop the processing in any other way. If the Tracking IDs match they will get processed. You can only restrict it by Start and End Date.


Best regards,

Steffen

Answers (1)

Answers (1)

former_member190756
Active Contributor
0 Kudos

Hi Ratnakar,

could you explain your scenario in detail?

There is also a standard way to create EH through messages.

If you do it in Rule Set you check the option Vishnu mentioned and also important: When calling the EH POST BAPI you should do this using STARTING NEW TASK to avoid problems.

Best regards,

Steffen

Former Member
0 Kudos

Hi Steffen,

The requirement is to create multiple event handler only in case of multiple delivery for any line item in the OTC process. I mean.. if second delivery got performed for any line item, then only second EH will get created for that line item.

May I know the standard way , you are talking about..

Regards,

Ratnakar

former_member190756
Active Contributor
0 Kudos

Hi Ratnakar,

standard way is descibed here:

SAP Customizing Implementation Guide

          Event Management

               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

Former Member
0 Kudos

Hi Ratnakar,

So, you mean, you have SO line item which is an EH. When you deliver, you create Delivery EH. When you have second delivery for same SO line item, you need second Delivery EH. Is that correct?

Please clarify.

Thanks,

Vishnu

Former Member
0 Kudos

Hi Ratnakar,

Why do you want to trigger from other EH? You can configure under BPT ESC_DELIV in SAP ECC new AOT, New Event types, System, Control parameters etc to achieve for delivery event handlers according to your requirement.

When Delivery AOT is creating, have a new relevance function condition to achieve multiple event handlers in case of multiple deliveries for SO line item.

Same way you can configure a new event handler for a delivery and other configs in SAP EM.

This would be a standard way and can be achieved instead of going to SAP EM and create delivery event handler from other event handler.

Regards


GGOPII

Former Member
0 Kudos

Hi Steffen,

I can see..   eh_generation_mode  = 'N' in the code /SAPTRX/LASC2F05 of EM-AI.

I don't think.. it can be changed as it's hard coded in this standard code.

Should I raise OSS then to comment the statement so that eh generation function will work at EM side or Is there any other way to do the same without raising change in the standard code.

Regards,

Ratnakar

Former Member
0 Kudos

Hi,

For each SO line item, there is an EH. For delivery, there is no specific EH.

If second delivery got created for a line item, then only second EH will get created in the manual way which will be more of less replica of existing EH except the delivery related fields which will be specific to each EH

Regards,

Ratnakar

Former Member
0 Kudos

Hi Ratnakar,

If that's your scenario, then I would advice against creating one more SO line EH. All you need is one more set of Expected Events for this new delivery. Use EVM_EE_UPDATE activity to add expected events. Number of deliveries you have, that many sets of EE will be there. You can use datacs fields as checked field and store delivery number there which helps in your event posting to post against correct EE.

Also, you can add the delivery details as message parameters and some important fields like delivery number as both message and control parameters so that you know which event is for which delivery.

For message parameters, use this blog:

Thanks,

Vishnu

Former Member
0 Kudos

Hi Ratnakar,

hmm you want to go through less replica way.  Is it enhancement or small project with your client? If both the cases, try to convince go through standard way trigger from SAP ECC to SAP EM.

More customization cost more TCO in longer run.   So, check your project and client other pros and cons on less replica and go with standard way.

Regards


GGOPII