Regulation and Integration

Integrating TAS and TMS with SAP: what data flows and how to handle failures

A TAS and TMS link to SAP carries orders, filling results and tank stock. See the data per transaction and how queues, retries and reconciliation keep it correct when the connection fails.

Topic
Regulation and Integration
Updated
13 November 2026
Reading time
6 min
Sections
8
A long aisle between server racks in a data center.
Overview

Integrating a terminal automation system (TAS) and a tank management system (TMS) with SAP usually moves three kinds of data: orders and delivery status, filling results per compartment, and tank stock corrected to a standard temperature. What decides success is the set of rules for queues, retries and reconciliation when the connection fails.

A TAS runs loading at the terminal (see what a terminal automation system is) and a TMS keeps tank levels and stock. SAP is the business system that holds orders, materials and accounting. Customs reporting is a separate line, described in TPS Online. This guide covers the data, the boundaries and the failure handling, using the patterns visible in Citia's own terminal projects.

Where OT stops and IT begins

Boundary

Where OT stops and IT begins

OT is the equipment and software that runs the physical terminal. IT is the business systems that account for what happened.

The TAS, the TMS, batch controllers and PLCs are OT: they must keep working when the office network is down. SAP is IT, with a different change cycle, different availability targets and different owners. The integration is where these two worlds meet, and most failures come from assuming they behave alike.

The ISA-95 standard (IEC 62264) describes the same split. Level 3 covers operations management, where a TAS and a TMS sit, and Level 4 covers business planning and logistics, where SAP sits. Part 3 of the standard defines the activities at Level 3, and the exchange between the two levels is what this guide is about.

OT priorities

  • Loading must continue when the office network fails
  • Changes are tested and scheduled around operations
  • A wrong value can affect a physical operation

IT priorities

  • Records must agree with accounting and audit
  • Systems are patched and upgraded on a regular cycle
  • Access is controlled per user and role
Level 0 to 2
Process, sensing and control: field instruments, meters, batch controllers, PLCs
Level 3
Operations management: TAS and TMS
Level 4
Business planning and logistics: SAP
Three kinds of data that move

Data

Three kinds of data that move

Almost every TAS and TMS link to SAP carries the same three kinds of data.

Orders and delivery status go from SAP, or from a distribution order system such as SIOD, to the TAS, and the status of each delivery goes back. Filling results go from the TAS to SAP once a truck has loaded, per compartment, with the measured quantity. Tank stock goes from the TMS to SAP as physical inventory.

Citia's own project notes show the pattern. At the Jambi fuel terminal the TAS links shipment, gate-in, the filling shed and gate-out with SAP and SIOD, including the delivery note and Good Issue. The LPG terminal at Pulau Layang reports tank stock to SAP through automatic physical inventory, and the Padalarang TAS updates distribution status in SAP automatically.

Data paths between field, terminal and SAP
Field
Control
Application
Enterprise
Meter and ATG

Measure the loaded volume and the tank level.

Hover, focus or tap a step to read its note.
What each transaction carries

Fields

What each transaction carries

A sound design starts from a field list for each transaction, written with the SAP team and not guessed.

The table shows typical content. The real field list depends on the SAP configuration and on what the site agrees. Two fields matter more than the rest: a unique business key for each transaction, and a timestamp with its time zone. Without them, retries create duplicates and reconciliation cannot line up the two sides.

Put the agreement in one interface document: the field list, the version, the error codes, the contact on each side and the rule for changing any of them. A field added on one side without the document is the most common way an integration breaks months after go-live.

Keep units explicit. Volume at observed temperature, volume at standard temperature, density and temperature are different values. SAP should receive the one the business process defines, and the others stay in the terminal record for audit. The last row shows common choices for an unreachable SAP, and each site sets its own policy.

CriterionOrders and statusFilling resultsTank stock
DirectionSAP or SIOD to TAS; status back to SAPTAS to SAPTMS to SAP
Typical fieldsOrder number, vehicle, driver, product, planned quantity, compartment planOrder number, compartment, product, actual quantity, start and end time, meterTank, product, level, volume, temperature, reading time
TriggerNew or changed order; each status changeEnd of a filling transactionScheduled posting, receipt or sale
Key against duplicatesOrder number plus versionTransaction number plus compartmentTank plus posting time or ticket number
If SAP is unreachableLoading continues on the last accepted order; status is queuedResult is queued and sent later, in orderPosting is queued; stock stays in the TMS
Queues, retries and no double posting

Failures

Queues, retries and no double posting

When SAP or the network is down, the terminal should keep working and the data should wait in line.

The pattern has four parts. The sender stores each message in a durable queue before it tries to send it. It retries with growing pauses, not in a tight loop. The receiver treats a repeated message with the same business key as one it already has, so a retry never creates a second posting. Anything that fails repeatedly goes to a review list with an alarm, and a person decides.

SAP's IDoc documentation describes the receiving half of this idea. Status records trace an IDoc through its stages, and an error status starts exception handling and allows a resend. The terminal side must do its own part by keeping a status for every message it sends.

Decide the loading policy in writing. Some sites let a truck load against the last accepted order while SAP is unreachable. Others stop new loading authorisations until the order is confirmed. Both can be right. The unsafe choice is not to decide.

  • Durable queue

    Each message is stored before it is sent, so a restart loses nothing.

  • Retries with pauses

    Growing delays between attempts protect SAP when it comes back.

  • Business key

    A repeated message is recognised and ignored, not posted twice.

  • Review list and alarm

    Repeated failures reach a person with the evidence attached.

Daily reconciliation between terminal and SAP

Checks

Daily reconciliation between terminal and SAP

Reconciliation is the check that both systems agree, done every day and not only at month end.

Pick a cut-off time and compare what each side holds for that moment. The goal is not zero differences on the first day. The goal is to find each difference while the people who understand the shift are still around to explain it.

  1. Set the cut-off

    Use the same time and time zone on both sides.

  2. Count transactions

    Orders, filling results and stock postings in the terminal against those received in SAP.

  3. Compare quantities per product

    Total loaded volume per product on both sides.

  4. Compare tank stock

    TMS reading at the cut-off against the stock SAP holds.

  5. Give each difference a reason

    Timing, queued message, correction or unknown. Unknown goes first.

  6. Resend only what is missing

    Never resend what SAP has already posted.

Who holds the master data

Reference data

Who holds the master data

Master data is the shared vocabulary of the integration: products, customers, plants, tanks and vehicles.

In most terminals SAP owns material codes, customers and plant data, while the terminal owns tanks, bays and equipment. The TAS keeps copies of the SAP data it needs, so the real question is how a change travels. If a product code changes in SAP and the TAS is not updated, a truck loads one product against another's code.

The Citia work at Padalarang is a clear case. Moving from B40 to B50 meant new material codes in the loading application. The project page records short lessons: validate active codes before an update, do not set up pending codes as operational products, and test and document every product change. The article on B50 at fuel terminals lists the full set of changes.

Give every master data item one owner and one direction of change. Two systems that can both edit the same product list will drift apart.

Testing the integration before go-live

Acceptance

Testing the integration before go-live

An integration is tested by breaking it on purpose, not only by running it when everything works.

Agree the test cases with the SAP team and run them in a test system with realistic master data. A short list is enough when each case has a written expected result:

  • A normal order, from loading to posting, start to end.
  • A repeated message with the same business key, which must not create a second posting.
  • SAP unreachable during loading, then restored, with results arriving in order.
  • A product code that exists in the terminal but not in SAP, which must be rejected with a clear reason.
  • A restart of the terminal server in the middle of a queue.
  • A clock or time zone difference between the two systems.

Record every result in the site acceptance record. The Citia B50 project followed the same habit: test transactions with the new product codes, plus documented screens and test results.

Keeping the link safe

Security

Keeping the link safe

The link between SAP and the terminal is also a path into the control network, so it deserves its own design.

Use a dedicated interface server or service between the two networks, and let it open only the connections the data flow needs. Give the integration its own account with minimum rights, so that a leaked password cannot change terminal settings. Log every message with its key and time, because the log is also your evidence in a reconciliation dispute.

The Citia bulletin on secure system integration describes API-based links with layered protection, and the guide on OT cybersecurity at fuel terminals covers the first steps for the control network.

Network position
An interface server between the OT and IT networks
Connections
Only those the data flow needs, outbound from the terminal where possible
Account
Dedicated to the integration, with minimum rights
Logging
Every message with key, time and result

Terms explained

OT and IT
OT runs the physical operation (TAS, TMS, PLC). IT runs the business records (SAP, email, office network).
SAP
The enterprise system that holds orders, materials, stock and accounting for the company.
IDoc
SAP's document format for exchanging business data between systems, with status records that trace each document.
Business key
A value that identifies a transaction uniquely, such as an order number with a compartment, used to recognise repeats.
Physical inventory
The stock measured in the tanks, as opposed to the stock a ledger says should be there.
Good Issue
The SAP posting that records goods leaving stock, here triggered by a completed delivery.
SIOD
The distribution order system whose data is exchanged with the terminal in Citia TAS projects.

Frequently asked questions

What happens to a transaction when SAP is unavailable?

The transaction is stored in a queue on the terminal side and sent when SAP is back. Whether trucks can keep loading meanwhile is a site policy, usually against the last accepted order. The queue sends results in order, and the business key stops duplicates.

Who holds the master data, the TAS or SAP?

Usually SAP holds business master data such as materials, customers and plants, and the terminal holds tanks, bays and equipment. The TAS keeps copies of what it needs. Give each item one owner and one direction of change.

How do you prevent duplicate postings?

Give every transaction a unique business key and make the receiver ignore a key it already holds. Keep a status for each message on the sender side, so a retry is a decision based on a known state.

What data does a TMS send to SAP?

The INTEGRA TMS reads level, temperature and volume from the tank gauges, keeps tank tickets for receipts and sales, and posts physical inventory to SAP over the intranet. Raw readings stay in the TMS database.

What does OT/IT convergence mean?

It means connecting operational technology, the systems that run the physical site, with information technology, the business systems. The benefit is one record per transaction. The cost is that two teams with different priorities must agree on interfaces, access and change control.

Should SAP receive every tank reading?

No. SAP needs stock at the points the business process defines, such as end of day or after a receipt. Continuous readings stay in the TMS, where they serve alarms and trends, and a summary goes to SAP.

Sources and further reading

  1. ISA-95 Standard: Enterprise-Control System Integration (opens in a new tab)International Society of Automation (ISA) · isa.org
  2. Status Processing (IDoc status records and exception handling) (opens in a new tab)SAP Help Portal · help.sap.com
  3. OData Version 4.0 Part 1: Protocol (opens in a new tab)OASIS · docs.oasis-open.org · 2014
  4. INTEGRA TMS (opens in a new tab)PT Citia Engineering Indonesia · citia-engineering.com
  5. Fuel Terminal Jambi distribution workflow (opens in a new tab)PT Citia Engineering Indonesia · citia-engineering.com · 2026
  6. Tank farm operations: TMS integration with SAP (opens in a new tab)PT Citia Engineering Indonesia · citia-engineering.com · 2025
  7. B50 product update, Padalarang fuel terminal (opens in a new tab)PT Citia Engineering Indonesia · citia-engineering.com · 2026
  8. Cover photo by Christopher Bowns, CC BY-SA 2.0 (cropped and colour graded) (opens in a new tab)Wikimedia Commons · commons.wikimedia.org

Next step

Prepare the technical discussion for your facility.

Bring the equipment list, diagrams and symptoms you have. The Citia team helps map the next step.

Related products and solutions

Keep reading