Wrong score calculated for Quantity Reliability.
When calculating a vendor's score for quantity reliability, a score is calculated for each Goods Receipt, and saved in table S013. The scores for quantity reliability are filled in PWMT1 and PWMT2.
PWMT1: score for quantity reliability for current period
PWMT2: score for quantity reliability cumulated & smoothed from all periods.
The score for quantity reliability is calculated when the total quantity is delivered, or the end delivery indicator has been set.
First the percentage is calculated, as follows:
F1 = Total received quantity - PO quantity
Quantity deviation percentage = F1 / PO quantity * 100.
In order to determine a score for the sub-criteria Quantity Deviation, the system checks customizing table T147K to find the score that you have assigned for the calculated percentage. The score will be assigned and smoothed in S013.
The period to be updated is based on the Goods Receipt entry date, or "today's date".
If you look in transaction MC26 for S013 xmcekpo, then 2x click on PWMT, xmcekko-sydat(today's date) is defined in the rules for updating.
This defines which period should be updated.
XMCEKKO-SYDAT is set from SY-DATLO(today's date) during PO update or GR posting.
XMCEKKO-SYDAT is set from EKBE-CPUDT(GR entry date) during GR posting
when running setup.
XMCEKKO-SYDAT is set from EKPO-BEDAT(PO creation date) during po update.
PWMT* will be calculated when the item is considered closed.
The item will be considered closed when:
- total quantity has been received or
- delivery complete indicator has been set or
- deletion indicator has been set.
The period that will be updated in S013 depends upon what process you are performing.
For example, if an item has only partially been received, and no delivery complete indicator set, the item is not considered closed. If you then set the delivery complete indicator via ME22N, S013-PWMT* will be updated in the period based on the date of change to the PO, and not the GR entry date.
When running set up(OLI3), S013-PWMT* will be updated based on:
- EKBE-CPUDT: when the item is closed at time of GR.
- EKBE-BEDAT: when the item is closed via PO update.
This could explain why you might see a difference in period updating between the active version of S013 and the new version after running setup.
Unless the item was closed at time of Gr, the updating will be done based on EKET-BEDAT(PO creation date). Since we don't know the date in which ekpo-elikz was set via me22n, EKET-BEDAT is used for updating s013.
If there is already an entry in S013-PWMT1 for the same period, this value is included in the calculation, along with the smoothing factor defined in customizing for quantity deviation. The following formula is used for the calculation, in this case that a value already exists in S013-PWMT1:
s013-pwmt1 = s013-pwmt1 +
t147-mgabw * ( pwmt - s013-pwmt1 ).
S013-PWMT1 = already existing score for the current period
T147-MGABW = smoothing factor
The system then selects the previous entry from S013 for the calculation of PWMT2. Again, this is a cumulative value, so we select from the period previous to the one we are updating.
The following formula is used for PWMT2:
PWMT2 = PWMT2 from previous period +
smoothing factor * (PWMT1 - PWMT2 from previous period)
If there exists a value in S013-PWMT2, there is no need to check the last period. It is already included in S013-PWMT2. In this case, the following formula will be used:
s013-pwmt2 = s013-pwmt2 +
t147-mgabw * ( pwmt - s013-pwmt2 ).
If you try to run OLI3 for a new version, you have to remember that PWMT2 is a cumulative value. Therefore, if you have no last record, PWMT2 will be filled from PWMT1.