‎2019 Nov 22 11:34 AM
Hi Everyone,
I am using IDOC_STATUS_WRITE_TO_DATABASE to change the status of the idoc from success to error,its working properly that the status of the IDOC in WE02 is getting as per my requirement.But my issue is iam unable to get the error message on the output screen.Can anyone please help me out how to get my error message on the output screen.
‎2019 Nov 22 12:26 PM
Can you please elaborate your issue, which output screen? are you running a program which has this FM called and you wanted a output message once the program is run?
‎2019 Nov 22 12:41 PM
Yes, when i run the program(Interface program) i should get the output like "There is some error in the Delivery". Actually i am calling the FM IDOC_STATUS_WRITE_TO_DATABASE in to the class.
‎2019 Nov 22 1:29 PM
I think you should not use IDOC_STATUS_WRITE_TO_DATABASE. I don't understand why you need to handle the status outside the inbound process. Maybe you want to explain the whole scenario?
‎2019 Nov 22 5:38 PM
Mortha Sri Lakshmi Praveena If you are looking for IDOC status you can get it from EDIDS table by passing IDOC number or by using FM 'IDOC_READ_COMPLETELY'
‎2019 Nov 22 10:10 PM
I'm also confused by the question. Why is it necessary to change the IDoc status from success to error? If it's already processed successfully then it must not be processed again since the transaction it's meant to perform already occurred.
There is a standard SAP program that can change the IDoc status but it's not advertised for obvious reasons. I'm reluctant to mention it here since it's not clear what you're trying to achieve.