InterviewSolution
| 1. |
Can A Server System Call Remote Function Of Client System Back Or When To Use Destination ‘back’? |
|
Answer» In general, the client and the server are determined at the start of an RFC. While a function is being processed on the server, this server can call a remote function on the client. In other words, the remote function can invoke its own caller (if the caller is itself a remote function module), or any remote function module loaded with the caller. The called-BACK function then runs in the same program CONTEXT as the original caller. This call-back mechanism can be triggered by using the special destination NAME ‘BACK’. If this name is specified in an RFC call on the system ACTING as the server, the system uses the same RFC connection that was established when the server received the first call. Once an RFC connection is established, it is maintained until it is either explicitly closed or until the calling program TERMINATES. During a call-back, the system will always attempt to use existing RFC connections before establishing a new one. To perform a call-back, the syntax is: CALL FUNCTION... DESTINATION 'BACK' In the below screenshot, remote function B of System B invokes remote function A in the calling System A. In general, the client and the server are determined at the start of an RFC. While a function is being processed on the server, this server can call a remote function on the client. In other words, the remote function can invoke its own caller (if the caller is itself a remote function module), or any remote function module loaded with the caller. The called-back function then runs in the same program context as the original caller. This call-back mechanism can be triggered by using the special destination name ‘BACK’. If this name is specified in an RFC call on the system acting as the server, the system uses the same RFC connection that was established when the server received the first call. Once an RFC connection is established, it is maintained until it is either explicitly closed or until the calling program terminates. During a call-back, the system will always attempt to use existing RFC connections before establishing a new one. To perform a call-back, the syntax is: CALL FUNCTION... DESTINATION 'BACK' In the below screenshot, remote function B of System B invokes remote function A in the calling System A. |
|