cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello everyone,

 

I am currently building a project that includes the Product Event API, which is triggered when a product is created. I would now like to distinguish between products that were created by a user and products that were created through data migration. Is there a way to differentiate between these two scenarios?
 
Thank you!
0 Likes
View Entire Topic
rammel_sapdev
Participant

Hmm, this will a bit tricky, maybe you can try to check the call stack? Or will there be a specific user ID used during the migration? One more thing is maybe you can have a global flag which you can activate/deactivate. "Active" means data migration is in progress, assuming that you are only doing the data migration during the initial stage of the project and you don't foresee anyone touching the system or maintaining the products using the fiori apps. 

One more thing is to try to compare the data created through data migration and through normal fiori app, see if you notice any field that is different which you can use to differentiate. But again, SAP could change these things anytime so it might not be very safe unless it is well documented. Same thing for the call stack, SAP might change them (i.e., the calling objects) so it might not be future proof. So I guess your cleanest options would be either to check the user ID or having the global flag.