Move material from one operation to another? DMT? Other?


(Adam Szymanski) #1

I have a material (shipping box) assigned to the shipping operation. We want to remove the shipping operation, but first need to move the material to another operation. Are there any DMTs that can move the material from one operation to another? (ideally, moving to the previous operation via OprSeq for each part).


(Greg Payne) #2

There are not DMT’s that can do that, but you could dmt the data from the shipping operation into a UD and then use abl to find the previous operation and change the material’s related operation. Or you can skip the dmt and do the routine on the UD update.

Something like below should do it. This has NOT been run or tested.

Greg

/* reset related op */

def var PrevOp as Integer init 0.

For each ttUD15 where (ttUD15.rowmod = ‘A’ or ttUD15.rowmod = ‘U’) and ttUD15.Company = cur-comp.

For each PartOpr where PartOpr.Company = cur-comp by Partopr.PartNum by PartOpr.RevisionNum by PartOpr.OprSeq .

                            PrevOp = PartOpr.OprSeq.


                                            If PartOpr.OpCode <> "Shipping"  Then                 next.

                                                For Each PartMtl where Partmtl.Company=PartOpr.Company and PartMtl.RelatedOperation = PartOpr.OprSeq.

                                                            PartMtl.RelatedOperation = PrevOp.

                                                End.

                           End.

End.


(Adam Szymanski) #3

Thank you. What I ended up doing is creating a Bill of Materials DMT (additionally adding the RelatedOperation). Then, I created a BAQ with all my problem parts and subtracted 10 from the existing OprSeq to make a new RelatedOperation.

This DMT moved all the materials to the previous operation.


(Epicor!!) #5

What was the DMT for this do you still have the query ?


(Epicor!!) #6

What was the DMT for this do you still have the query ?


(Adam Szymanski) #7

I’m sorry, but I do not have this anymore. I created the DMT using the template builder for the Bill of Materials and just checked “RelatedOperation” in the template builder.

For the BAQ, I simply created one with the parts and OprSeq. In Excel I subtracted 10 from the OprSeq and used that data to paste into my DMT template.