cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Notification

former_member329434
Participant
0 Kudos

Hi Friends,

I have a requirement to create notification from a database source when ever any of production unit gets "0". Could  able to do this with a query and map the same in MII using a BAPI and able to post successfully at the backend.

Requirement demands to check the data source for every 10 seconds for a notification and run the transaction with a scheduler.

for ex; if  unit10 becomes zero on an specfic day.. the entry will keep on updating until the unit becomes operational......

I want to know how to put a logical break to terminate the transaction to trigger only once when a unit gets tripped. After unit gets tripped, only one notification has to be created at the backend and relevant notification number has to be taken back and update back in the database server.

once unit gets into operational, I have to update ECC again using the timestamp from the query  by using the same notification number for closing the notification.

clarifications:

1) If  I schedule transaction every second ,how  should I restrict the transaction to trigger only once .( normally, if we schedule in this particular scenario, I will end up with continous notification at the backend.)

2) Datasource doesn't have the option of flags to control..

3) As long as scheduler runs, transaction will query the datasource every second  and updates ECC.

4) Some times unit may comes into operational after two or three days, till that time i have to check at every second for a value and update.

Can anyone guide me on this..

Regards,

Suman

View Entire Topic
former_member211944
Active Participant
0 Kudos

Hi Suman,

Best way would be using PCo as kind of middle layer to the data source and then configuring this eventing you need in the PCo.

PCo has this notification functionality where you can send messages to MII transaction and then have this logic to send the data to ECC in this MII transaction.

Do you have PCo?

If not then you could use this approach:

Basically you have keep a flag which stores whether the notification is already sent or not.

You can use MDO for this.

Create a persistent MDO and store this flag in this MDO.

When you query the datasource and get the value which shows that the unit is unoperational, then check the flag in the MDO(using MDO query) whether the notification is already sent to ECC or not and then only decide whether to sent the notification to ECC.

When you get the correct value for the unit then update the flag in the MDO(using MDO Query) to false so that the next time value is 0 , the notification is sent to ECC.

Clarifications:

1)  Using this MDO approach you could set the flag so that the message is sent only once.

2)  I am not sure whether data sources have control flag. But using PCo would solve this problem.

3)  Though the scheduler will run everytime but this MDO flag approach would not sent notification to ECC each and every time.

4) Yes, if you use this MII pull approach then you would have to query the data source each and every time.

     that is why using PCo would be good solution as then it would be a push from PCo side.

Regards,

Rohit Negi.