cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ME activity hook

neha1620
Explorer
0 Kudos
578

Hi Experts,

I have two activities attached at operation level in SAP ME. My requirement is if there is error in first activity then second activity should not execute or at least I should able to capture error from first activity.

First activity is "Check_Resource_Setup"

Second is "MII TRX"

Can you please let me know possibility of how I can achieve this?

Thanks,

Neha

Accepted Solutions (0)

Answers (4)

Answers (4)

Kevin_Hunter
Product and Topic Expert
Product and Topic Expert

Hi Neha,

You will have to use the ME SDK and create a new activity which is a combination of both of the original activities, you will be able to define the execution logic and capture the error message which can be displayed on the POD as a custom error message.

Thanks

Kevin

michael_koerner3
Product and Topic Expert
Product and Topic Expert

Hi Kevin and Neha,

If the second activity already is a MII Transaction, you could also incorporate the "Check Setup Status" as an additional pre-check step into this MII Transaction and react accordingly.

Best regards, Michael

Kevin_Hunter
Product and Topic Expert
Product and Topic Expert

Hi Michael,

Agreed, however an MII Transaction has very limited capability when it comes to handling errors and displaying error messages, this is handled much better by the SDK. You can of course create a service extension to capture the error and add your own custom message but you will achieve must better performance and scalability using the SDK.

Thanks

Kevin

neha1609
Explorer
0 Kudos

Thank you Kevin.

neha1620
Explorer
0 Kudos

Hi Kevin,

Thanks for information.
This service extension method will be useful to capture exceptions if other service extensions give error at PRE or POST point.
In my case the check is on the activity hook so exception will not be captured. Please let me know if my understanding is incorrect.

Thanks,

Neha

Kevin_Hunter
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Neha,

You are correct.

Thanks

Kevin

neha1609
Explorer
0 Kudos

Hi Kevin and Michael,

Thank you for quick response.

As short term solution I can use "Check Setup Status". In long term solution and in case of more complex logic I agree SDK is better for performance and scalability.

@Kevin,

Custom service extension you are talking about ,is it using SDK or MII transaction?

Thanks,

Neha

Kevin_Hunter
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can use MII for a custom service extension as well. The screenshot below shows where I extended the Exception Handler for the MII Transaction Service, this then used an MII transaction to manipulate the error message. Not the best way to do it but it was a simple use case.

Thanks

Kevin