Ansicht
Dokumentation

ABENRFC_DESTINATION - RFC DESTINATION

ABENRFC_DESTINATION - RFC DESTINATION

CL_GUI_FRONTEND_SERVICES - Frontend Services   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

- Destination

The information about the target system of an RFC call is specified by the RFC destination.

Static Destinations

The attributes of destinations are defined statically and managed in AS ABAP using the transaction SM59. Every destination managed in transaction SM59 has a unique name that can be used to specify the destination after the addition DESTINATION in RFC. For every destination, a connection type, the partner program, and the target system are defined in transaction SM59. Logon data and further connection options can also be defined in the destination.

Note

The documented function module RFC_MODIFY_R3_DESTINATION processes static destinations managed in transaction SM59.

Dynamic Destinations

In cases where it is not sufficient to use the static destinations managed using transaction SM59, the associated attributes can be combined to form a dynamic destination. This is done using the class CL_DYNAMIC_DESTINATION. Its method CREATE_RFC_DESTINATION creates a text field that can be specified in the current internal session in RFC after the addition DESTINATION and is interpreted as a destination by the runtime framework. A destination from transaction SM59 can also be used as a template and modified accordingly. The validity of the new destination is not checked until it is used for an RFC.

A dynamic destination has the characters %% as a prefix. These dynamic destinations should now only be created using the class CL_DYNAMIC_DESTINATION and must never be copied to programs from outside. Further methods in the class make it possible to

  • invalidate a dynamic destination created for the current session,
  • check whether a destination entered from an external source is a dynamic destination,
  • invalidate any dynamic destinations entered from external sources, if necessary.

Dynamic RFC Destination

Predefined Destinations

There are three predefined destinations that do not have to be maintained using transaction SM59:

  • NONE
With destination NONE the function module starts in the same as the calling program, but using the RFC interface and in a separate RFC session for the current user. This destination is possible for all execution modes.
  • SELF
Destination SELF works as NONE but uses the RFC protocol fast serialization.
  • BACK
Destination BACK can be used in a function module that is called remotely and refers back to the caller. This specification is only possible in function modules that were called synchronously. The destination BACK can be used to call any remote-capable function module of the calling system in all three execution types. In synchronous callbacks, the associated relevant function pool is loaded into the internal session of the calling program, if it does not yet exist there. The existing RFC connection is used for the callback.

Notes

  • If the predefined destination NONE is used, no logon data or password must be specified when the user session is opened. If an RFC is performed for the current using a destination maintained in the transaction SM59, it depends on the settings on the application server whether logon data needs to be specified or not.
  • The logon data user name, client, and logon language for an RFC session with the destination NONE is taken implicitly from the calling session. The text environment language of the calling session must be used for the logon language instead of the logon language of the session. The text environment language can be set using the statement SET LOCALE LANGUAGE.

as Destinations

In addition to the destinations created in transaction SM59, the dynamic destinations, and the two predefined destinations, destinations can also be specified directly using the name of an , as returned by the method GET_INSTANCE_NAME of the system class CL_ABAP_SYST. This name has the form hostname_sysid_instnr. Here, hostname is the name of the host computer of the , sysid is the name of the AS ABAP, and instnr is the instance number of the , for example as displayed using transaction SM51.

The only systems that can be reached like this are the current systems or systems connected by a trust relationship. For the current system, the logon data of the current user is used. For other systems, a logon is necessary.

Note

This specification can also be composed dynamically without posing a security risk.

More Information

For a detailed description of the RFC destination, see the documentation RFC in SAP Help Portal.






ABAP Short Reference   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 7402 Date: 20240418 Time: 224204     sap01-206 ( 56 ms )