cancel
Showing results for 
Search instead for 
Did you mean: 

Overwrite existing SAP MII Action Block Exception Message to display on SAP ME POD

Hello experts,


I am struggling with a stubborn problem in a SAP ME/MII scenario. To be precise, it is a SAP MII transaction call via a SAP ME POD button and the associated error handling.

The following problem arises: The button activity calls a SAP MII transaction and this transaction calls another transaction. At the lowest level, an exception is thrown for a SAP ME PAPI Interface - Action block, but this is caught by a catch block. Subsequently, a user-defined error message is returned to the calling transaction (1st level) and this transaction takes care of forwarding the error message to the SAP ME POD. So far so good.


The problem is that the error message at the SAP ME POD always shows the SAP ME PAPI Interface - Action Block Exception and not the user defined error message.


I tried to get some improvement by setting the output_message and / or changing the transaction attribute "ThrowOnActionError". Unfortunately without success.

Is it at all possible to catch and change these action block exceptions or are they "baked in" and always displayed?

I hope for your support
Many thanks in advance!

BR Christoph

steve_stubbs
Participant

Hi Christoph,

Which ME/MII version/patch?

How is the called MII transaction handling the action block error? does it catch and then return an error response message back to the caller as a Transaction Output property, and terminate normally, does it throw a new exception with a defined error message and expect the calling transaction to catch that, or does it terminate with a user-defined error message?

For the top level MII Transaction, does it terminate with error to return an error message to the POD or does it return a response message to the POD but is displayed as successful execution?

I have set this up in our projects as follows:

  • Called (lower level) transaction: catch the error, then terminate-with-error with a user-defined error message.
  • Calling transaction: terminate-with-error with a user-defined error after catching the terminate-with-error from the called transaction.
  • In this scenario, the terminate message defined in the calling transaction is displayed in the POD as an Error.

Regards, Steve

0 Kudos

Hi Steve,

thanks for your quick reply. Attached are the details I can provide on your questions.

We are using the following component versions:

SAPMECORE 1000.15.5.0.10

SAPMECTC 1000.15.5.0.1

SAPMEINT 1000.15.5.0.3

SAPMEINTCTC 1000.5.0.0

MII_ADMIN 1000.15.5.0.1

XMII 1000.15.5.0.1

My called transaction looks like this:

Some comments on this:

- I use doActivateErrorTermination to set the transaction attribute "EnableActionExceptions" to False.

- The Sequence_7 returns an error in the execution of the SAP PAPI > completeActiveSfcs and continues the processing of the transaction in Sequence_20.

- Thus Sequence_22 is triggered, which returns the error message in a transaction parameter to the calling transaction.

The calling transaction looks like this:

A few notes here as well:

- In Sequence_1 is the transaction call

- If in Sequence_6 it is determined that an error is present, local transaction variables are set and the error handling is initiated.

- This finally results in Sequence_2 (a terminateTransaction) being triggered. In it I set the "TerminationMessage" to my desired user defined message and expect it at the SAP ME POD.

But unfortunately I always get the originally generated error message of the SAP ME PAPI interface call "completeActiveSfcs" in the status bar at the SAP ME POD.

I hope this information is enough to get you started. Thank you very much for your expertise.

If you need more details, I will try to provide them.

Thanks a lot

Christoph

steve_stubbs
Participant
0 Kudos

Hi Christoph,

Thanks for the details!

I will review this in more detail when I am back in the office on Tuesday and will reply with more detail then.

Regards, Steve

0 Kudos

Hi Steve,

thank you very much - I appreciate your support.

I'm already looking forward to your results.

Have a great start of the week.

BR Christoph

steve_stubbs
Participant
0 Kudos

HI Christoph,

The main reason you are not getting your configured response sent back to the POD is that, in your calling transaction, you do not have a Catch Action and Terminate Transaction logic to handle the called transaction exception.

You can simplify your called transaction as follows:

Remove the Exception Enabler actions as they are not needed.

Add Catch, Event Logger, and Terminate Transaction actions following the PAPI call. A typical configuration I use is like this:

The Event Logger is used to record the exception details in the NetWeaver Log for use later in troubleshooting. Note that in this case I use the Message property of the PAPI action to get the actual PAPI error, as the Catch Action Message Property does not contain this; and also include the actual PAPI request XML. The Terminate Transaction will send the user defined error message back to the calling transaction, which will need Catch - Terminate actions configured like this:

With the configurations above, if your called transaction PAPI fails, the user will see the Termination Message assigned by the calling transaction.

Note also, that if a transaction has multiple Catch actions defined in the sequence flow, when an exception occurs in an action or link, the logic flow will jump to the first Catch action found by following the sequence tree top to bottom-> left to right from the action that threw the exception.

Regards, Steve

0 Kudos

Hi Steve,

I would like to thank you again for your support.

Unfortunately, your customization suggestion did not lead to the desired result. The problem still exists.

In the meantime I have created a very simple test setup and also here I come to the same result.

This transaction is now called directly via a MII_PLUGIN activity from the SAP ME POD.

If Sequence_1 fails with an error, this is always displayed on the POD and not the manual message from Sequence_0.

I suspect that SAPME_PAPI_Interface error messages cannot be "caught". Because I have never noticed such behavior with any other MII element.

The question I ask myself, is this a wanted behavior or a buggy one.

Is there anything I have overlooked?

BR Christoph

steve_stubbs
Participant
0 Kudos

Hi Christoph,
Which versions of SAP ME/SAP MII are you using? I have tested this with SAP ME 15.3.0.27 and SAP MII 15.3.1.35 and I do NOT get the same results that you are getting. All PAPI calls that throw an error are caught in MII with a Catch action. When a transaction called from a POD Button executes a Terminate Transaction, I see a message similar to this in the POD:

the string 'NO SFC In Queue at this Operation' is that string I assigned to the Terminate Transaction Action's TerminationMessage property.

Regards, Steve

0 Kudos

Hi Steve,

we use the MII version XMII 15.5.0.1 and the ME version SAPMECORE 15.5.0.10 .

I am almost afraid that a SAP Incident is needed here.

BR Christoph

steve_stubbs
Participant
0 Kudos

Hi Christoph,

I tested a similar setup in our sandbox with SAP ME 15.5.0.16 and MII 15.5.0.18 and got this expected Message in the POD when the transaction failed:

I recommend that you have Basis patch ME and MII to the latest patches and test your scenario again.

Regards, Steve

Accepted Solutions (0)

Answers (0)