Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ABAP RFC flag

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

Tags:
Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question