09-22-2008 7:21 PM
Hi Team,
I was looking for a Userexit (or BADI) which I can leverage to write some basic IDOC related data to a "Z" table whenever any Inbound or Outbound IDOC goes into a failed status. Could not find a generic exit(BADI) to do this.
Anyone knows about an exit etc to achieve this. Please let me know if there is any alternative way to get the same results. Your help would be much appreciated.
Thanks
09-23-2008 1:01 PM
Hello,
As per my understanding, you'd like to set up an Error Notification Mechanism whenever any Outbound IDoc fails. Now, I'd like to give you an approach by using which you can achieve this.
1. For any Outbound IDoc, after all of the Segments are processed in the Selection Program, it'll access a Function Module by name "IDOC_CREATE_ON_DATABASE" in which it tries to make an entry of the IDoc in the Database tables, EDID4, EDIDS and EDIDC respectively.
2. So, what you can do here is, to go to that Function Module and create an Enhancement Implementation using which you can actually check the Internal Table IDOC_STATUS for the Error Status which could be 26 or any other Status.
3. Then, as soon as you find out an entry for the Error Status, you can use the FMs SO_DOCUMENT_SEND or SO_DOCUMENT_SEND_API1 or any other Function Module to Send a Mail to any User.
4. Or, if you specifically want a Z-Table to be updated with the IDoc Information, you can do the same at this Enhancement Implementation.
Hope this Helps.
Thanks and Regards,
Venkat Phani Prasad Konduri
09-22-2008 9:37 PM
09-23-2008 1:01 PM
Hello,
As per my understanding, you'd like to set up an Error Notification Mechanism whenever any Outbound IDoc fails. Now, I'd like to give you an approach by using which you can achieve this.
1. For any Outbound IDoc, after all of the Segments are processed in the Selection Program, it'll access a Function Module by name "IDOC_CREATE_ON_DATABASE" in which it tries to make an entry of the IDoc in the Database tables, EDID4, EDIDS and EDIDC respectively.
2. So, what you can do here is, to go to that Function Module and create an Enhancement Implementation using which you can actually check the Internal Table IDOC_STATUS for the Error Status which could be 26 or any other Status.
3. Then, as soon as you find out an entry for the Error Status, you can use the FMs SO_DOCUMENT_SEND or SO_DOCUMENT_SEND_API1 or any other Function Module to Send a Mail to any User.
4. Or, if you specifically want a Z-Table to be updated with the IDoc Information, you can do the same at this Enhancement Implementation.
Hope this Helps.
Thanks and Regards,
Venkat Phani Prasad Konduri
09-23-2008 3:50 PM
Thank you Venkat,
Do we really have to implement an enhancement for something like this? I was hoping to get an user exit or BADI. But anyways, this was very helpful.
Anyone else knows about any user exit??
Regards
09-23-2008 6:17 PM
hi,
there are badi´s which are used by every IDoc.
BADI: IDOC_CREATION_CHECK
method: IDOC_DATA_CHECK
Exit: SIDOC001
EXIT_SAPLED1_001
BADI: IDOC_DATA_MAPPER
BADI: IDOC_DATA_INSERT
maybe it´s useful