Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

User Exit when any IDOC failes

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

uwe_schieferstein
Active Contributor
0 Kudos

Hello Sanjay

You may want to have a look at thread

Regards

Uwe

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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