Configuration of System Resources for aRFC, tRFC, qRFC

Use

An application can make calculations and collect data simultaneously by using the various types of asynchronous RFCs. This can also happen indirectly, as with the outbound or inbound queue in qRFC. Every RFC request occupies a dialog work process on the application server on which the RFC is executed.

The parallel processing option makes it necessary to answer the following questions:

  • How do you find a sensible level of parallel processing?

  • How are competing requests to the server resolved (for example, online processing versus parallel processing)?

  • How does the application server guard against overload siutations?

Integration

With Kernel 7.40 the existing resource monitoring has been revised and generalized. In particular, this check is carried out for accepting external requests such as RFC and HTTP calls It can be set with parameter rdisp/server_resource_limit (as of Kernel 7.53) or rdisp/resource_limit (Kernel 7.40 – 7.49). If resource occupation exceeds the defined quotas, the calls are rejected. The following describes the options for setting more precise quotas for RFC calls to prevent calls from being rejected and the errors relating to this. These more precise quotas usually indicate much earlier when a load situation is becoming very high for a server. This can be used by applications with the help of the following RFC constructs for optimal distribution of requests to a set of application servers.

Priorities were also introduced with Kernel 7.40. If asynchronous RFC calls were started by a batch job, they have LOW priority, otherwise NORMAL priority. This affects how many dialog work processes can be used at the same time. The relevant quotos are specified in parameters rdisp/scheduler/prio_normal/max_quota and rdisp/scheduler/prio_low/max_quota. It also affects the maximum runtime of the RFC execution. This is configured priority-dependent in parameters rdisp/scheduler/prio_normal/max_runtime and rdisp/scheduler/prio_low/max_runtime .

The configuration options described here are valid for the following RFC types.

Asynchronous RFC with Load Distribution (aRFC)

You can use this RFC type to program parallel RFC calls. The resources are checked and assigned as far as the set quotas allow.

The required ABAP language element is:

CALL FUNCTION Remotefunction STARTING NEW TASK Taskname DESTINATION IN GROUP Groupname

With this ABAP command, you are instructing the SAP system to process function module calls in parallel. The command implements parallel processing by sending asynchronous RFC calls to those servers available in the RFC server group Group Name specified for processing requests. The group name DEFAULT means that all available application servers are used.

qRFC with Outbound Queue

The qRFC LUWs are executed using the outbound scheduler. The outbound scheduler uses parallel RFC to process the outbound queue. To allow this, you need to define the destinations in transaction SMQS.

The outbound scheduler then checks the resources and executes parallel RFCs if resources are available. If no resources are available, synchronous RFC is used instead.

qRFC with Inbound Queue

If you are using the inbound queue, the inbound scheduler takes is responsible for processing the inbound queue. To allow this, you need to register the queue names to be processed using the inbound scheduler in transaction SMQR.

The inbound scheduler then checks the resources and executes parallel RFCs if resources are available. If no resources are available, the scheduler waits until resources become available.

For more information, see Monitor Transactional RFC and Queued RFC.

tRFC and qRFC

The transactional RFC and the qRFC use the resource check. The associated ABAP language elements for both RFC types is:

CALL FUNCTION Remotefunction IN BACKGROUND TASK DESTINATION Destination

With a preceding additional function call (TRFC_SET_QIN_PROPERTIES or TRFC_SET_QUEUE_NAME) tRFC can be defined as qRFC.

This ABAP command flags the function module remote function for asynchronous processing. The function module is not executed immediately. The data transferred with EXPORTING or TABLES is placed in a database table. A COMMIT WORK then triggers the function module. There are various cases:

  • The data is updated. If tRFC/qRFC has been triggered within the update, these are executed in parallel after the V1 update (within the update). If the tRFC/qRFC call is registered in the scheduler, the scheduler is simply triggered within the update. The execution of tRFC/qRFC takes place outside the update through the scheduler.

  • The data is not updated. The tRFC/qRFC function modules started within the application LUW are executed in parallel as far as possible. If local system resources are exhausted, the tRFC/qRFC is serialized so as not to further increase resource utilization. However, this is not the case if the tRFC/qRFC function modules are processed in batch. If the tRFC/qRFC have been started in batch, they are always processed in parallel as in the update process, regardless of the system resource utilization.

Features

This documentation is divided into the following sections:

More Information

Details about using and programming RFCs can be found in the RFC documentation: