Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

SAP xApp Manufacturing Integration and Intelligence (SAP xMII) Business Logic Services includes its own scheduling service that allows you to execute transactions on different schedules.

  • The Schedule Editor is used to set up all scheduled jobs.
  • The Scheduler is used to view a schedule summary.

Schedulers can be used to perform the functions as defined by SAP but we can also use it to have a variety of other things.

Like when me and my teammate Rupesh were discussing about an MES simulation for a training demo, we were struck with the brilliant idea(;-)) of using scheduler to update the SQL table and display the values in LED. Now the LEDs(of the Grid) will be updated from a SQL table which is updated by a transaction.

What did we do?

  • We created a table called stage_info using MySQL for simulating the stage activities. It has two columns:
  •      o LineID(alphanumeric)
  •      o Stage_ID (alphanumeric)
  •      o Stage_status(boolean)

 

  • Another table line_info is created for holding the flag that whether the transaction is to be executed or not.
  • o Line_id(alphanemric)
  • o RunFlag(Boolean)

Here for the sake of simplicity, I'm using a Boolean value for stage_status(1 for in use and 0 for idle).

  • We created a transaction which fulfils the following functionality.
  • o First it will check the status of the flag for current line. If it is true then it will execute the rest of the transaction otherwise it will exit it.
  • o reads the sql table and check the status of each stage and change the status of next stage and current stage.
  • Then a scheduler is set to run for specific time interval and the transaction for this scheduler is set to the transaction that we created earlier.
  • We created a columnlights grid with source as the field of the stage_status of stage_info table. Here we set the color context as
  • o 1-Green
  • o 0-Magenta

The refresh rate of the grid was set to 15 seconds.

 

What did we achieve

 

We achieved a grid which was somewhat like this.

LED

 

The grid automatically changes according to the values in the SQL table. And yippie... we did simulated MES.

This is just a tweak that one can use to simulate some time bound action. I hope this also gives readers the idea to get the things done using schedulers. This is just for prototypes and shoudl not be used on real production environments.