Register Login

How to debug an idoc?

Updated May 18, 2018

Hello SAP Experts,

Please Explain What is the process to debug an idoc?

Thanks in Advance.


  • 29 May 2013 10:09 am Rohit Mahajan Best Answer
    IDocs are managed by a function module, which are plotted in contradiction of the table EDIFCT. As soon as you deploy an IDoc through BD87 you must have a breakpoint in the function and thoughout all this process it will stop.
    For outbound dispensation it is governed by the program that is sending the IDoc. For transactional data similar to purchase orders, the IDoc is generated with the help of RSNAST00 which in turn calls a function module assigned to the processing code (BD41).

    Hope this article might help you to understand the above issue
  • 27 Jan 2014 11:21 am Guest Helpful Answer


    This answer will help you in understand the steps in debugging of Outbound idoc:

    Debugging of Outbound idoc

    The outbound idoc is the one which we use to send from one system to another system and it becomes inbound idoc for the target system from our sender system.

    Whenever you gets any idoc with error , go to WE02 and enter the idoc number . by default system gives current date s remove creation date,system will identify idoc by just idoc number on executing it ,you will get the details of idoc like three sections .

    1. First one is control record which contain the information of creator of idoc , who is the sender,who is receiver like all these idoc administration details .

    2. Second section is Data record .this section contains the complete information of the data which is being came in idoc from the other system. in this ,there will be so many segments like E1EDK01 ,E1EDP01 etc.The first data record contains the document number whose information came and appearing in different different segments .

    3.Third section will be status recrd and it will contains all the status like idoc processed successfully (53 status , success one ) application document not posted (status 51 ,error status ) dispatch ok (status 12 ) status 68 ( to make idoc unnecessary and not for processing further etc )

    4. Now after seeing all these you need to see the error message in status record i.e 51 status error message .copy the message number and paste it in SE91 transaction with the message class and message number .now that message will come and find the where used list of that message .Now put breakpoints on all those message

    5. Then go to WE20 transaction and see the partner profile of that idoc under LS or LI or KU etc partner sections .On finding the partner ,see the message type of our failed idoc , then double click on that message type in inbound section .then see the message code or process code written there .Now you will find a Function Module name which is responsible for processing .

    6.Then double click on that Fm and search for "Call function in global search.put the breakpoints at CALL CUSTOMER FUNCTION ' 001 ' INSIDE THAT you will find and include .enter int that include and search for your segment in global search or search for that error message and put break point there.

    7.Now Since it is Outbound idoc ,we cannot reprocess it through BD87 and come in debugging mode as it is already gone .We need to replicate a similar scenario in testing system.Now to come in debugging ode ,we have to use a report.Go to SE38 Transaction and enter RSNAST0D and just execute it .

    8. On selection screen you will have to enter the delivery number,output type from which idoc is triggered ,medium of output type , deselect both the check boxes given on selection screen and execute will get another screen and just execute it. and then you will be in debugging mode and you will come to the places where you have put the breakpoints.

    Now just see how the values are getting filled where the message is appearing what condition is failing .then you can find the exact cause of idoc failure .

    Hope this answer will be helpful to everyone and you will really like it for your Use.

  • 29 May 2013 1:01 pm ravi
    thanks for ur help..can u send me the related data with screen shots to my mail id for better understanding..because i need it
  • 05 May 2014 8:25 am rekha

    The IDOC file fails because the data with in the IDOC file is not correct then we use debugging. The Table EDID4 includes all the header and segment data of an IDOC file. We use transaction code SE16 to browses the table. Another alternative is to implement transaction code WE09 & WE10.