SAP for Oil, Gas, and Energy Blogs
Dive into blog posts exploring renewable energy innovations, data-driven optimization strategies, and industry transformations with SAP. Contribute your own!
Showing results for 
Search instead for 
Did you mean: 

Downstream Oil and Gas business starts from procuring crude, refining, distribution and sales of refined products and residues to customers. Secondary distribution can be referred as the distribution of refined products from the terminal (refined product storage facility) to customers or to the retail stations and accounting fuel and non-fuel sales at the retail stations. This article provides an overview of SAP product offerings like Supply Chain Secondary Distribution (S4SCSD) that can effectively handle refined products sales at the terminal (secondary distribution).

Marketing Business Process Overview

Secondary distribution begins with the Marketing Unit of the company entering a deal with customers to sell the refined products like Gasoline and Diesel from a set of terminals at a negotiated price for a given time. Upon entering the deal, customer is provided with an authorization code (Customer PIN) to lift the products from those set terminals. Certain deals would call for the Marketing company to deliver the products from the terminal to the customer location. Marketing companies in some cases own retail stations and the products from the terminals will be delivered stations. Scheduling team manages the inventory at the terminal and retail stations and manages transportation schedule. Pricing team prices each product at the terminal. Marketing team also manages the allocation of products to the customers. Credit Team manages the customer creditworthiness and allocates credit limits. Every time the product is lifted at the terminal, a BOL is generated. These BOLs are aggregated and transmitted to back office systems for accounting the inventory at the terminals and invoicing the customers for the sale.

Marketing business is a very complicated business model and generally companies use various back office systems to run and manage the complicated business. Companies tend to build highly customized products using applications available in the market. This could cause data integrity issues and could pose issues in reporting and during month end close. These enhancements/custom developments could also cause issues during system upgrades as well.

SAP Product Offering that handle Marketing business

Marketing Business as explained is responsible to sell the refined products from terminal to the customers or supply to the gas stations. This process involves maintaining customer credit worthiness, volume allocation for customer lifting, pricing the gasoline products at the rack, invoicing the customer for sale and account receivables. Credit worthiness of the customer can be maintained and managed in SAP. It can also be used for handling customer disputes.

Supply Chain Secondary Distribution (S4SCSD) is an offering from SAP Partner. S4SCSD can be used to process incoming BOLs from various terminal automation systems and to convert BOL data to SAP transactions. S4SCSD has standard idoc structure built for this purpose. The idoc structure is compatible with several external systems that send BOLs for example DTN TABS, Guardian and many other suppliers. It can also be modified with least efforts to manage customer needs. Once the incoming BOL file is parsed into the idoc structure, S4SCSD takes control of the BOL and processes the transactions in SAP. Most of the transactions are prebuilt in S4SCSD. These prebuilt transactions can be arranged as Legos to arrive at a set of transactions to be processed for a BOL at once. A transaction in S4SCSD could be “Create Sales Order”, “Create Delivery and Post Goods Issue”, “Create Purchase Order”, “Regrade the product” etc. This is called an item category. Arranging these item categories together gives all the desired transactions to be posted in the system automatically.

Let’s understand this using some simple illustrations.

Illustration 1: At the rack terminal, the refined product is sold to the customer. Let’s say Gasoline (Octane 87 grade) blended with Ethanol (10%) is lifted. Let’s call it a “Sale”. In this transaction, 90% Gas 87 and 10% Ethanol are two products pumped to the truck to make one finished product that is sold to the customer. The inventory is tracked on both products pumped and not on the finished product. In SAP the transactions that must be created would be

  1. “Regrade” - (blend) Gas 87 and Ethanol to make the finished product (relieves Inventory of components and increases inventory of finished product)

  2. “Create Sales Order” for the finished product – Gasoline (Branded or Unbranded) – (with or without reference to a contract)

  3. “Create Delivery” for the sales order for finished product.

  4. “Post Goods Issue” – relives inventory on finished product (decreases inventory of finished product)

All the above items can be combined and can be used on all customer who fall under “Sale” category. The delivery is then invoiced separately to account for AR or S4SCSD can create the invoice using SAP create billing functionality.

Illustration 1

Illustration 2: Supply Gasoline From rack terminal to a company owned Gas Station. In this example, as you can see, Gas is mixed with Ethanol and loaded to the truck. The truck pulls at the gas station, it pumps the gas to the tank. Each gas station has a brand of its own, so the pumped gas becomes a different product. Essentially, in SAP, it can be tracked using a stock transport order process which will look like below

  1. “Create Purchase Order” – stock transport order (STO) from terminal to Gas Station

  2. “Create Delivery” – for the stock transport order (STO)

  3. “Post Goods Issue” – relieve inventory from the rack terminal

  4. “Post Goods receipt” – receive products at the gas station

  5. “Regrade” - change the product to retail station product – [(Gas 87+Ethanol) to XYZ Gas 87]

All the above items can be combined to form one S4SCSD transaction, which will create all the relevant transactions in SAP. In case you want to also post the gain/loss in this scenario, it can be posted as well. There is a provision to separate the load of product with discharge of the product and it can automatically post the difference between the two. This helps better inventory management.

Illustration 2

Illustration 3: Buy / Sell in another common business transaction that happens in the terminal. There could be a third-party terminal where the marketing department could have an agreement to buy the gas from a vendor (who has inventory at the terminal) and sell it to its customer for a margin. In this case a purchase contract (buy) is set up in the SAP. When the BOL hits SAP, the transactions created by S4SCSD will be

  • Create Purchase Order with reference to a contract – at the receiving plant from the vendor

  • Create Goods Receipt – at the receiving plant

  • Create Sales Order – to the customer at the delivering plant (here receiving plant = delivering plant)

  • Create Delivery – at the delivering plant

  • Post Goods Issue – at the delivering plant

All the above items can be combined to form one S4SCSD transaction, which will create all the relevant transactions in SAP.

Illustration 3

If there are secondary cost associated with any of these transactions (Illustrations), in other words, if the product is delivered to the customer site by the seller, then, the transaction can be expanded to create a Purchase Ordre (PO) (for vendor service) and a Goods Receipt (GR) which can be used to create an invoice receipt and to create accounts payable.

Illustration 4: Asphalt Sales. There are a couple of reasons for mentioning of Asphalt sale here. First, asphalt sale usually requires a sales contract to be referred for creating the sales order. Second, though the actual sale of Asphalt is in short tons (STOs) or long tons (LTOs), sometimes, the terminals happen to send the data in gallons instead of the actual sale unit. S4SCSD has the capability to automatically refer the sale contract and convert the incoming volume in gallons to short tons or long tons depending on the contract. Necessary modifications can be easily done to update the lookup logic if required to convert the quantity. S4SCSD can handle various unit of measures to create transactions in SAP. Asphalt sale will be

  • Create Sales order with reference to sale contract

  • Create Delivery

  • Post goods issue

Illustration 4

When the BOL is received, it will have the data the way it is set at the terminal and it needs to be translated to SAP format. Essentially,

  • Terminal will translate to a SAP Plant

  • Customer Identification translates to SAP Sold to and SAP Ship-to

  • Product will translate to SAP Material

Advantage of using S4SCSD is, it comes with Ticket Orchestrated Processing (TOP), which provides the functionality of maintaining the cross references. Re-grading the products from blends to a finished product is very easy as well. S4SCSD provides standard tables with the indicators that indicate if the delivering plant (terminal) needs to regrade before a sale or receiving plant (like retail site) needs a regrade from generic products to Store recognized products.

Though above illustrations use gasoline and Asphalt, this can be used on variety of products like Diesel, Jet fuel, NGLs, heavy oils etc. where there is electronic feed of BOLs.

The other advantage of using S4SCSD is it comes with a dashboard which shows the processing status of each of the BOLs. This dashboard can be used to

  • View the processing status,

  • Correct the BOLs (update quantity or other data),

  • Mass reject the BOLs

  • Mass reprocess of BOLs

  • Mass reversal of BOLs and many more

This functionality will prove to be very useful during day to day operations for the business.


S4SCSD uses Process Automation Tool (PAT) framework. It uses standard BAPIs provided by SAP to create sales and purchase transactions. Using standard BAPIs will prove advantageous during upgrades and any standard SAP support. Any customization around it will be very easy as well. PAT can be accessed using Fiori which provides a better user experience. BOLs are processed, monitored and handled using Fiori tiles. A great deal of reporting can be established using PAT as all the BOL data resides in S4SCSD. It can provide very insightful information on the inventory, sales and purchase to name a few.

S4SCSD can be used not only in Oil and Gas companies. It can be made use of in other retail companies that sell gas or other products which requires distribution. The flexibility in scenario configuration gives S4SCSD the edge to handle variety of business scenarios at ease and makes solution implementation faster. It also comes with other built in functionalities like S4IDM (Integrated Dispatch Management) and CPR (continuous product replenishment) which have a lot of inbuilt capabilities that could be explored and utilized for improving the business processes.