SAP Counter automation for maintenance planning

4 Steps to automate Maintenance Planning in SAP for mining and construction equipment with GroundHog FMS and GroundHog Telemetry
SAP Maintenance Planning Meter Data Automation
Authors:
Marty Egan, SAP Consultant (Maintenance Planning and Automation)
Chan Rachakonda, Product Manager
Krishna Kunam, CTO
Most mining companies use SAP to manage their Planned Maintenance for Mobile Equipment. The other systems we’ve seen used, but to a far smaller extent, are JD Edwards, Oracle Financials and Eclipse. While the infrastructures within each of these systems is different, the process and the end goal are almost the same – to streamline and automate the maintenance planning and execution process.

SAP’s PM module allows maintenance planners to streamline their mobile maintenance planning process. It is also used to easily plan labor and material activities, manage maintenance requests, and perform repairs. When setup and used correctly, SAP automatically trigger processes in other SAP modules – for example, a Repair activity on a Jumbo’s Boom may trigger a purchase request for non-stock materials in MM or Purchasing modules.

That said, as powerful as it is, SAP’s user interface can be intimidating for maintenance supervisors and technicians at a mine site. Simple activities such as updating meter readings that are required to be updated to enable powerful SAP business logic to execute maintenance strategies can seem daunting to the end-users.

Therefore, it behooves the mine to automate and streamline the entire process of capturing meter data directly from the equipment to automate the maintenance planning process within SAP. Everything in SAP PM revolves is structured around master data stored in master data tables. Master data types include equipment, location, classes, characteristics, task lists, catalogs, construction types (materials BOMs), measuring points, and counters. Counters specifically are data about equipment use, such as wear and tear or consumption.

In this e-Book, we look at 4 ways to streamline meter data entry (which can be extrapolated to any data that comes from Mobile or Fixed equipment that needs to be imported into SAP).

SAP nuts-and-bolts: Meter readings and how SAP uses these for planned maintenance

In a typical Mobile Mining Fleet application, SAP is used to manage equipment maintenance plans. These maintenance plans are typically a mixture of fixed time and usage-based maintenance cycles, e.g., 250 hour service, 500 hour service, 10,000 hours engine change out, 6 months fire suppression testing etc. SAP uses Counters to collect equipment usage statistics (i.e., meter readings) and schedule the maintenance plans accordingly.

As a typical simple example, an equipment has a maintenance plan with a maintenance cycle of 500 hours. It is estimated the equipment will run for 8 hours per day or 2,920 hours per year. If the last (or first) time this maintenance plan was completed was July 01 then the next calculated scheduled date is:

Last Performed Date + (Maintenance Cycle / Annual Estimate) * 365 days = July 01 + (500 / 2,920) * 365 days = September 02

SAP can also handle complex maintenance cycle scenarios including: Nested services: e.g., 500 hour service suppresses the 250 hour service. Multiple counter plans: e.g., every 1,000 hours or every 3 months or every 5,000 miles

It is important to note that SAP only re-calculates the forecasted maintenance plan date when a counter reading is entered. This means that if frequent (daily) counter readings are entered, the accuracy of the forecasted date is vastly improved. This can have great benefits in being able to more accurately predicted when parts and labor are required and improve equipment and fleet availability forecasts. This is also important when equipment will be out of service for an extended period as SAP will assume that the estimated usage hours are being used and will continue to generate maintenance Orders accordingly. Thus, it is crucial to continue to add counter readings even when the equipment is not in use.

The Status-quo

In many Mobile Mining Fleets, meter readings are manually entered on paper-based check sheets and passed to a central data entry area for manual entry into SAP. In one site the authors were involved in, meter readings were manually collected 3 times per day on over 50 pieces of equipment, that is over 50,000 readings per year. These readings were then manually entered into SAP. Needless to say, the opportunities for incorrect data entry were huge and resulted in many hours of trying to correct erroneous meter readings.

Method #1: A simple Excel Importer

SAP uses ‘SAP GUI Scripting’ as an automation interface to enhance the capabilities of SAP. The interface allows end users to automate repetitive tasks by recording and running macro-like scripts and to develop complex text-based Scripts (Microsoft VBScript, Java) that can be integrated into a Microsoft Excel workbook. Using this interface, users can collect meter readings using paper-based check sheets but also enter into a spreadsheet where basic validations can be performed prior to being loaded into SAP.

By using this method, considerable time can be saved by pre-validation of manually collected meter readings that fail due to data quality issues, e.g., usage rate too high, reading value less than previous reading etc.

An example of an Excel / SAP GUI based automation tool is shown below.

In the picture below, ‘SAP Counter Management’ application all validations are carried by extracting current readings from SAP and comparing to the new readings. Approximately 15 validations are carried out on each reading entered. Simple statistics are also carried out to improve confidence in new reading.

SAP Counter Management Excel
SAP Counter Data Importer built by Marty Egan

Method #2: Excel based Data from a Fleet Management System such as GroundHog FMS

Most mines use a Fleet Management System to track production metrics. GroundHog is used in both Underground and Open pit mines to automate production data capture – for both the load-haul cycles, and the bench or face advance cycles. GroundHog is used to manage the entire fleet at the site, and all work performed by each individual equipment at the site, including if it is parked. GroundHog is used to always track the status of any piece of equipment – including when it is actively working, when it has encountered an operating delay, when it is idle, when it breaks-down, when it is set to down for planned maintenance and when it is parked (no planned work for extended periods of time). GroundHog tracks the Time Utilization Model for every piece of equipment, aggregated by equipment type, and fleet.

In GroundHog, maintenance managers add SAP Counter IDs for every equipment counter being tracked in SAP. This is stored as part of the equipment meta-data in GroundHog.
GroundHog SAP Counter Data Configurator
SAP Conter Data Importer built by Marty Egan
Maintenance Technicians can easily export the latest counter readings, including the last counter reading date as a .CSV file which can then be dumped into an FTP site, or an SAP process-email address on top of which IT can build further automation such as the ones described in Method #1.
sap counter reading excel download from groundhog
As an example, the .CSV export file can be incorporated using the ‘SAP Counter Management’ tool. The basic steps to achieve this are:
  1. Export readings .CSV from GroundHog (SAP Engine Hours Report).
  2. Import current readings from SAP (SAP GUI Scripting).
  3. Import GroundHog readings.
  4. Run data validations. Correct data errors as required.
  5. Create SAP load file.
  6. Load readings into SAP (SAP GUI Scripting).
  7. Review and validate data in SAP.

Method #3: Using APIs from a Fleet Management System such as GroundHog FMS

The process can be further automated by using GroundHog APIs, thereby eliminating the need for a maintenance manager to export .CSV files from GroundHog to an FTP site, or by using the SAP inbound email handling automation process.

SAP Process Automation and similar tools can be used to integrate with GroundHog’s secure REST APIs. You should work with your IT team to make sure that SAP has the right Network configuration to access GroundHog’s APIs.

You can find the API link in the main GroundHog menu. Please navigate to Advanced –> 3rd Party API Configs. Please note that by default, only GroundHog Admins have access to this link. Permissions can be updated to allow other user types to have access to this link in GroundHog.

The URL to connect to this API from SAP is listed in the top left corner. GroundHog provides extensive documentation on these APIs so any competent SAP developer or System Integrator can write scripts to import the counter data into SAP.
GroundHog SAP Counter Data API
The following is a sample from the API document GroundHog shares with all our customers.

GroundHog Professional Services typically helps mines implement these integrations between SAP and GroundHog.
GroundHog SAP Counter Data Definition Document
As an example, the .CSV export file can be incorporated using the ‘SAP Counter Management’ tool. The basic steps to achieve this are:
  1. Export readings .CSV from GroundHog (SAP Engine Hours Report).
  2. Import current readings from SAP (SAP GUI Scripting).
  3. Import GroundHog readings.
  4. Run data validations. Correct data errors as required.
  5. Create SAP load file.
  6. Load readings into SAP (SAP GUI Scripting).
  7. Review and validate data in SAP.

Method #4: Using off-the-shelf Telemetry hardware to import Data directly from ANY Mobile Equipment using GroundHog Telemetry APIs

Manual meter data entry, as described in Methods 1, 2 and 3 can be error prone. If meter data is incorrectly entered, the reconciliation process (‘unwinding an incorrect counter reading’) is extremely onerous and time-consuming. Automatically importing data from on-board telemetry systems is the most effective, fool-proof, and automated method to update to meter data in SAP.

Almost all heavy equipment OEMs have now implemented the SAE-J1939 protocol. The SAE-J1939 protocol provides serial data communications between microprocessor systems (also called Electronic Control Units – ECU) in any kind of heavy-duty vehicles – including Haul Trucks, Excavators, Dozers, Jumbos, Long Hole Drills, and even Diesel based Light Vehicles. The protocol is based on Controller Area Network (CAN) and the system is called a CAN-bus.

Some of the data that is published on the CAN bus includes Engine Hours, RPM, Oil Temperatures, Pressures, Fuel Flow Rates, Idling Times, Fuel Consumption when moving and when idle, etc. The CAN-bus is typically terminated using a Deutsch port – and comes in various configurations. All you need is a GroundHog Telemetry dongle that connects to the CAN-bus.

Here is the GroundHog Telemetry dongle and a set of relevant connectors based on the make/model of your equipment
GroundHog Telemetry Dongle Installation for SAP
If the OEM’s diagnostic port is not a standard Deutsch 9-pin or 16-pin port, there are a wide variety of connectors that can be purchased on Amazon.com (or through GroundHog) and used to connect to the Diagnostic port to get the Engine Hours and other relevant data.
GroundHog Meter Readings to SAP
GroundHog has two styles of CAN-bus readers. One is wired and comes with an attached tablet. The second is wireless and communicates via Bluetooth to the GroundHog tablet. When the machine is powered on, GroundHog’s telemetry unit reads Engine Hours, Compressor Hours, P1 and P2 Hours, engine Fault codes and a host of other data depending on the machine make and model and sends it to the GroundHog Cloud. All meter data is stored with the appropriate SAP counter IDs, and can be retrieved by SAP scripts using either Method 2 or Method 3 described above.
GroundHog Engine Hour Reader for SAP Counters

Please click on this link to download the e-book written by Marty Egan, SAP Consultant, and the GroundHog Team

Want to learn more about SAP Meter Readings?

Here is a link to SAP’s portal where you can learn about SAP Meter Readings and how they are critical for your SAP Maintenance Planning Strategy and Automation