Hello everyone,
I've made a SUB of BUS1001006, and added a new method which are calling a FM. This FM reads materialmaster and adds salesviews for all sales orgs. I use the BAPI_MATERIAL_SAVEDATA to save the views.
I'm using the event fro BUS1001006 called ViewCreated to trigger the workflow where I call my own developed method.
But here the fun part start!
When I use MM1 and creates a material with Basis and Sales views The viewcreated event is triggered twice(2 views) this means my method is called twice 2, and when each incident of my method execute the BAPI_MATERIAL_SAVEDATA, then viewcreated is again triggered and soo on....
My big question is. How do I make sure my method is only triggered 1 time only. I know its possible setting up conditions for the event, but not sure how and which condition parameters to setup.
I really hope any got an idea of this, cause I cant seem to find my way out of this challenge.