02-07-2008 4:26 PM
Hi,
I have a RFC enabled Funciton Module and I want to write a code running depends on connection type (RFC or dialog). I found a flag SY-CALLD. But I'm not sure about it. Can I use this flag for to determine connection type?
best regards,
Altug Bayram
02-07-2008 9:27 PM
Hello Altug,
you can try to use the following statement:
CALL 'RFCControl' ID 'CODE' FIELD '?'.
The sy-subrc will give you an information, if you'*re connected via rfc, or not. But be aware, that this statement is for SAP internal use only (i.e. can be changed without information, no documentation, ...).
To check, if your connected via rfc, or if you're in a dialog mode, you can also try to get an information, if a GUI is available. I've used this in one of my function modules, that can be called from a web-application or from a SAP report.
Example: function module RFC_IS_GUI_ON (by the way- this function module is also using the CALL 'RFCControl' statement).
Best regards
Stephan
02-07-2008 4:49 PM
02-07-2008 5:01 PM
Hi,
This FM is determine RFC destination type. I'm calling RFC from external program (.net) or abap. I want to determine where called this program (abap or .net connector).
best regards
Altug Bayram
02-07-2008 9:27 PM
Hello Altug,
you can try to use the following statement:
CALL 'RFCControl' ID 'CODE' FIELD '?'.
The sy-subrc will give you an information, if you'*re connected via rfc, or not. But be aware, that this statement is for SAP internal use only (i.e. can be changed without information, no documentation, ...).
To check, if your connected via rfc, or if you're in a dialog mode, you can also try to get an information, if a GUI is available. I've used this in one of my function modules, that can be called from a web-application or from a SAP report.
Example: function module RFC_IS_GUI_ON (by the way- this function module is also using the CALL 'RFCControl' statement).
Best regards
Stephan