Skip to Content
Technical Articles
Author's profile photo Rahul Yadav

Idoc acknowledgment for sender adapter in SAP PO 7.5 with ALEAUD Idoc

Recently, I received a requirement from one of my client where they wanted to update the IDOC status from 03 ( IDOC sent to external system) to SUCCESS or ERROR status so that their Functional/Business team can get the failed & successful Idoc list of SAP PO messages without looking into the SAP PO system.

Key Challenges encountered by customer:

  • Once the IDOC is transmitted to SAP PO, it is updated with status 03 which doesn’t tell what happen with that IDOC in SAP PO.
  • Business team needs to rely on SAP PO support team to get the list of failed messages.
  • Turn around time from application support team was high when the number of failed messages were high in SAP PO.

To overcome this issue i enabled the standard configuration in Idoc sender adapter to receive acknowledgements from SAP PO back to ECC system from ALEAUD IDOC.

I couldn’t achieve all the required functionality with this configuration and it took a week to figure out whole situation. Hence tried to document the same so that it can help others.


Addition of ALEAUD to Inbound parameter of the Partner Profile.

After this configuration you will start getting acknowledgements for all messages those are successfully transmitted from SAP PO system to target receiver via ALEAUD Idoc, but SAP PO will not send back the acknowledgement for messages which are failed in System Error.

Reason for not getting Error Ack: IDOC sender sends the acknowledgement for messages those are in its final status. System Error is not considered as final state as these messages can be wither resent or cancelled.Once you cancel the message manually or through program you will get the acknowledgement back to SAP ECC.

We will be seeing below status for the Idoc:

Status 03 : Idoc is sent to external system ( SAP PO)

Status 41: Message is transmitted from SAP PO system.

Status 40 : Message can not be processed in SAP PO system.


Different Methods to get the Error Acknowledgements/Cancel failed messages:

  1. Cancel failed message manually in SAP PO- It will send the ALEAUD Idoc for the cancelled message as message can’t be processed further.
  2. Cancel failed messages through background Job – You can cancel the messages by configuring standard Job provided by SAP PO. You can put the filter on this job to handle the messages of specific scenario.
  3. Cancel failed messages through monitoring API –  You can cancel the messages through monitoring API by fetching message Keys. This gives more filtering option than the background job.


Below are the details for cancelling the messages via Background Job and Monitoring API:

Cancel failed messages through background Job:

Create a cancel Job for your scenario:

Goto Monitoring -> Adapter Enging -> Background Job Process Monitor -> Adapter Engine Jobs

Click on Create Job and then create a cancel job with required parameters.

You can add parameter simulate only to check if your job is fetching correct number of intended messages. This will not take any action on the failed messages. No of messages read by the job can be seen in the log tab of the job.

Note : You can add more status in parameters followed by ;.

Currently i have put ICO ID in the rules tab. You can put more rules to ensure that you are cancelling correct messages.

After defining parameters click on Activate. This will enable the job and you need not to cancel the messages manually from system.


Cancel failed messages through monitoring API:

You can also cancel the messages from monitoring API provided by SAP. It provided three authentication mechanism ( Basic, Client Certificate and SSL binding).


For testing in SOAP UI, you can use Basic authentication.

You can cancel the messages by calling two endpoints.

  • Get the message Keys of Failed messages by calling getMessageList endpoint:

You will get all the messages based on filter criteria:

Message Key = <Message ID>\<Direction>\<NodeID>\<QOS>\<SequenceNo>

Always put the statuses in camel case

<!–Zero or more repetitions:–>

  • Cancel the messages by passing message key in the cancelMessages endpoint.

You can cancel the failed messages based on message Key.


By above two methods you can achieve mass cancellation in SAP PO to avoid manual interaction. You will also get the negative acknowledgement from IDOC sender adapter which indicates IDOC is not processed in SAP PO.

Below is the status of failed IDOC and status is changed to 40 from status 03:


Reference Note :


Any suggestion is most welcome and appreciated !!!

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Pavan G
      Pavan G

      Hi Rahul,

      Very nice explanation, I got know how to cancel the failed messages and send acknowledgements to ECC. I will definitely try this.



      Author's profile photo Tang Lambert
      Tang Lambert

      Hi Rahul,

             Great blog, thanks for sharing


      Author's profile photo Manoj Kumar
      Manoj Kumar

      Hi Rahul,


      Thank for a descriptive blog.




      Author's profile photo Ajit Singh
      Ajit Singh

      Hi Rahul,

      It's really a good solution for sending a negative ACK back to ECC.

      Thanks for sharing.



      Author's profile photo Manoj K
      Manoj K

      Few points :

      To get IDOC ack, you need to set Persistnace = true for java IDoc adapter.

      If the receiver channel is SOAP, we need to have parameter XMBWS.GenerateSysAck=true, as by default soap adapter disables sys ack



      Author's profile photo sai nikhil
      sai nikhil

      Hi Rahul,

      Do we need any mapping for ALEAUD idoc in ESR level and Any Modules required in the receiver and sender communication channel?




      Author's profile photo Rahul Yadav
      Rahul Yadav
      Blog Post Author

      Hi Sai,

      You neither need  ESR mapping nor any additional module in Adapter . It will be enabled by configuring sender channel only.

      But you can see one additional message in monitoring when ALEAUD IDOC is sent back to ECC system.You can’t see the payload for this response ALEAUD message in AAE monitoring.

      Below log can be seen in response message:


      Author's profile photo sai nikhil
      sai nikhil

      Thanks Rahul

      Is the same process required for idoc_aae receiver acknowledgement scenario as well.

      Author's profile photo Vikas Kumar Singh
      Vikas Kumar Singh

      It is a nice feeling to see the depth of requirements and power of sap po as middle ware. But to see that power, consultants have to do a great deal work and troubleshooting.

      Kudos to the effort put in fulfilling the requirement, utilising the power of sap po and showcasing multiple approaches to achieve the solution

      Author's profile photo Frantisek Vojtek
      Frantisek Vojtek

      Hi Rahul,

      I have requirement to make action (store message in IXOS) when acknowledgement is successful. Is it possible to route ALEAUD to another interface or make any action based on it in SAP PI/PO?



      Author's profile photo Rahul Yadav
      Rahul Yadav
      Blog Post Author

      Hi Fero,

      Unfortunately, SAP doesn't give flexibility to control the ALEAUD message. You can call standard Integration Directory APIs to read processed ALEAUD messages & then you can perform any operation on those messages.

      You can look the feasibility for above.