cancel
Showing results for 
Search instead for 
Did you mean: 

Passing of Milestone data in BAPI_EH_POST fm for expected event creation?

Former Member
0 Kudos

HI,

If non-sap system will try to post expected event through bapi_eh_post to sap em, Is it possible to create expected event in sap em by providing values to milestone data  in bapi eh post and attach an expected event profile for the event handler.Kindly suggest, how to create an expected event for any activity not coming from application system.

Accepted Solutions (1)

Accepted Solutions (1)

former_member190756
Active Contributor
0 Kudos

Hello Ratnakar,

yes it's the same way as it would come from an application system.

According to the Business Process Type you have the EH Type is determined and the EE Profile is taken.

You could also create EE by sending messages and using activity EVM_EE_UPDATE e.g. if you have already an EH created from Applications system.

Best regards,

Steffen

Former Member
0 Kudos

Hi Steffen,

Thanks for the reply.

I have tried to create expected events by passing values through trackeemodify in the addeventmsg02 function module ( and calling activity evm_ee_update in the relevant ruleset ) and it is working perfectly fine.

But whenever I am trying to create expected event through bapi_eh_post function module by passing values through milestone data , It is not creating any expected event although event handlers are created as usual.

In details of the event handler in EH List (tcode:/SAPTRX/EH_LIST) , EE Profile is showing as mentioned by me in the Event handler config. But Expected Event Evaluate Activity is showing as LTL_DELIV which I have not set anywhere and Expected Event Monitor Activity is showing as blank.

Could you kindly suggest where to set Expected Event Evaluate Activity and Monitor Activity for a newly created EE Profile and also where actually in the BAP_EH_POST fm code, Milestone data is mapped to the EE Profile being used for an event handler.

former_member190756
Active Contributor
0 Kudos

Hello Ratnakar,

Expected Event Monitor is set in transaction /SAPTRX/TSC0EE

You only need it when you want to react on overdue events.

Where do you provide an Expected Event Evaluate Activity?

I only know the two functions from the screenshot above.

Best regards,

Steffen

Former Member
0 Kudos

HI,

I have not set  Expected Event Evaluate Activity and Expected Event Monitor Activity for my custom event handler's expected event profile anywhere. Also I have no idea where to set it or is it required at all.But my concern is, whenever i am trying to create expected event profile for my custom event by passing values through milestone data, the expected event,date and time not get populated in EH List for the event, rather the following screen comes out on clicking details of the event.

Can you kindly guide me how milestone data and expected event profile are linked internally. If possible, the standard code snippet please.

former_member190756
Active Contributor
0 Kudos

Hello Ratnakar,

there is no special coding needed.

If you call EH_POST you hav just provide all the EH data in the interface.

The link is only the Business Process Type. It is important that you fill AO Type, AO System etc. in all the tables.

You could debug here:

In EH creation case you should be later coming to this point:

Inside this method EE will be generated based on your milestones.

Best regards,

Steffen

Answers (0)