Using parallel processing in AFS Allocation Run to improve performance


Global companies will have a limited time frame to allocate their requirements as there would be several weeks or months between the sales orders and goods delivery.So , SAP AFS has provided Allocation run (ARun) functionality to accurately deliver goods and  to distributes available stocks to sales orders based upon delivery dates and customer priority.

But as the allocation run runtime has become longer and longer due to its wide range of features ,the processing extremely large datasets in the allocation became more and more problematic due to the existing technology.
Due to this issue, the parallel processing technology has been integrated in the AFS ARun. In this Parallel processing  the existing worklist is divided into several data packages which are processed in parallel to each other in predefined work processes there by decreasing the allocation runtime and  avoiding charge backs from the customers.

Overview :

The parallel ARun is executed in the background.

T.code – J4AE


Parallel ARun


The configuration center for the parallel ARun is primarily within the access rule of the relevant ARun category.
To maintain the access rule, navigate as follows IMG -> AFS Allocation Run -> Arun Detail -> selection -> define access rule

Access rule



Material index

The following is a summary and explanation of the individual parameters and their use and effects.

  • Access rule – Access rules S001, S002, S003 are ARUN standard deliveries.However, they can be copied and used by the customer without any problems.
  • Description – Text description of the access rule
  • Programs – The selection programs J_3AARS1/2/3 control the selection screens for online/dialog allocations and are therefore irrelevant for parallel ARuns and the background ARun (J_3AARN7).
  • Variant – Selection variant for superimposing selection parameters automatically. Use only for dialog/online allocations.
  • Name of selection view – This is used only for parallel run and background processing ( J_3AARN7).This will control the respective field selection or the available selection fields for creating or changing a selection set.
  • Function module selection – In general, the system provides three function modules with different accesses for the selection for open customer requirements:
  1. Material Index Selection – /AFS/ARUN_SEL_REQU_SEL_VIA_MAT
  2. Partner Index Selection –  /AFS/ARUN_SEL_REQU_SEL_VIA_PAR
  3. Direct Index Selection –   /AFS/ARUN_SEL_REQU_SEL_VIA_DIR
  • Function module preselection – The function module that are assigned here  serves exclusively for the preselection of requirements and is therefore relevant only for parallel processing.By default, three function modules with different access logics are provided.

Optimization using Parallel ARun:

The optimization can be achieved by using the appropriate access rule with the required selection criteria as below.

  1. For material index access , the selection criteria such as material numbers or number range , sales document type,season inclusion should be filled.
  2. For direct index access, the selection criteria such as sales documents or number range,sales document type,material number range ,season inclusion should be filled.
  3. The minimal delivery date range for the delivery dates in the future receipt segment should be maintained.This will help in reducing the processing time.
  4. It is recommended to maintain the selection parameters as per the hierarchy in the VAPMA (sales order index) table, that has sales area, document type at the higher hierarchy level as this will reduce the run time.
  5. Using of more inclusions instead of exclusions in the selection criteria will also optimize the allocation process.
  6. Selection criteria such as delivery status indicator,customer group1 shouldn’t be used as this will increase the run time .

The percentage of optimization may vary based on number of requirements being processed and processing servers running at the time of parallel ARun.

Restrictions :

  • Parallel ARun cannot perform dynamic credit checks.
  • The statistical information that is generated for the standard ARun  will not be obtained from the  parallel ARun.
  • Parallel ARun cannot handle value-added services, that require additional physical VAS materials (such as hangers, special labels and so on) as they are separate stock that cannot be allocated together in parallel.