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

Running a RFC Function in SE37

Former Member
0 Likes
3,561

People,

is there a difference between to run a RFC function using SE37 and when the external system calls it?

I´m trying to run the Function BAPI_SOURCEDETERMIN_GETSOS in SE37, but I don´t know if I have to fill the field "RFC target sys".

If I fill this field or not, the result is always the same: I did not returns records. But when the external system calls it I can see in debug session it returns 1 records (this is the correct).

What can be wrong?

Thanks a lot!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,824

There should not be any difference if you run a RFC in the target system through SE37 or if that RFC is called from outside the system.

First thing I would check is if you populate the import and tables parameter exactly the same as they are populated by the external system when it calls it.

Furthermore it might be an authorization problem. The user that the external system is using to call the RFC might be a different user than your own and have more authorizations than you do. (Try SU53 after you executed the RFC to see if something was failing)

If nothing helps you need to debug the RFC when you execute it in SE37 and also debug the RFC when it is called from outside the system to see what is different.

To debug the RFC that is called from the external system, you need to set an external breakpoint in RFC for the user the external system is using to call the RFC. Once the external system calls the RFC a new session will pop up with the debugger.

Hope that helps,

Michael

People,

is there a difference between to run a RFC function using SE37 and when the external system calls it?

I´m trying to run the Function BAPI_SOURCEDETERMIN_GETSOS in SE37, but I don´t know if I have to fill the field "RFC target sys".

If I fill this field or not, the result is always the same: I did not returns records. But when the external system calls it I can see in debug session it returns 1 records (this is the correct).

What can be wrong?

Thanks a lot!

2 REPLIES 2
Read only

Former Member
0 Likes
1,825

There should not be any difference if you run a RFC in the target system through SE37 or if that RFC is called from outside the system.

First thing I would check is if you populate the import and tables parameter exactly the same as they are populated by the external system when it calls it.

Furthermore it might be an authorization problem. The user that the external system is using to call the RFC might be a different user than your own and have more authorizations than you do. (Try SU53 after you executed the RFC to see if something was failing)

If nothing helps you need to debug the RFC when you execute it in SE37 and also debug the RFC when it is called from outside the system to see what is different.

To debug the RFC that is called from the external system, you need to set an external breakpoint in RFC for the user the external system is using to call the RFC. Once the external system calls the RFC a new session will pop up with the debugger.

Hope that helps,

Michael

Read only

Former Member
0 Likes
1,824

Hi,

When you call a function module (RFC or non RFC) from test environment, you often enter parameters to the function module in an incorrect format.

E.g. material number is stored and used internally within ABAP programs prefixed with leading 0s. E.g. material number 1000 would actually be passed to a parameter when called in a ABAP program as 00000000000000001000 - and is hence treated correctly, however when we call the FM from testing (SE37) environment, since we enter the values, we pass only 1000 and the system does not interpret our input correctly and does not give any output.

As suggested to really analzyze the issue, run both FMs in debugging parallely one called from ABAP program and other called from SE37 and check where the difference lies.

If the above issue stated is the cause, and if testing from SE37 is necessary then you might have to consider using conversion exits on the inputs to ensure they are converted to correct format.

Cheers,

Aditya