Skip to Content
Technical Articles

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.

https://help.sap.com/doc/saphelp_nw73/7.3.16/en-US/bc/0341dd385945d49eb809c084cf3dea/content.htm?no_cache=true

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).

http://<host>:<port>/AdapterMessageMonitoring/basic?style=document

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

<urn1:statuses>
<!–Zero or more repetitions:–>
<lang:String>systemError</lang:String><lang:String>cancelled</lang:String>
</urn1:statuses>

  • 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 :

https://launchpad.support.sap.com/#/notes/2137688

 

Any suggestion is most welcome and appreciated !!!

9 Comments
You must be Logged on to comment or reply to a post.
  • Hi Rahul,

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

    Regards,

    Pavan

  • 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

    Thanks,

    Manoj

  • Hi Rahul,

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

     

    Thanks,

    Nikhil

    • 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:

      Rahul

  • 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