RFC Dialog Interactions
In an RFM called using RFC, both the variants sRFC and aRFC can execute dialog interactions using SAP GUI or call screens. This is not possible with the variants bgRFC, tRFC, and qRFC. It is technically possible for pRFC but not recommended.
Dialog interactions executed by sRFC and aRFC require the RFC client to be executed in the foreground in a dialog work process and that the user defined in the destination has dialog authorization. RFM does not open a GUI window on the RFC server; instead it does the following:
- sRFC uses the current GUI window of the caller, which means that the current screen is replaced temporarily by the screen of the remotely called function. Entering /ntcode commands in the command field of the standard toolbar closes the remote connection and the calling program continues its processing after the RFC. The behavior on the server side is then no longer defined.
- aRFC opens a new ABAP session in the RFC client and displays the remotely executed application in a new GUI window there. Entering /ntcode commands in the command field of the standard toolbar executes the transaction "tcode" in this session.
The screen data is passed back by the RFC interface to the calling system. Statements for classic list
output, such as
WRITE, which are executed when a function module is called
remotely, write to the list buffer of the RFC server. The lists can be displayed using the statement
LEAVE TO LIST-PROCESSING during a dynpro sequence displayed in a GUI window of the caller. List output made in programs called from RFM is also displayed in a GUI window of the caller.
In both cases, entering /otcode commands in the command field of the standard toolbar opens another ABAP session on the RFC server and an additional ABAP session for displaying a GUI window on the client side. This happens when the transaction "tcode" is executed.
If RFMs are called externally using dialog interactions, only dialog windows (that is, GUI windows without a standard toolbar) should be displayed, so that no commands can be entered in the command field.