Detailed Check

This check can take place either in the dispatcher or in the work process. If the local application server is being checked, the check takes place in the work process; if another server is being checked, it takes place in the dispatcher of the server. This means that a free dialog work process is not needed to process the request. The caller’s time is thus not wasted, as it does not have to wait for a free work process.

The procedure is as follows:

...

       1.      The maximum number of available resources is calculated thus: number of dialog work processes (dia_wps) – number of dialog work processes that have to stay free for the dialog user (wait_dia_wps).  The profile parameter rdisp/rfc_min_wait_dia_wp performs this calculation.
If the number of dialog work processes is smaller than the number of work processes that have to stay free, the number is then set to wait_dia_wp = dia_wps – 1.

       2.      The system also checks whether resource identification is active.
If resource identification is not active – which is not allowed – the return value is set to 2 and the reason is set to TH_ARFC_RES_NOT_ACTIVATED.

       3.      The system checks whether there are free work processes available to accept requests.

§         ...

                            a.      The number of free work processes is calculated (waiting_wps).

                            b.      If waiting_wps <= wait_dia_wps, no resources are returned and the reason TH_ARFC_RES_WAITING_DIAWP and the return value 0 are set.

                            c.      The resources are calculated again.

First of all the number of work processes occupied with active RFCs is calculated. (function DpGetExtCheckedResourcesCnt). This number is deducted from the maximum number of processes available:

dia_wps-wait_dia_wps–DpGetExtCheckedResourcesCnt()

. Take this value and compare it to the number of currently free dialog work processes. Whichever is the lower of the two values equals the number of resources available.

resources=min(waiting_wps,(dia_wps–wait_dia_wps-DpGetExtCheckedResourcesCnt()))

       4.      The communication channels are checked. Specifically, the system checks that there are still enough entries in the communication table (display using transaction SM51  ®  Go to  ®  Server information  ®  Communication table).

§         ...

                            a.      quota = (rdisp/max_comm_entries * rdisp/rfc_max_comm_entries) / 100 (only the whole number counts, numbers after the decimal point are ignored).
If the total is 0, the reason TH_ARFC_RES_LOW_MAX_COMM_ENTRIES and the return value 2 (NEVER_GET_RESOURCES) are set.

                            b.      The system determines the number of communication channels in use, and checks whether the maximum quota has been exceeded.

                            c.      If the quota has been exceeded  (count>quota), no resources are returned, the reason TH_ARFC_RES_MAX_COMM_ENTRIES is set, and the return value 0 is set.

                            d.      Otherwise, the resources are calculated afresh (and may be reduced) (new_resources = min(quota – count, resources )), and the reason TH_ARFC_RES_OK and the return value 0 are set.

       5.      Work processes check: is the user already occupying too many work processes? (Display in SM50)

§         ...

                            a.      quota = (dia_wps * rdisp/rfc_max_own_used_wp) / 100 (only the whole number counts, numbers after the decimal point are ignored).
If the quota is 0, the reason TH_ARFC_RES_LOW_OWN_USED_WP and the return value = 2 (NEVER_GET_RESOURCES) are set.

                            b.      The system determines the number of communication channels in use, and checks whether the maximum quota has been exceeded.

                            c.      If the quota has been exceeded (count>quota), no resources are returned, and the reason TH_ARFC_RES_OWN_USED_WP and the return value 0 are returned.

                            d.      Otherwise, the resources are calculated afresh (and may be reduced) (new_resources=min(quota – count, resources)), and the reason TH_ARFC_RES_OK and the return value 0 are returned.

       6.      Dispatcher queue check (dispatcher dialog queue): because every RFC has an associated entry in the dialog queue, the system checks whether there is enough space in the dialog queue for new requests. (Display in SM51 ® Goto ® Server Information ® Queue Information, profile parameter rdisp/elem_per_queue, default=2000). The latest queue information is then read.

§         ...

                            a.      If an error occurs, the reason TH_ARFC_RES_REQQUEUE_ERROR and the return value 2 are set. Otherwise
que_max = maximum number of entries in the queue
count = current number of entries in the queue

                            b.      quota = (que_max * rdisp/rfc_max_queue) / 100 (only the whole number counts, numbers after the decimal point are ignored).
If the quota is 0, the reason TH_ARFC_RES_LOW_REQQUEUE and the return value = 2 (NEVER_GET_RESOURCES) are set.

                            c.      If the quota has been exceeded (count>quota), no resources are returned, and the reason TH_ARFC_RES_REQQUEUE and the return value 0 are returned.

       7.      Logon
As every RFC is linked to a logon in the target system, the system checks whether any further logons can be carried out (display in SM04, profile parameter rdisp/tm_max_no, default=200).

§         ...

                            a.      quota = (rdisp/tm_max_no * rdisp/rfc_max_login) / 100 (only the whole number counts, numbers after the decimal point are ignored).
If the quota is 0, the reason TH_ARFC_RES_LOW_LOGIN and the return value = 2 (NEVER_GET_RESOURCES) are set.
count = number of logons

                            b.      If the quota has been exceeded (count>quota), no resources are returned, and the reason TH_ARFC_RES_LOGIN and the return value 0 are returned.

                            c.      Otherwise, the resources are calculated afresh (and may be reduced) (new_resources=min(quota – count, resources)), and the reason TH_ARFC_RES_OK and the return value 0 are returned.

       8.      Own logons
As every RFC is linked to a logon in the target system, the system checks whether any further logons can be carried out. The amount of “own logons” is restricted (display in SM04, profile parameter rdisp/tm_max_no, default=200), so that any one user cannot log on to the system too many times.

§         ...

                            a.      quota = (rdisp/tm_max_no * rdisp/rfc_max_own_login) / 100 (only the whole number counts, numbers after the decimal point are ignored).
If the quota is 0, the reason TH_ARFC_RES_LOW_OWN_LOGIN and the return value = 2 (NEVER_GET_RESOURCES) are set.
count = number of logons

                            b.      If the quota has been exceeded (count>quota), no resources are returned, and the reason TH_ARFC_RES_OWN_LOGIN and the return value 0 are returned. Otherwise, the resources are calculated afresh (and may be reduced).

       9.      Server status
So that the server can process an RFC request, it must be ready for use. The normal status of the server is RUNNING. If the server has a different status, no resources are returned and the reason is set accordingly.

§         ...

                            a.      TH_ARFC_RES_SERVER_HIBERNATE: the server is deactivated (in SM51 or SMMS; this ensures that the server does not get any more requests – such as updates –  from other servers).

                            b.      TH_ARFC_RES_SERVER_SHUTDOWN: the server is being shut down.

                            c.      TH_ARFC_RES_SERVER_STOP: the server was stopped after being shut down.

                            d.      TH_ARFC_RES_SERVER_STARTING: the server is in the starting-up phase and is not yet operational.

                            e.      TH_ARFC_RES_SERVER_INIT: the server is being initialized (before starting-up phase).

                              f.      TH_ARFC_RES_SERVER_UNKNOWN: the server is in an unknown phase (should not happen).

See also:

Trigger Resource Check for RFC Client