Show TOC

Background documentationDetailed Check Locate this document in the navigation structure

 

This check can be done in the Dispatcher or in the work process: If the local application server is to be checked, this is done in the work process; if a different server is to be checked, it is done in the Dispatcher of the server to be checked. This means that a free dialog work process is not needed to process the request. The caller’s time is thus not wasted, as the caller does not have to wait for a free work process.

Process

The procedure is as follows:

  1. The number of maximum available resources is determined: Number of dialog work processes (dia_wps) – number of dialog work processes that are to remain 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 at all.

    If resource identification is not active (not allowed), the return value = 2 and the reason = TH_ARFC_RES_NOT_ACTIVATED.

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

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

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

    3. 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. Check the communication channels: If there are still sufficient entries in the communication table (display in SM51   Goto   Server   Information   Comm.Table  )

    1. 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 quota is 0, the reason = TH_ARFC_RES_LOW_MAX_COMM_ENTRIES, and the return value 2 (NEVER_GET_RESOURCES) is set.

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

    3. 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.

    4. Otherwise, the resources are calculated afresh (and may be reduced).

      new_resources = min(quota – count, resources) and reason = TH_ARFC_RES_OK, and return value 0 is set.

  5. Check the occupied work processes: Is the user already occupying too many work processes? (display in SM50)

    1. 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) is set.

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

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

    4. Otherwise, the resources are calculated afresh (and may be reduced).

      new_resources = min(quota – count, resources) and reason = TH_ARFC_RES_OK, and return value 0 is set.

  6. Check the Dispatcher queue (dialog queue of Dispatcher)

    Since each RFC is connected to an entry in the dialog queue, the system checks whether there is sufficient space in the dialog queue for new entries. (Display in SM51   Goto   Server Information   Information   Queue Info  , profile parameter rdisp/elem_per_queue, default=2000). The latest queue information is then read.

    1. 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

    2. 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) is set.

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

  7. Logons

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

    1. 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) is set.

      count = number of logons

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

    3. Otherwise, the resources are calculated afresh (and may be reduced).

      new_resources = min(quota – count, resources) and reason = TH_ARFC_RES_OK, and return value=0 is set.

  8. Own logons

    Sinces 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.

    1. 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) is set.

      count = number of logons

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

      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 Active. If the server has a different status, no resources are returned and the reason is set accordingly.

    For more information: SAP Application Server States

    • 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).

    • TH_ARFC_RES_SERVER_SHUTDOWN, the server is shutting down

    • TH_ARFC_RES_SERVER_STOP: the server was stopped (after being shut down)

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

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

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