Supersession macro examples
This topic describes the examples for the supersession macro commands.
Example 1: Standard item supersession with base code list elements
Predecessor Item | Successor Item | Location | Change over Date | Factor |
---|---|---|---|---|
Generic-A | UK-A | Birmingham | 2013-01-01 | 1 |
Generic-A | UK-A | London | 2013-01-01 | 1 |
Generic-A | NL-A | Barneveld | 2013-01-21 | 1 |
Generic-A | NL-A | Capelle | 2013-01-21 | 1 |
Generic-A | BEL-A | Brussels | 2013-01-11 | 1 |
Generic-A | BEL-A | Gent | 2013-01-11 | 1 |
BEL-A | BN-A | Brussels | 2014-01-01 | 1 |
BEL-A | BN-A | Gent | 2014-01-01 | 1 |
NL-A | BN-A | Barneveld | 2014-01-01 | 1 |
NL-A | BN-A | Capelle | 2014-01-01 | 1 |
UK-A | UK-A1 | Birmingham | 2014-01-01 | 0.6 |
UK-A | UK-A2 | Birmingham | 2014-01-01 | 0.4 |
UK-A | UK-A1 | London | 2014-01-01 | 1 |
UK-A | UK-A2 | London | 2014-01-01 | 0.5 |
In this example:
- Value of 100 for FDMD exists at Item Generic-A at Birmingham
100 is copied to FCOPYDMD for Item UK-A at Birmingham
- Value of 100 for FDMD exists at Item UK-A at Birmingham
60 is copied to FCOPYDMD for Item UK-A1 at Birmingham
40 is copied to FCOPYDMD for Item UK-A2 at Birmingham
- Value of 60 for FDMD exists at Item UK-A1 at Birmingham
No Transfer required (no successor items)
- Value of 40 for FDMD exists at Item UK-A2 at Birmingham
No Transfer required (no successor items)
- Value of 200 for FDMD exists at Item Generic-A at London
200 is copied to FCOPYDMD for Item UK-A at London
- Value of 200 for FDMD exists at Item UK-A at London
200 is copied to FCOPYDMD for Item UK-A1 at London
100 is copied to FCOPYDMD for Item UK-A2 at London
Example 2: Using Aggregate Locations
Perform supersession for the definitions in supersession list, applying changeover date to FINTRO for successors and FDISCON for predecessors for base-level items under [Brand A] and locations under [EMEA]; copying "HDMD" from base-level predecessor items under [Brand A] to "HCOPYDMD" of base-level successor items under [Brand A] at specified locations under [EMEA]. Only item@locations which are valid combinations will have their values and Introduction and discontinuation date copied.
Supersession("Supersession list", "Predecesssor Item", "Successor Item", "Location",
"Changeover Date", "Factor", "FINTRO", "FDISCON", "HDMD", "HCOPYDMD","Brand A","EMEA")
Location hierarchy contains EMEA with UK aggregate location with London and Birmingham as its children.
Item | Location | Value |
---|---|---|
Generic-A | Birmingham | 100 |
Generic-A | London | 200 |
UK-A | Mexico | 500 |
Predecessor Item | Successor Item | Location | Change over Date | Factor | Result |
---|---|---|---|---|---|
Generic-A | UK-A | UK | 2013-01-01 | 1 | 100 is copied to Item UK-A Birmingham 200 is copied to Item UK-A at London |
UK-A | UK-A1 | UK | 2014-01-01 | 0.6 | 60 is copied to Item UK-A1 at Birmingham 120 is copied to Item UK-A1 at London |
UK-A | UK-A1 | London | 2014-01-01 | 1 | 100 is copied to Item UK-A1 at London (previous supersession copy of 40 is overwritten) |
UK-A | UK-A2 | UK | 2014-01-01 | 1 | 100 is copied to Item UK-A2 at Birmingham 200 is copied to Item UK-A2 at London |
UK-A | UK-A2 | Mexico | 2014-01-01 | 0.5 | This supersession definition is ignored as the location is not part of the EMEA branch of the hierarchy. |
Example 3: Using Predecessor and Successor Locations
Predecessor Item | Successor Item | Predecessor Location | Successor Location | Change over Date | Factor |
---|---|---|---|---|---|
Generic-A | UK-A | Birmingham-A | Birmingham-B | 2013-01-01 | 1 |
Generic-A | UK-A | London | London | 2013-01-01 | 1 |
Generic-A | NL-A | Barneveld | Barneveld | 2013-01-21 | 1 |
Generic-A | NL-A | Capelle | Capelle | 2013-01-21 | 1 |
Generic-A | BEL-A | Brussels | Brussels | 2013-01-11 | 1 |
Generic-A | BEL-A | Gent | Gent | 2013-01-11 | 1 |
BEL-A | BN-A | Brussels | Brussels | 2014-01-01 | 1 |
BEL-A | BN-A | Gent | Gent | 2014-01-01 | 1 |
NL-A | BN-A | Barneveld | Barneveld | 2014-01-01 | 1 |
NL-A | BN-A | Capelle | Barneveld | 2014-01-01 | 1 |
UK-A | UK-A1 | Birmingham-B | Birmingham-C | 2014-01-01 | 0.6 |
UK-A | UK-A2 | Birmingham-B | Birmingham-C | 2014-01-01 | 0.4 |
UK-A | UK-A1 | London | London | 2014-01-01 | 1 |
UK-A | UK-A2 | London | London | 2014-01-01 | 0.5 |
In this example:
- Value of 100 for FDMD exists at Item Generic-A at Birmingham-A
100 is copied to FCOPYDMD for Item UK-A at Birmingham-B
- Value of 100 for FDMD exists at Item UK-A at Birmingham-B
60 is copied to FCOPYDMD for Item UK-A1 at Birmingham-C
40 is copied to FCOPYDMD for Item UK-A2 at Birmingham-C
- Value of 60 for FDMD exists at Item UK-A1 at Birmingham
No Transfer required (no successor items)
- Value of 40 for FDMD exists at Item UK-A2 at Birmingham
No Transfer required (no successor items)
- Value of 200 for FDMD exists at Item Generic-A at London
200 is copied to FCOPYDMD for Item UK-A at London
- Value of 200 for FDMD exists at Item UK-A at London
200 is copied to FCOPYDMD for Item UK-A1 at London
100 is copied to FCOPYDMD for Item UK-A2 at London
Example 4: Supersession for multiple predecessors mapped to a single successor
Predecessor Item | Predecessor Location | Successor Item | Successor Location | Change over Date | Factor |
---|---|---|---|---|---|
Generic-A | London | UK-A | Birmingham | 2013-01-01 | 1 |
Generic-B | London | UK-A | Birmingham | 2013-03-01 | 1 |
BEL-A | Capelle | NL-A | Barneveld | 2013-01-21 | 1 |
BEL-B | Barneveld | NL-A | Barneveld | 2013-01-21 | 0.5 |
In this example:
- Value of 100 for FDMD exists at Item Generic-A at London.
Value of 100 for FDMD exists at Item Generic-B at London.
The value 100 for Generic-A at London is copied to FCOPYDMD for Item UK-A at Birmingham.
The value 100 for Generic-B at London is added to FCOPYDMD for Item UK-A at Birmingham resulting in 200 for Item UK-A at Birmingham.
- Value of 100 for FDMD exists at BEL-A at Capelle.
Value of 100 for FDMD exists at BEL-B at Barneveld.
The value 100 for BEL-B at Barneveld is copied to FCOPYDMD for NL-A at Barneveld.
A factor of 0.5 of the value 100 for BEL-B at Barneveld is calculated, resulting in a value of 50 added to FCOPYDMD at NL-A at Barneveld.
This results to a total of 150 added for the Item NL-A at Barneveld.