Skip to Content

Michal’s PI tips: How to restart a successfully processed PI message on Java stack

There are times when it’s not possible to get a new message on PI and the easiest way would be to restart the same message which was already processed. On ABAP stack messages it was possible to achive this with the use of the functionality presented in one of my articles: Michal’s PI tips: Restarting successfully processed messages.

How to do it on PI’s Java stack messages (single stack PI’s – AEX for example)?


a) we should only try to restart successfully processed messages on development environments (never on TEST nor PRD)

b) you need to know that this approach is not supported by SAP and can cause serious issues in case you do it incorrectly

c) this approach is valid for >= PI 7.11 (where messages are stored in BC_MSG table) 

It seems it’s possible to build a simple application which will do a few changes in SAP PI DB tables and this will allow restarting successfully processed messages. I will not show the application as it’s not necessary at this point, only the idea on how to achive the reqirement.

Our potencial message can look as shown in Figure below.


In order to change be able to restart it, first thing we need to do is to change it’s status from “DLVD” to “NDLV” (from delivered to not delivered) in BC_MSG table.


This statement will change the status of the message to Not Delivered (second message).


In case our adapter is using a duplicate check we won’t be able to reprocess it yet – we’d need to make sure it’s not visible in another table as well – XI_AF_SVC_ID_MAP. That’s why we need to remove records from this table too and there can be more then one – not only message ID but also message ID and direction – (INBOUND).


You can use one statement (in this case two to highlight that there can be more then one rows for one message).



This should allow you to reprocess the message from PI tools – RWB, MDT.


Please remember that this approach is not supported by SAP and should never be used on TEST, PRD systems.

You must be Logged on to comment or reply to a post.
  • Michal.. Your blog is always such a pleasure to visit.. where do your out of box ideas come from.. do you have some secret idea generating machine ๐Ÿ˜‰  

    Keep those ideas flowing..keep blogging.


    Sunil Chandra

    • Hi,

      >>>do you have some secret idea generating machine

      indeed - working on many things and experiencing many issues which need to be solved ๐Ÿ™‚


      Michal Krawczyk

  • Trickster Michal at it again ๐Ÿ™‚

    I like the disclaimer too and the fact that it was mentioned a couple of times ๐Ÿ˜ˆ .

    One always needs these workarounds though...:-)

  • With increased security consciousness in the organizations and considering SAP recommendation to leave alone the database, the usability of this approach is very limited. Often, other alternatives of recreating the message might be easier to deal with.

    Thanks for sharing.

  • Hi Michal,

    Could you let me know why it should not be use in TEST system but can be use in DEV system?

    Generally we use test system for testing purpose.



  • Hi Michael,

    Thanks for your tip. Can you please share which role is required to view the table XI_AF_SVC_ID_MAP in open SQL Data Browser in NWA?



  • Hi Michael,

    Wow it was very informative i never thought that it is possible to process again the successfully processed message thanks for the info.



  • I tried running the same statement in SQL Command Editor in DBACOCKPIT. But I get the following error:

    update BC_MSG set status = 'NDLV' where MSG_ID = '53bb3f5b-4f28-1760-e100-8000a1f1ff54'

    ORA-00903: invalid table name.

    But when I run a select statement ( select status from bc_msg ) on bc_msg table it works fine.

    Please advice.

  • Michael,

    Thanks for the blog... it is very similar to what we are trying to achieve. We are trying to achieve message reprocessing but, on a mass scale and in an automatic fashion on time based trigger. Is it possible to kick of reprocessing without going to RWB and manually? We would like to reprocess all messages between two timeframes.


  • Hi Michal,


    Is it possible to use the same approach to mark the status as 'CANCEL' for the messages which are in 'Error' so that those can be deleted from DB. Our PO system is 7.4 Single stack. There is a mass cancellation functionality available but our current SP do not support and it will take some time to update latest patch.




  • Hi Michal,
    Is it possible to use the same approach to mark the status as โ€˜CANCELโ€™ for the messages which are in โ€˜Errorโ€™ from Adapter engine Message monitor .Our PI system is 7.31.

    Or automaticallyย  cancel the error messages from adapter engine monitor .Please suggest any possible solutions.