cancel
Showing results for 
Search instead for 
Did you mean: 

RFC calls not returning/returns in debug mode

Former Member
0 Kudos

Hi all

i had a requirement to invoke a RFC Async and recieve the results in my program with a condition that the name and parameters of RFC are determined runtime.

To meet this requirement, i generated a the RFC call and return form code dynamically and called that code from my program via a subroutine.

The problem i am facing is that, whenever i execute my program in debug mode the RFCs are called and the parameters are returned( perform on end of task edition is used)

via subroutine, but when i execute the code via F8 the program goes in indefinite wait for return parameters.I am calling 2-3 RFcs at same time, and all of them are on local host.

the Functions are working well and the RFC destination is also working well.

But this amalgum of my program and dynamic calls is not going through.

I read in documentation that if we change the program context or the roll area then the results are not recieved by main program. by the way i am using WAIT to receive the results.

For the moment if i consider, my program context or roll area is getting changed because of dynamic code generation then also the dynamically generated code is the one containing the RFC call and its revieve subroutine, therefore there shall be no problem with that, the other thought i am getting is that in debugger implict commit work happens, is the program working because of that in debugger?? i dont know....

Can any one help me with this, in the above long paragraph if anyone gets confused..i can again try to restate my problem.

One more thing..i have checked the ST22 and SM50 for any abnormalities, couold not find one.

thanks in advance

praveen

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

> i had a requirement to invoke a RFC Async and recieve

> the results in my program ...

That is not possible. When you call an RFC async, you cannot receive the result of the RFC. If you want the results, you have to call the RFC syncronously.

When you debug, the debugger calls the RFC synchronously, to enable you the debugging of the RFC.

Regards

Stefan