Hi
I have production orders with different status in process. If the raw material has been booked to order the first step shows as 10 RM. This is the same in every order.
Whenever the table shows Operation 10 RM with quantity I want to always show the Loc beginning with KB with the quantity from the position 10 RM. The KB position varies, it can be at position 20 or 30 in the order.
What I have:
order | Operation | Loc | Quantity |
55 | 10 | RM | 3700 |
55 | 20 | WW14 | |
55 | 30 | KB14 | |
55 | 40 | PA | |
55 | 50 | QQ | |
55 | 60 | MP | |
55 | 70 | SP | |
76 | 10 | RM | 3100 |
76 | 20 | KB16 | |
76 | 30 | PA | |
76 | 40 | QQ | |
76 | 50 | MP | |
76 | 60 | SP | |
89 | 10 | RM | 500 |
89 | 20 | KB18 | |
89 | 30 | PA | |
89 | 40 | QQ | |
89 | 50 | MP | |
89 | 60 | SP | |
What I need is in colum NextLoc and NextQuantity:
order | Operation | Loc | Quantity | NextLoc | NextQuantity |
55 | 10 | RM | 3700 | | |
55 | 20 | WW14 | | | |
55 | 30 | KB14 | | KB14 | 3700 |
55 | 40 | PA | | | |
55 | 50 | QQ | | | |
55 | 60 | MP | | | |
55 | 70 | SP | | | |
76 | 10 | RM | 3100 | | |
76 | 20 | KB16 | | KB16 | 3100 |
76 | 30 | PA | | | |
76 | 40 | QQ | | | |
76 | 50 | MP | | | |
76 | 60 | SP | | | |
89 | 10 | RM | 500 | | |
89 | 20 | KB18 | | KB18 | 500 |
89 | 30 | PA | | | |
89 | 40 | QQ | | | |
89 | 50 | MP | | | |
89 | 60 | SP | | | |
My script:
Temp_00:
LOAD rowNo() as OP,* INLINE [
order,Operation,Loc, Quantity
55,10,RM,3700
55,20,WW14
55,30,KB14
55,40,PA
55,50,QQ
55,60,MP
55,70,SP
76,10,RM,3100
76,20,KB16
76,30,PA
76,40,QQ
76,50,MP
76,60,SP
89,10,RM,500
89,20,KB18
89,30,PA
89,40,QQ
89,50,MP,
89,60,SP
];
Thank you for your help.
Best regards,
Joanna