PCID Table Setting Query


In Epicor, When we generate the PCID in MES it will generate the ID at that movement and before I click on OK in MES, I am checking relevant table like erp.pkgcontrolheader its add the record in this. But some time, record comes in erp.pkgcontrolitem and some time not. Didnt got why its behaving.

Another issue when I click Ok in MES and record will remove from erp.pkgcontrolheader and it will move to another 2 table like PkgControlStageItem and pkgcontrolStageHeader and it will delete from pkgcontrolheader .
I am not understanding how this is working.
Can you let me know under what circumstance its removing and adding rows as per MES Transaction.

Thank you.