‎2008 Sep 16 2:52 PM
Hi Experts,
I have a ABAP report (in System A) from where I am calling a remote function module which exists in a different system B.
ABAP Program(System A)<----calls--
RFC(System B)
Can I debug the RFC funnction module in system A using ABAP debugger? In other words if i put a breakpoint on the "call function" statement then in debug mode I want to see that the control is going to system B and I should be able to process the FM code line by line. Is this possible?
Is there any special transaction or settings?
Is there any alternative?
Please help
Thanks
Gopal
‎2008 Sep 16 2:55 PM
‎2008 Sep 16 3:10 PM
Approach 1. Just before the RFC call keep a break point. Once you reach the statement CALL FUNCTION you will be logged on the target system.
Approach 2. Log on to both the systems subcutaneously. Keep External breakpoint on the target system and see if call stops there. In principle it should stop there.
To set external breakpoints. go to ABAP code->Utilities->Debugging->Check the Flag External Debugging to Active and put your user ID there.
Amandeep
‎2008 Sep 17 4:18 AM
HI Amandeep,
I tried your approach but it did not work.
I kept an external breakpoint on the CALL FUNCTION statement. Then in debug mode, I don't get remote system login. The control stops at the breakpoint and on pressing F5 it goes to the next statement where I am checking the sy-subrc which is '0'.
Is there any other settings required?
Please help me!
Thanks
Gopal
‎2008 Sep 17 5:05 AM
Hi Gopal ,
u need to try Approach 1 of Amandeep, in this case , what user id u are using for RFC calls ? , take that user id , log on to SAP with that ID , and put a external Break point, then it will tigger.
regards
Prabhu
‎2008 Sep 17 7:31 AM
Hi Prabhu/Amandeep,
I have tried option 1 also.
"Approach 1. Just before the RFC call keep a break point. Once you reach the statement CALL FUNCTION you will be logged on the target system"
But in debug mode the control goes to next step after CALL FUNCTION. In other words I am not getting any login prompt to login to target system.
CALL FUNCTION 'XYZ' DESTINATION RRR.
-
if sy-subrc = 0.
do something.
endif.
In debug mode first the program execution stops at CALL FUNCTION statement. Then on pressing F5 the control goes to "if sy-subrc = 0" line.
What i want is, the program control should go to the given function module.
Please help me!
Thanks
Gopal
‎2008 Sep 17 7:40 AM
Hi Gopal ,
In other words I am not getting any login prompt to login to target system.--->No man , u dont get any option to Log on , while definiing RFC u will give lon on details .
are u sure ur program is executing that FM ? , i dont see any issue expect Authorizations or u are not doing in the right way.
try /nSU53 to find out ur authorizations.
regards
Prabhu
‎2008 Sep 17 7:45 AM
Hi Gopal
If the function module is not executed properly then the control will come to IF statement ( returning sy-subrc >< 0).
So check whether that function module is executed correctly , ie sy-subrc = 0.
Regards
Prabumanoharan
‎2008 Sep 17 7:45 AM
Hi Prabhu,
Yes, my program is excuting the FM. I can see tha the sy-subrc is 0 after CALL FUNCTION statement.
But still I want to debug the remote FM from calling program
Is this possible?
Thanks
Gopal
‎2008 Sep 17 7:49 AM
Hi Gopal,
I am suggesting you by assuming that in the SystemA you have an option to debug.
Check what are the parameters had been passed to the RFC and come to R/3 system and pass the same parameters and debug the RFC.
Regards,
Balaji.
‎2008 Sep 17 2:12 PM
Check if you have debugging authorizations in the target system.
Check if RFC destination is pointing to the right system.
Approach 1 should definitely work.
Amandeep
‎2008 Sep 17 8:19 AM
hello,
Try this method.
first check whether RFC connection is working b/w 2 systems.
if connection is working, then do like this.
In System B , put endless loop in FM before some main select statement.
like
DATA : v_a TYPE c VALUE space
DO .
IF v_a = 'X'.
EXIT.
ENDIF.
ENDDO.
the above code will be endleep loop.
In system A, when cursor goes to CALL FUNCTION DESTINATION 'XXXXX'.
u shud be logged in system B. the moment control comes to system B.goto tcode SM50 . check ur username . choose that particular checkbox then in menu bar --> program/session --> Program --> Debugging.
i hope it will help u.
try & let us know.
Thanks,
Manjunath MS
‎2008 Sep 17 1:15 PM
Hi,
at the point where the RFC is called put ann External Breakpoint and then Execute.I'm not very sure but i think it shud work,plz let me know if it works.
Thanks.
‎2008 Sep 17 2:00 PM
If you use the search, then I am sure you will find something about "remote debugging" and "single step" ... F5 ...
Cheers,
Julius
‎2008 Sep 17 2:22 PM
If you establish trusted RFC connections between the two systems then it will automatically take you to the target system after the call function step in debugging mode.
Thanks,
Krishna