Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

EH Generate functions in EM

Hello,

Anyone can please share more details about EH Generate functions via config through which we can call our Z function module to execute our custom code before posting event message?

1. Purpose of EH Generate functions in EM - please explain more details

2. When exactly the EH generate functions being called when posting event to event handler?

2. Whether we can generate event handler and post event message by adding our plugin via custom code

3.When exactly the EH generate functions to use in EM. (our config).

4. Any sample code that would really helpful to add custom Z function module code via config

Appreciate your help.

Thank you,

Sudhan

Former Member
replied

Hi Sudhan,

1. Purpose of EH Generate functions in EM - please explain more details

You have a scenario where you do not have a direct trigger for creating an EH. e.g. a postal scenario. You just get messages and want to create the EH with the first message for your new object.

2. When exactly the EH generate functions being called when posting event to event handler?

It's called at the beginning of Event Message Processing after some initial checks are done (prerequisite is that you have the customizing done in /SAPTRX/TSC0MBF).

2. Whether we can generate event handler and post event message by adding our plugin via custom code

Yes that is the purpose of the function.

3.When exactly the EH generate functions to use in EM. (our config).

As written above you should use if you have a scenario where you just get messages and don't have a trigger for creating the EH directly like in an ERP integration scenario.

4. Any sample code that would really helpful to add custom Z function module code via config

Check the template function module

/SAPTRX/EH_GEN_TEMPL

There are some hints how to use it. It is very similar to the extractor function modules you use in the application system. You have to fill the structures for APPLOBJECTS, Parameters etc.

Best regards,

Steffen

2 View this answer in context
Not what you were looking for? View more on this topic or Ask a question