1.

Can We Call Remote Function Calls Locally?

Answer»

Sometimes there might be a need to call a remote function call from within the same system. This function can run either as a remote or a local call, depending on the CALL FUNCTION statement on how it is declared. It’s a known fact that parameter HANDLING are different for Remote Function Call and Local Function Call, so whether the call runs as remote or local the parameter handling gets affected adversely.

We can call remote functions calls locally using two ways.

CALL FUNCTION...DESTINATION = 'NONE'

This is a remote call, even though DESTINATION = 'NONE' means that the remote function will run in the same system as the caller. As a remote call, the function MODULE runs in its own ROLL area, and parameter values are handled as for other remote calls

CALL FUNCTION ‘RFC_SALES_DEL_STATUS’
DESTINATION ‘NONE’
EXPORTING VBELN = SALESNO
TABLES STATUS_T = IT_TAB
EXCEPTIONS NO_RECORD_FOUND = 01.

CALL FUNCTION... [no DESTINATION used]

This is a local call, even though the function module is registered as remote. The module does not run in a separate roll area, and is essentially like a normal function call. Parameter transfer is handled as for normal function modules. In particular, if the call leaves some EXPORTING parameters unspecified, it TERMINATES abnormally.

CALL FUNCTION ‘RFC_SALES_DEL_STATUS’
EXPORTING VBELN = SALESNO
TABLES STATUS_T = IT_TAB
EXCEPTIONS NO_RECORD_FOUND = 01.

Sometimes there might be a need to call a remote function call from within the same system. This function can run either as a remote or a local call, depending on the CALL FUNCTION statement on how it is declared. It’s a known fact that parameter handling are different for Remote Function Call and Local Function Call, so whether the call runs as remote or local the parameter handling gets affected adversely.

We can call remote functions calls locally using two ways.

CALL FUNCTION...DESTINATION = 'NONE'

This is a remote call, even though DESTINATION = 'NONE' means that the remote function will run in the same system as the caller. As a remote call, the function module runs in its own roll area, and parameter values are handled as for other remote calls

CALL FUNCTION ‘RFC_SALES_DEL_STATUS’
DESTINATION ‘NONE’
EXPORTING VBELN = SALESNO
TABLES STATUS_T = IT_TAB
EXCEPTIONS NO_RECORD_FOUND = 01.

CALL FUNCTION... [no DESTINATION used]

This is a local call, even though the function module is registered as remote. The module does not run in a separate roll area, and is essentially like a normal function call. Parameter transfer is handled as for normal function modules. In particular, if the call leaves some EXPORTING parameters unspecified, it terminates abnormally.

CALL FUNCTION ‘RFC_SALES_DEL_STATUS’
EXPORTING VBELN = SALESNO
TABLES STATUS_T = IT_TAB
EXCEPTIONS NO_RECORD_FOUND = 01.



Discussion

No Comment Found