Get message ID using reference IDoc number in SAP PO
Hello Experts ,
We are having one scenario in which data will be sent from third party to PO and from PO to SAP ECC (IDoc) to create the opportunity in ECC.
Once opportunity is created successfully in SAP ECC, it will send the success confirmation data to third party(ECC-PO-third party). But in case of technical error in ECC while creating the IDoc, IDoc is having very limited data in it. So we are not able to get the required field (third party opportunity ID) in that IDoc.That field we need to send back to third party so that they can understand the error is for which opportunity ID. The same field is available in first interface (ie third party-PO-ECC)
so we have decided to use the payload of first interface to parse it and to get the required data(third party opportunity ID) from it.The flow will be like technical error IDoc will be having reference IDoc number of first interface from which we will find the messageID. From messageID we will find the messageKey and from messageKey, payload. Referring below link.
But we are not able to find message ID from IDoc reference number in SAP PO. Do we have any APIs to retrieve the same. Can anyone please help us with the same.