We are having two datamart one is GDM and other is IDM.
Now what to do:
1)Establish a unique royalty_transaction_id in GDM.this should be assigned to every single sales record when inserted in Global_sales_table.
2)Established a reversed royalty transaction id in GDm.This should be assigned to reversed sales transaction and it should point to the trasaction id of the original sales transaction.
3)Estalish a sales transaction id in GDM .The same sales transaction id should be assigned to the original sales transaction,to all the revrsed sales transaction and all the reporocessed sales transaction to group them all under one sales transaction id.
4)The royalty transaction id,reversed royalty transaction id ,sales record key should be passed fro GDM to IDM.