‎2009 Oct 03 1:02 PM
Hi Guys ,
How to debug Idoc please tell me,
One way I know ,( Going to we19 and after that giving idoc number,
selecting inbound function module and after that giving that FM name callin that one in degug and Fore ground)
But I dont want this one way because it was creating new idoc , please Giude me
Thanks,
Durga Prasad.
‎2009 Oct 03 5:00 PM
Hi Durga,
because IDOCS are usually processed in background processes, it's not too simple.
I remember we included a waiting loop somewhere in the coding that is processed,
i.e.
data:
lv_run TYPE f,
lv_end TYPE f,
lv_wait_seconds TYPE INT4.
lv_wait_seconds = 60.
GET RUN TIME FIELD lv_run.
lv_end = lv_run + 1000000 * lv_wait_seconds.
WHILE lv_run < lv_wait_seconds and lv_wait_seconds > 0.
GET RUN TIME FIELD lv_run.
ENDWHILE.The start your normal IDOC processing and start transaction SM50 process overview.
Your IDOC processing will loop endlessly for 60 seconds. During this time, you can swith on debugging for the process (Menu Program -> Program -> Debugging). In the WHILE LOOP, clear lv_wait_seconds so that processing is continued. Now you can debug as you want.
Regards,
Clemens
P.S. This solution for debugging in background was posted so often that I wonder why your search was not successful
‎2009 Oct 05 6:43 AM
Hi Clemens Thansk for your inputs,
This is one is nothing but debugging of back ground job , this one i know, this is nothing but debugging of new idoc which is coming into our system via back ground,
But My point is , I have one idoc posted that one but it contains some errors then, then i will go to the we19 there i will give this no through debug i will rectify error, every time if i go to debug the original idoc it will create duplicate idoc related to that idoc , But i dont want those duplicate idocs . is there any another way to over come this one.
‎2009 Oct 05 8:23 AM
1. What about transaction BD87. Select the IDoc you want to reprocess, press /h and process IDoc.
2. Process IDoc via debugging from report RBDPROCESS.
‎2009 Oct 05 8:33 AM
Hi,
we can very well check in WE02 , if there is any error in a segment..Please see if your idoc is failing due to this. WE19 is the way where we can debug the idoc . we can delete the idoc if we want, please use tcode ->WE11..
Regards,
Nagaraj
‎2009 Oct 05 12:18 PM
Hi
Please use BD87 to reprocess the IDOC this will not create a new IDOC,If you use WE19 it will create a new IDoc which will be a copy of the exisiting IDOC
‎2009 Oct 05 12:37 PM
Hi,
Just like what others have said, you use tcode BD87 to reprocess an idoc. And one way to debug idocs is to change the processing mode of idoc to not trigger immediately and put a break point in the FM of your idoc.
Hope it helps...
‎2013 Aug 23 2:27 PM
Hi Prasad,
All the answers are good and informative for me too because i wanted to post the same question.
One tip i found and i want to share with is that, once you are inside in debuggin mode you can go to menu breakpoint==>Breakpoint at==>Breakpoint at Statement and then press F7. It will help you find quickly the error message.
Kind Regards
Umer