Application Development and Automation 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: 
Read only

Debugging RFC Function Module

Former Member
0 Likes
4,231

Hi,

I have a requirement to debug RFC FM available in Charm system from my development system. I have kept external breakpoints in the RFC FM (in Charm system). Now when I am trying to give the user id used in RFC Destination (tcode SM59 in dev system) under " tcode SE38 -> Utilities -> Settings -> External Debugging " in Charm system, it is giving error message - "Log on with a dialog user". Please help so that I may debug the external RFC (available in Charm system).

(I dont have authorization to tcode SMQR and also I cannot make temporary changes in RFC FM)

Thanks and Regards,

Anuj

9 REPLIES 9
Read only

Former Member
0 Likes
1,965

Hi Anuj,

I had a similar scenario while debugging the RFC. I asked he middleware team to create the dialog user creadentials.

After getting the credentials from the middle ware team, i was able to debug.

Thanks,

Sumit

Read only

0 Likes
1,965

Hi Sumit,

Thanks for your reply.

So after getting the dialog user credentials for the user id used in RFC destination, I can login with my id in Charm system, set this user id (of RFC destination) under " tcode SE38 -> Utilities -> Settings -> External Debugging" in Charm system. After that I should be able to debug with my id in development system ? Please correct me if I am wrong.

Thanks and Regards,

Anuj

Read only

0 Likes
1,965

Dear Anuj,

You have to activate an external breakpoint in the function module in the R/3

system and You have to set a dialog user in SE38 "Utilities -> Settings" under Debugging with it the RFC call will be executed. (Please use the new debugger.)

Best regards,

Erika

Read only

Former Member
0 Likes
1,965

Correct.

After setting the external breakpoint, the control will take ou the break point as soon as RFC gets called.

Then you can debug. Also there is some time, for which you can debug after that the connection will die. I am not sure same is applicable to your system. But yes..you can debug.

Thanks,

Sumit

Read only

former_member227140
Active Participant
0 Likes
1,965

to resolve this problem.

you have to provide debugging  access to rfc user.

Read only

Former Member
0 Likes
1,965

Hi,

you just have to ask basis to temporary change this user to dialog.

I do this whenever I have to debug background workflow processes, simply changing the user from dialog to system will make it able to place the breakpoint.

Kind regards, Rob Dielemans

Read only

sai_krishna24
Active Participant
0 Likes
1,965

Hi Anuj,

Similar issue earlier , used a infinite loop concept to debugging a RFC which is calling from a mobile app.

Try like this

1. In your RFC  coding write these code

do.

IF V_X eq 'X'.

exit.

ENDIF.

enddo.

2. once you submit your action in your frontend. Goto SM50 and then debug from there (SAP Work process).

in debugging change V_X value to 'X' so that you can execute your code after that until then it will be in that loop. So we will have enough time to debug.

3. Most important thing is remove this infinite loop after you finish debugging.

I tried external debugging to however this one given me a good handle to debug. Of course we used SUP.

Thanks

SaiKrishna

Read only

0 Likes
1,965

Hi Sai,

The solution which you have provided can be useful for only Z FM. What about debugging standard RFC.

Read only

0 Likes
1,965

Hi,

please check my previous post, you just have to change the background user temporary to dialog. There are sizing differences between those types of users, but other than that it shouldn't be that big of a deal if you change the user back to system shortly after your debugging research is done.

I have to do this when I am confronted with really weird issues in Workflow, then I have to tell basis to change the Wf-BATCH user to dialog for a couple of hours.

Kind regard, Rob Dielemans