Get Example source ABAP code based on a different SAP table
ABAP_RFC - Dialog Interactions In an RFM> called using RFC, both variants sRFC> and aRFC> can execute dialog interactions using the SAP GUI or call dynpros. 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, but instead:
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> ends 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 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, in which the transaction specified by tcode> is executed.
Latest notes:
If RFMs are called externally using dialog interactions, only dialog box, that is, GUI windows without a standard toolbar, should be displayed, so that no commands can be entered in the command field.
Logon windows that appear in a different system when an RFM is called are already dialog interactions. ABAP_HINT_END