Skip to Content
0
Nov 14, 2013 at 03:49 PM

Check if function module is directly called via RFC

1236 Views

Hi expoerts,

I would like to check if a function module is called directly by RFC or by a other function module or program.

To check this i found the function module RFC_WITHIN_SAME_SYSTEM.

This works well at the first view.

My problem is:

I have different function modules wherer are able to called by RFC. If the module is called by RFC there should be executed some special checks (like logging). Otherwise these special checks should be not executed.

It is also possible that a function module is internally calling a other function module what itself is also possible to called directly by RFC.

In this case the special checks should be only executed for the first function module, not for the second one.

For example:

FM A --> Called by RFC --> Create Log

FM B --> Called by RFC --> Create Log

FM A --> Called by RFC --> Create Log --> internal call of FM B --> no Log

The function module RFC_WITHIN_SAME_SYSTEM returns by RFC all the time a N. For the first and also internally called function module.

Can anybody explain me how I can handle or check this?

Is it possible to reset the parameter for "called by RFC"?

Regards

Christian