Knowledge Center

SAR Optimize_2

Abbreviations used:
  1. SSA (Supplier Shipping Advise which are used to store goods in stock)

  2. SOA (Supplier Order Acknowledgment, which is a purchase order that has been confirmed and is a part of supplier backlog. This is to be understood as goods that are to be received in to stock in the future)

  3. SPO (Supplier Purchase Order, which is a part of supplier backlog. This is to be understood as goods that are to be received in to stock in the future)

  4. PWO (Production Work Order, which is used for manufacturing products inhouse. In this documentation PWO means each and one material in the kit structure of a PWO)

  5. COA (Customer Order Acknowledgment, which is an Customer Order that has been acknowledged by the selling company)

  6. CQU (Customer Quote)

  7. BufQty (Goods that are held as a buffer for a customer)

  8. SAR (Stock Assignment Register, which keeps the assigned links between Stock/Supplier backlog and Purchase Work Order/Customer Order acknowledgments/Customer Quote

  9. DelDate (Delivery Date. The day a Customer Order should be shipped out of the warehouse or material should be ready for a Production Work Order)

  10. KitStartDate (This is a calculated date for each material in the kit structure of a PWO. It is set equal to the date the OPR (Operation) it's linked to should start)

  11. PUR (The application used for creating SPO)

  12. ART (The archive of articles)

  13. S&D (Ship & Debit)

  14. SQU (Supplier Quote)

  15. BREF (The base Reference for calculating GM (Gross Margin) in a COA

  16. REQ (Requested Date)

  17. CONF (Confirmed Date)

  18. FIFO (First In - First Out, a principle for selling out/using the oldest stock first)

The purpose of the the SAR Optimize batch is to link PWO, COA and CQU to goods in the most optimized order. The program will try to achieve that these get links to SSA, SPO and SOA which fulfill their DelDate. The COAs and PWOs that are going to be delivered first will get the 'best' links etc. 'Best links' is understood as closer to Stock in time, -the better.
CQU will only link to goods for the quantity given in BufQty. It doesn't have a DelDate, so the program will understand it as DelDate is equal to today's date. It will only be optimized to link to goods in stock, not to supplier backlog.
SAR and linking in general
The links between PWO/COA/CQU and SSA/SOA/SPO are stored in SAR. If there is not enough goods available in stock or supplier backlog, the PWO, COA and CQU will be linked to 'Pending'. This will generate a purchase need that is visible in the PUR application.
Step 1 Recalculate DelDate
As a pre-step for optimizing SAR, the program will check whether Delivery Date in PWO is correct calculated. If it's not, it will be recalculated as KitStartDate - x days. X is a number of days set up as a margin in COM. Can be found and update in the parameter 'DeliveryAndRequestDateMarginDays' in the SETTINGS Application.
Step 2 Stock Assignment Window
This step is optional, the setting AssignmentWindowSalesLeadTimeAdder must be given a value, and at least one of the settings AssignmentWindowForSalesOrder or AssignmentWindowForProductionOrder must be turned on. The Assignment Window is defined as SalesLeadTime of article plus the margin set in AssignmentWindowSalesLeadTimeAdder.
The purpose of step two in the SAR Optimization Batch is to ensure that only sales/production order items with delivery date inside the Assignment Window are linked to stock and purchase orders. Sales/production order items with delivery date outside of the Assignment Window are linked to PENDING, and these items are marked in Stock Assignment Register to prevent Step 3 of the SAR Optimize Batch to link the order to stock or purchase order.
Step 3 Optimize links
This step runs as default for PWO and CQU, COA is optional. If it should run for COA as well, the setting CusOrderStockAssignmentByOptimizeMethod in COM has to be turned on. This documentation assume this setting is on.
Find articles that should be optimized
The requirements for an article to be optimized are:
  1. Class must be <'V' and not 'KM'. In practise this means ordinary parts/material/kits and not service or cost articles.

  2. Not reserved from the SAR optimize batch by having the value 'R' in 'Blocking' in ART.

For these articles, the program will the check whether there exists COA, PWO or CQU that are candidates for re-linking to better links.
The requirements for CQUs, COAs and PWOs to be a candidate are:
  1. Linked to SPO, SOA, PWO or PENDING. (If linked to stock they are not candidates as stock is defined as the 'best link' one can get)

  2. Have to be active. This means that status have to be >1 and <9.

  3. Production is not started for a PWO (Means status must not be 5,7 or 8)

  4. Picking process is not started

  5. The SAR links are not blocked for re-linking (locked links)

  6. SAR links are not defined as outside of the assignment window

  7. COA doesn't have a special structure

  8. CQU and COA are not linked to a non-S&D SQU in BREF. PWO is not linked to a non-S&D SQU in KITSQUID

  9. Not linked to customer owned goods and not linked to goods returned to supplier

Based on these claims the program builds a list of all articles found that are matching the criteria above. The job optimize one and one article and loops through all candidates that could get a better link. When there are no more links to optimize for this article, the program starts with the next and continues with the same procedure until there are no more articles left in the list.
This is described in  2 - Find COA's, CQU's and PWOs that are candidates for optimization.
Find COA's, CQU's and PWO's that are candidates for optimization
The program finds all COA's, CQU's and PWO's from first article in the list described in 1 - Find articles that should be optimized.
The candidates are sorted by DelDate in ascending order to ensure that the ones that should be delivered first will get the best links. As CQU's do not have a DelDate, they wil be handled first.
After sorting on DelDate, the priority sorting for optimization is as follows:
  1. CQU which is linked to 'Pending'

  2. CQU which is linked to SPO, sorted descending by REQ in SPO

  3. CQU which is linked to SOA without a CONF, sorted descending by REQ in SOA

  4. CQU which is linked to SOA with a CONF, sorted descending by CONF in SOA

  5. COA which is linked to 'Pending'

  6. COA which is linked to SPO, sorted descending by REQ in SPO

  7. PWO which is linked to 'Pending'

  8. COA which is linked to SOA without CONF, sorted descending by REQ in SOA

  9. PWO which is linked to SPO or SOA without CONF, sorted descending by REQ in SPO/SOA

  10. COA which is linked to SOA with a CONF, sorted descending by CONF in SOA

  11. PWO which is linked to SOA with a CONF, sorted descending by CONF in SOA

The program has now built a list of documents that should be optimized within one article.
Relinking
The next step is to try to relink to the 'best link' for CQU's, COA's and PWO's in the list described in 2 -  Find COA's, CQU's and PWOs that are candidates for optimization.
The preferred links for CQU are in prioritized order:
  1. SSA with free quantity, sorted ascending by Date of the SSA

  2. SSA which are linked to COA/PWO with a DelDate which is later, sorted ascending by Date of the SSA

The preferred links for PWO are in prioritized order:
  1. SSA with free quantity, sorted ascending by Date of the SSA

  2. SSA which are linked to COA/PWO with a DelDate which is later, sorted ascending by Date of the SSA

  3. SOA/PWO with CONF and free quantity, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the existing link for the PWO

  4. SOA/PWO with CONF and which is linked to COA/PWO with a later DelDate, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the existing link for the PWO.

  5. SPO with free quantity, sorted ascending by REQ. REQ on SPO must be earlier than REQ in the existing link for the PWO.

OR
  1. SOA/PWO without CONF, but with free quantity, sorted ascending by REQ. REQ in SOA/PWO must be earlier than REQ in the existing link for the PWO

  2. SPO which is linked to COA/PWO with a later DelDate, sorted ascending by REQ. REQ in SPO must be earlier than REQ in the existing link for the PWO.

OR
  • SOA/PWO without CONF, which are linked to COA/PWO with a later DelDate, sorted ascending by REQ. REQ in SOA/PWO must be earlier than REQ in the existing link for the PWO.

The preferred links for COA  are in prioritized order
  1. SSA with free quantity, sorted ascending by Date of the SSA

  2. SSA which are linked to COA/PWO with a DelDate which is later, sorted ascending by Date of the SSA

  3. SOA/PWO with CONF and free quantity, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the existing link for the COA

  4. SOA/PWO with CONF and which is linked to COA/PWO with a later DelDate, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the existing link for the COA.

  5. SOA/PWO without CONF, but with free quantity, sorted ascending by REQ. REQ in SOA/PWO document must be earlier than REQ in the existing link for the COA.

  6. SOA/PWO without CONF which are linked to COA/PWO with a later DelDate, sorted ascending by REQ. REQ in SOA/PWO must be earlier than REQ in the existing link for the COA.

  7. SPO with free quantity, sorted ascending by REQ. REQ in SPO must be earlier than REQ in the existing link for the COA

  8. SPO which is linked to COA/PWO with a later DelDate, sorting ascending by REQ. REQ in SPO must be earlier than REQ in the existing link for the COA.

If the SSA/SPO/SOA/PWO that is found has enough free quantity, the CQU/COA/PWO will be delinked from its current SAR link and relinked to the new.
If the SSA/SPO/SOA/PWO that is found has not enough free quantity, the optimize program will first delink existing links for COA/PWO to increase free quantity. Then the CQU/COA/PWO will be delinked from its current SAR link and relinked to the new.
If the existing link is for a PWO with CONF, or a COA with CONF and the setting CusOrderReassignedByOptimizeJobIfConfIsFulfilled is turned "ON", the batch will only delink it if it can find enough free qty to fulfill the need of the PWO/COA in prioritized order:
  1. SSA, sorted ascending by Date

  2. SOA/PWO with CONF that is earlier than CONF at the mainlevel of the PWO/COA, sorted ascending by CONF

Otherwise the COA/PWO which was delinked to increase free quantity in the SSA/SOA/SPO/PWO document will be linked to PENDING and added to the list described in 2 -Find COA's, CQU's and PWOs that are candidates for optimization.
This COA/PWO will now be handled during a later iteration of the relinking process described in 3 - Relinking.
If an article is set up with PackQty or SubQty, the optimize batch will only relink COA/CQU to quantity that is multiple with SubQty, -or with PackQty if SubQty is blank. This rule does not apply for PWO.
Step 4 Optimize Stock according to FIFO principle
This step runs as default for PWO, COA is optional. If it should run for COA as well, the setting CusOrderStockAssignmentByFIFOMethod in COM has to be turned on. This documentation assume this setting is on.
The purpose of this step is to ensure that the oldest stock is used or shipped out first.
Find articles that should be optimized
The first thing the FIFO step does is to find which articles that are candidates for being relinked.
The requirements for an article to be relinked are:
  1. Article is to be found in SSA with free quantity

    or

  2. Article is to be found in SSA which is linked to PWO/COA

    and

  3. Picking process has not yet started.

  4. LinkLock is not set in SAR.

  5. The stock is not of type special structure

  6. Stock is not reserved for a specific customer

  7. Stock is not returned to supplier for repair

  8. Delivery date is not outside of the Assignment Window

  9. The article is not excluded from automatic relinking

Find Stock that should be optimized  
When all articles that should be optimized in this step in found, the program work with one and one article a time an build a list the SSAs that can be optimized.
The SSAs are sorted descending by Date. Means that the oldest stock is handled first.  
ReLinking
The PWO or COA with the earliest DelDate should link to the oldest goods first. The relinking starts with the first SSA in the list described in 2 - Find SSAs that should be optimized. The program searches for PWO/COA that are linked to other SSA with a newer Date.
The PWO/COAs that are found are sorted ascending by DelDate and are handled one by one. If any of them have an earlier DelDate than the PWO/COA that is already linked to the SSA that is handled, the program delink this and link a COA/PWO with an earlier DelDate to the SSA. The COA/PWO that got delinked will then be added to the list of COA/PWO that will be handled in the Next iteration according to it's DelDate.
If an article is set up with PackQty or SubQty, the FIFO step will only relink COA to quantity that is multiple with SubQty, -or with PackQty if SubQty is blank. This rule does not apply for PWO.
Summary
PWO and COA which are relinked by the FIFO step will still have link to goods in stock, but the link might be changed to a different SSA.