SAP, the final piece.

June 17, 2010

I got my eye on SAP now. This will be the final piece in the puzzle of information mashing in EALIS.

With Eclipse, I manage to understand their data structure in one day. It was straight forward, even for a person who never use their software it was clear what each table do, the tables are named with their description in mind, you want to know the equipment table, there’s a table with the name equipments in it, the same goes with document. And then the relation between tables is clear. With SAP this was not the case.

My first surprise came when I first logged to the database, see the standard DB on MSSQL, look for the odd one out and expands it, . . . . . quite some time, . . . 1 minute passed, 2 min, Only after the 5 minutes mark all the tables are loaded. When I worked with Comos there were like 30 tables, only like 8 are used often, ECLISPE like 50, with most of them being blank [feature that we didn't use] only like 4 that are used in my code. But with SAP I’ve lost count, by the looked of the tiny size of the scroll bar I knew that there is no point in even counting the number of tables. It took forever to scroll with the down arrow key, then switched with page down, as I moved though the tables I noticed that the name of the table is in code, most of them are like 5 characters long [even with 5 char table name , they manage to fit thousands of tables]. Blows.

The one good thing about SAP compared to Comos, PI and Eclipse is that it was SAP. So looking for help online was a breeze, you just need to use the right keyword. Help will even come from SAP themselves through forums and wikis, millions of them. My first query was one SAP table numbers, . .  the answer starting from 2000 and up, damn. Then the second query is on Function Location, as this is the key field that’ll be connecting Equipment Tag on Ealis with SAP. Single query I get what I wanted, IFLOT. Do a query on the table, and managed to see something familiar, an equipment tag [KKS]. Nice. But no desc, looked at the table list and queried tables with similar names, and managed to get the description from IFLOTX. Then realised about IFLOS. Noticed the different method of Function Location implementation among our power plant.

I don’t use SAP that often, once a year we do our Performance Review on SAP, and every now and then I need to release a PR. So making a sense of the table structure was a challenge for me. Just like the table name, the column names are in 5 letter codes. So even if I comes across a meaningful data I wouldn’t know. But my aim was simple to get detail on work order and maintenance plan on each equipment. I managed to get the stuff I wanted and wrote a simple code within 2 days.

Even with a working code I’m still not sure whether I got the right data on. Noticed different way of using SAP affect data on the Database, one of the plan actually tie work to a Function location instead of the equipment that is parked below it. Then one of the biggest request was to get to get long text, from the work item. Checked online, no easy solution, data is in database but not in text, it’s in some code only SAP kernel understand. Most of the advice points to ABAP programmer. Not an option.

A view of EALIS

June 17, 2010

I think I’ve never post the actual view of EALIS.  I’m not the best designer nor the best programmer.But I make good use of what ever available to me. Most of the stuff here were written in asp by using notepad, my method of debugging is execute the code from a browser. Getting good at it. But not so much on the design part, then again with notepad + paint + Gimp [paint don't have transparency ].

Anyway here goes,

A view of the search result page

This is a view from the search result. Right beneath the description user can directly view their permit status and PI reading.

A view of equipment detail

Clicking on any of the equipment from the result page will lead to this, a front end to all equipment. With using the equipment tag as a reference, and another key value is the plant code, data from three other system are captured within a single page, ECLIPSE [Permit], PI [Operation data] and Sap [Work order, maintenance Plan]. While most of the static data, [documents, equipment spec, interactive drawings] comes from EALIS itself.

The PI gauge’s are context sensitive, but the generic one is that needle gauge above. No I don’t use Pi Webpart for it, the current version that we have [just got it] was created for engineer hence the simplistic look. On top of that the whole EALIS needs to be on Sharepoint to make that happen, not a chance.

Believe or not, the gauge above was drawn completely with notepad, as most of the other SVG stuff I’ve written. Found out that using editing software like Inkscape, you’ll lose control of the xml structure and Inkscape is very slow on my system. The gauge update itself every half a minute [most equipment, are scanned by PI around 10s]. The value above is zero because unit 10 is down.

EALIS-ECLIPSE[Permit System] Link

June 17, 2010

One of plant is down for maintenance. Minor outage for Unit 1 of Tanjung Bin. So I decided to have a look at the Ealis-Eclipse link on any of the system from unit one. Decided to have a go at one of the major system, the Steam and Condensate flow of the Unit. To my surprise the thing is still working.

But upon running the link function saw 20% of the equipment from the drawing lit’s up [indication of equipment is under permit]. While it works it was hard to make sense of all the data, a thought comes to mind, I need to relate each isolation point to the actual target equipment. Decided to draw a line between the two object.

Fired up my trusty notepad and starts to edit the asp code that list all of the equipment under permit in relation to any system. Tried to the the minimal amount of coding to achieve this, managed to get it done and then edit the javascript side. Been quite some time I worked with javascript to handle svg element. Completely forgot how to even define a node Path. A quick refresher from Google, then managed to wrote something decent on the JS side.

The first try was not successful, only some item lits up, the relation line is not there. Something wrong with JS, I’ve defined  an array in a wrong manner. Test again still no line. After putting some thoughts, realised that I need to have the permit-system xml from the asp code to be sorted in such a way that Permit Equipment appear first. Back to the asp code, add an extra line on the query, check the xml output, seems OK. Fire the link function again, this time line loads but it’s not having the right path. Check javascript again, realised I used the wrong coordinate point, fix that one up.

Try Again, . . . . success. Below is the fruits of my labor.

It seems to be working like how I envisioned it. But the problem is with system that has a lot of Permit tied to equipments in it, the whole thing looked messed up, real bad. So bad that the relation lines end up covering the actual drawing. That is for such system, but the one showed in the picture above is almost like what I had in mind. One can quickly know which equipment is being worked on.

Achievement Like System in The Office.

June 16, 2010

I do play video games, one of the things that the current video game world right is achievements. Most of the current game console has this support or some kind, there’s even an open platform for it running on the iOS landscape. But the company with the best implementation is Microsoft. Their Xbox Live platform is second to none.

So back to the post, can we do something like that in the office. You got your list of software/system [the games] runing. This can be part of an employee KPI. Set of software to be Achievable can be listed, you got your office productivity suite [since this runs locally, tad harder to centralize their usage], then the email/exchange, document management, SAP [what software type is SAP], any web services, even phone [not the personal one].

Then to each of them we can set achievements; already have a thought about it;

Mail

  1. The usual first send, first received,
  2. Then the important ones, response time, total number,  total attachment.
  3. Then the interesting stuff, received personal mail from CEO, sends mail past midnight,
  4. And the troubling item, time lapsed between login, highest pending email.

And then just like in videogames, you put funny description to it. Something funny yet indicating something significant. The idea is to encourage the use of said software, esp something that is freshly rolled out. Aside from using the software itself, the achievement can also be a driving factor for any user to explore the software, hence learn more. This is where a little creativity will helps a lot.

Aside from that this will also deter user from doing stuff that they should not be doing. Like sending a lot of personal main thriugh the company account. Because they know their action is being monitored at all time. You can’t expect to received the ‘I’ve Sent the 1,000,000th Email’ Achievement without raising some flags.

Unlike Live it will be impossible for everyone to get the same set of achievements. All employees will have difference function access to any software. So the engineer wouldn’t be getting any Accounting type achievement.

Some people will find the system a bit intrusive, but when you’re in the office your asses belongs to the company. And just like Live this thing will be made accessible to anyone, even better to the internet. Unlike any Performance Monitoring System [System to review employee performance]  which mostly involve confidential data, this system is not. But it can be use to determine any employee performance. How can you get a 5/5 when you left email unchecked for a month.

Like what happen with Xbox, there will also be the ‘Achievement Whore’ effect. One uses a software just for the sake of getting achievements. This can be a bad thing, as it will lessen the accuracy of the Achievement System. So the said system could possibly comb though the data and find any anomaly, then remove these personal from the Achievement System, like what they did with Live.

I think that it’s possible to do all these with the current stuff that we have, but it’ll need a lot of effort, and most likely it will not be realtime, [a crawler will comb data on these software DB, and figure out any Achievement received]. Then SSO is also needded. I don’t know why my company didn’t use the same login id for AD, with the one in SAP.

I’m actually trying to do said system. But for the time being I only have DB access to a few software [yeah only DB stuff,  can't think of a way to apply this on productivity suite without involving IT]. Looking into Eclipse [Permit], PI and SAP [no I don't know ABAP]. Without SSO or an effort to have single ID to any system, it’s harder to map stuff intersystem.

Apple Safari Reader prevention [Through Subliminal Message]

June 14, 2010

Apple new feature for Safari seems neat, like it a lot, but not too sure how Google and all the other content provider opinion on it. Like I said I like it, an to any other user who notice this feature, they’ll like the feature a lot.

Since today is Monday, need to get the brain working before doing any real job. So I fired up Safari and download a page which is “Reader”able. I happen to be reading the result for yesterday F1 result, the address is http://www.formula1.com/news/headlines/2010/6/10910.html.

So I download a copy of the webpage in HTML, [Safari can't do this so I use IE]. Save to desktop and opened the file locally through Safari, file load perfectly but for some reason the reader button doesn’t lit up. Can’t be the content, it’s the same as the one on formula1.com. Must be something about how it being served. So copied the file to my local webserver, and open the page with safari from there.

To my surprise it worked. Reader button lights up. Went straight to the content and looked for the pattern. My first assumption is Safari detect long continuous <p> or <div> node. F1 seems to be writing it’s content separated with double <br> node. Try changing the <br> node to <div> reader still work. Tried changing the whole container style so that display:none. So nothing is rendered in the webpage, and at the same time the Reader button doesn’t lit up, good stuff apple.

So display:none will not work. Then I tried adding an extra paragraph to the page, and set the style font-size:1px; color:red. In the page is renders correctly, the new paragraph looks small. Reader still lits up, now comes the best part, in reader the new paragarph is rendered at the same size as all of the other content.

Since display:none doesn’t work and using an extra paragraph will mess the positioning of the content. I tried my luck by setting the extra paragraph style to “position:absolute; width:1px; height:1px; top:0px; left:0px; font-size:1px. And fill the pragraph with some subliminal messages. Below is the result.

WordPress I seems to be missing my carret after posting the picture.

I’m sure apple be patching this up as  it very simple. Me I don’t hate Apple, just bought an Ipad and an Ipod. Damn good devices, can’t wat for my IPad safari to come with reader. But to the content provider out there, this can be short measure to annoy those pesky user who uses the reader function hence overlooking all the nice add you have on your pages.

If annoy is not working for you,one can always just sniff the browser and block them completely. Apple user like what 5%. And 90% of these people will get 80% their stuff from Apple.com. So what is the point in trying to sell stuff to them.

I’m not sure if anyone even read these stuff I wrote. Still that is an hour of productivity well spent. Anyway back to work, currently looking into SAP PM table structure.

Strange problem with IE and SVG[Adobe Svg].

July 17, 2009

Read the rest of this entry »

Shift Reporting Service: Part2

June 5, 2009

Upon inspecting the shift reports available it’s obvious that the daily report doesn’t rely purely on the shift logs. It seems that the only information that end up in the daily reports are the shift notes [written text which describes important event in each shifts]. It seems that these most of the values captured in shift reports are the values aquired at the end of the shift. 

This is different from what we’ve originally anticipated. With the data from the shift log being less important it was decided that shift reporting will be left alone for the time being.

So the next level of document is the daily report. Unlike the daily report, which shows equipment status/reading at the time of the shift, the daily report only contain data on the total generation and fuel consumption. The format used for one of the Plant is very simple and it fits within a single page. Aside from generation and consumption there’s data on the coal stock, efficiency, running days and a few other key information. But there is a graph. These documents are prepared in excel.

To understand more on the process of the preparation of the daily report we’ve gone down south to our power plant in Johor. 2100MW at it’s peak, but mostly we’re at 1800MW. Upon talking with the OE onsite we’ve found out hoe these daily reports are completed.

  • The first thing that OE do every morning is completing yesterday’s report [each report cover from 00:00 to 23:59].
  • The first part is on the generation details;
    • Generation details can be acquired from the LTDS (Long Term Data Storage Server), faster then there is this problem on getting to the control room [LTDS is not remotely accessible]
    • or a webportal for the LTDS. [Slower and for some reason data is in 2 decimal point]
    • data acquired is in average of 30 minutes block.
    • data transfered exported from both method will be in .csv
  • Then they will acquire data on the fuel side [coal handling], this can either be through e-mail, or the old way phone. Even thorugh email it’s in pdf form. [she point out there's a problem with consistency(yes we have girls as an engineer), but somebody pointed out to me this is common in coal stock evaluation]
  • transfer everything into an excel template. 
  • Read note from the 2 shift logs and important item will make it’s way to the daily report. [I wish to be able to make this automatic, but processing sentence, that's NLP, not yet]
  • Repeat the same process for the two other units.

And every Thursday she’ll prepare a weekly report. 

on to part 3: coding

The cobbler among blacksmiths.

June 5, 2009

For an engineer who is working in the power industry as programmer things hasn’t been easy for me. The title may have pointed out the little akwardness of this whole thing. 

When you’re doing something that everybody else can’t really appreciate it’s hard to keep on a straight face. Just like a cobbler who is working in metal workshop. Everybody else is busy forging metal why you sitting alone sewing some shoe. While all of the other blacksmith has already have many shoes, and of the best brand, redwings, nike etc. You in your cubicle with no support whatsoever, just keep on sewing and sewing. And then all the other blacksmith comes to your cubicle and says “still sewing those shoes, bah nobody is using it”.  The shoe I’m sewing will not turn out to be redwings or nike, it’s very unique, . .  just say it’s a magical shoe, you can find a few in the market, but it wouldn’t come witth any known brand.

What makes things even harder is that, on of the shoe that I’m sewing is for the blacksmiths themselve. But they already have something another shoe for the same function. And this shoe that they like to use, . . .  let just say it just like “selipar Jepun” not even a shoe on my count. When I went to their workshop they would say, your shoe is no good, I we already got a “selipar jepun” and we’re fine with our “selipar jepun”. 

If I want to blame somebody I would blame my boss. Asking me to be a cobbler, even he knew that I’m a blacksmith by trade. But to blame him for asking me to do something that I really like would be a moot point. In any case I should be thanking him.

How would a cobbler gain a little respect in a blacksmith’s world.

The World with XML

May 29, 2009

I would like to say, If everything I know is in xml, this world would be a better place!!! Everything is structured. I can understand it, you can understand it, even the machine can understand it. There’ll be no issue in interoperability. One can work with any data in their own way. I don’t have to worry about my language of liking, as they all understand XML. How I wish everything is in XML. Everybody will be free from the chain of any legacy. It’s my data, so I should have every right to control it, not some program that would bound me to do my bidding in their way. XML.

Shift Reporting Service

May 19, 2009

This is a power generation company, so we have a few Power Plants of our own; at the same time we are the operator of these plants. So we have many shifts; and at the end of each shift a report is generated. So all this while the way these documents are prepared is with MS Word, and dumped into a NAS. This was cool back in 2000, but not so now.
This is kinda outside of EALIS Seek development, but it is still related to web development. Anyhow, few months ago we implemented Sharepoint, for an online claim system. Yeah I know sharepoint for the sake of claims; we do have some money to burn; in the name of advancement and ease of claims.
The Claims system is suppose to be operational, but I haven’t have access to it just yet, both Claims System and Sharepoint. There using sharepoint + infopath. I’ve seen a glance of the form on infopath just haven’t used it. No of the people I know, have ever used it.
Anyhow the boss asked me to do some work to get a proper Shift Reporting System. Since SharePoint is in the picture, why not use it. By year end the plan was to get a sharepoint license for each staff, so access will be made possible throughout the company. Few weeks ago I’ve attended a basic training on Sharepoint, point out to the trainer on our intention with SRS;
His feed back was;
1. Just use Sharepoint as a dumping ground like NAS – User will still prepare their document in their own way: hence no resistance, the only change will be on the dumping side: expect little resistance. The only upside of this is that sharepoint is more structured and there’s a crawler. But in essence, this is just like using NAS only prettier. Information is not properly structured here, content is just being crawled into a bunch of text; no substance.
2. Use Sharepoint + Infopath – This how we did it for claims, so it is a good way to go… right. Not according to the trainer; he advised against this because according to him [he said don't quote him; since no one is reading this who cares] infopath 2007 will be the last iteration of infopath, as the function will be absorbed to sharepoint webforms. Does make sense to me. So no point in developing something that will last 3 years. Then there’s the problem of resistance from end user; as it is very different from preparing a word document. There’s also problem on fetching historic data.
3. Use Sharepoint + asp.net + webforms – This is the most difficult way to go; but it is more flexible. One of my requirement for the forms is that it must resemble the experience of working with ms word, to achieve this there is one key ingredient; historic data. I expect user can reload the forms with data from previous report, and amend the changes onto the historic data and save it as a new document. This one requirement has made option 3 as the only viable option.

Those are his 3 recomendations

4. I can write webforms on asp add with some ajax. Historic data fetching is achievable; but this route will surely greeted with resistance on end user side as the experience is entirely different. I don’t one to develop anything that no one use. On top of that it will be ugly.

After giving some serious thought the first idea came back to mind: dumping document into Sharepoint; but this time a custom crawler will be written to crawl the document back.

Sidetrack, ever since office 2007, in compliance with world order every office doc are in pure XML files. How bout that, and this files are enclosed in a zip file and named docx, xlsx etc. So you can actually unzip these files and get their XML content. This will be helpful in gathering data without infopath or sharepoint.

Since end user will still prepare document like they always do, there will be no resistance; there’s a few new kinks though;
- the must use office 2007
- they must not change document structure
- they must refrain themselves from excess formating, might mess original structure.
The only change to the original workflow now is instead of dumping to NAS, we dump it to sharepoint; little resistance.

see part 2


Follow

Get every new post delivered to your Inbox.