Application Development 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: 

How do I know if a RFC function is running locally?

former_member194362
Discoverer
0 Kudos

Hello.

I would like to know when a RFC function is running locally or not.

Is there a way to know this? Is there a way to ask the name of the RFC destination that called the Function?

Thanks in advance for your help.

Regards,

Hans

2 REPLIES 2

christian_wohlfahrt
Active Contributor
0 Kudos

Hello Hans,

be honest: when you know the difference between 'local' and 'remote', your function would act different in these cases.

I would define such a function not any longer as fully remote enabled.

I guess you know: import/export table parameters are possible in RFC functions.

One more remark: if in calling program something like destination 'SERVER_GROUP' is defined, execution might land on same server as calling program - still fully 'remote' from handshake point of view.

Just out of curiosity: what's the real reason for your question?

Regards,

Christian

Former Member
0 Kudos

Hello Hans,

I'm not sure I have understood your requirement. Who is calling the RFC function ? If you are doing it, then you would have to determine before calling the function the value supplied for DESTINATION. If it is NONE, then you know even before the RFC is called whether it is going to run locally or on some remote server.

In case it is a standard SAP program, you would normally have to tell the program in some way or the other (eg. configuration settings / parameters in the FM interface)that the Function has to be executed remotely.

Regards,

Anand Mandalika.