External debugging in SAP for an RFC
When I call an RFC function module from a program I want to debug it in the destination system. I tried setting up the external debug on,system debugging and all other techniques mentioned in few forums here but am unable to debug in the destination system.
I am calling a BAPI in the Target System.
Any valuable inputs on this are welcome!.
Anuj Kumar replied
To debug your program proceed as follows:
1. write following code in your RFC :
DATA NUM TYPE I VALUE 1. WHILE NUM < 2. ENDWHILE.
2. This will begin an undefined loop. Now, goto transaction SM50, select your program in process overview, and goto Menu "Program/Mode->Program->Debugging"
3. Debugger will start at While loop statement. Change the value of NUM to greater than 2 to get out of loop and proceed further with debugging
Hope this solves your problem. Award some points if u find it useful