SAP software products provide powerful instruments for helping companies to manage their financials, logistics, human resources, and other business areas. The backbone of SAP software offering is SAP ERP system which is the most advanced Enterprise Resource Planning (ERP) system from currently available ones. SAP has evolved to offer application software for supporting complex business functionality and in this post we are going to explain (on high level) how does SAP work.
SAP System Architecture
It is a good idea to start answering the question “How Does SAP Work?” with a discussion of what the components of an SAP ERP system are, how they are related to each other, and what are their purposes. We should mention that SAP ERP is not the only SAP software component. There are other business application components such as Business Intelligence (BI), Supply Chain Management (SCM), and Customer Relationship Management (CRM). However, in this article we are going to focus on SAP ERP because it is the primary component and provides capabilities for integrating business data from other application components.
SAP ERP system is commonly structured in a three-tier client/server architecture. The three-tier architecture is the recommended one because it enables high scalability and flexibility but SAP can also be deployed on two- and one-tier architectures. Figure 1 provides a graphical illustration of the differences between these architectures.
In the three-tier SAP architecture, the presentation tier provides the interface to the user, the application tier processes the business logic, and the database tier stores the business data.
The Presentation Tier
The presentation tier is typically located on PCs of business users and provides the SAP Graphical Interface (SAP GUI). SAP GUI is a lightweight application that can be installed on any computer running MS Windows or Mac OS and it provides the interface for communication between the user and the SAP ERP system.
The Application Tier
The application tier is basically the heart of the SAP ERP system. It executes the business logic, responsible for processing client transactions, print jobs, running reports, coordinating access to the database, and interfacing with other applications. It is possible to distribute the application logic between several server machines in situations when the load exceeds processing power of a single server.
The Database Tier
The database is used for storing two types of objects: the business-generated data and the SAP application programs. The business-generated data represents data objects created by users as part of various business processes. For instance, sales orders or customer master records are classified as the business-generated data. SAP application programs are routines written in ABAP (special programming language used in SAP) that are loaded into the SAP application servers from the database at runtime.
It is possible to use databases from different vendors (for instance, Oracle or Microsoft) and it is up to the company to decide which database vendor to choose. Usually, the database license is included into the price of SAP. The database tier has the highest requirements for availability, reliability, and performance because usually each SAP system is deployed on one database instance. Therefore, performance of the database tier ultimately determines the scalability of the entire SAP ERP installation.
There are situations when three tiers can be reduced to two or one. The possibility of these situations depends on available processing power and number of business users. For example, it is possible to install all three SAP tiers on a single computer for demo purposes. On the other hand, large SAP productive installations require multiple powerful servers for each of the tiers in order to ensure good performance of the SAP system.
Above these tiers, SAP architecture can be further segmented into several application modules. Each module contains the SAP application programs and business data related to a specific business area such as financial accounting (FI) or materials management (MM). Figure 2 illustrates the application modules which are included into the SAP ERP system.
Although SAP application modules cover completely different business process and business areas, technically they work in a similar manner. The difference is only in ABAP programs and data tables that are used in each of these modules of SAP. For this reason, our article is not going to focus on any particular SAP module but will instead explain how does SAP work with the three-tier architecture in general.
How Does SAP Work?
Now that we know what are the components and tiers of the SAP ERP system, let us see how does SAP work. As it was explained above, the heart (or kernel) of the SAP system is in the application tier (application server). The application server gets input from and displays output to the presentation tier (SAP GUI). Furthermore, it stores data in the database tier.
The kernel of the SAP system is a collection of executables programs and auxiliary tools for processing the business logic. All kernel processes that are started or stopped are called an SAP instance. SAP ERP system typically contains several instances in such a way that each instance is running on a dedicated server computer.
Each SAP instance contains a dispatcher and several work processes. The dispatcher distributes tasks to one of the work processes. The SAP system has different kinds of work processes that were created for various tasks. Here is the list of their types:
- D: Dialog work processes which are responsible for handling online transactional requests from users.
- B: Batch work processes which are responsible for processing background jobs scheduled in the SAP system.
- V: Update work processes which are responsible for carrying out updates in the database. These updates can happen asynchronously to batch and dialog processes.
- S: Spool work processes which are responsible for enabling printing in the SAP system.
- G: Gateway work processes which are responsible for enabling communication between applications (for instance, between SAP R/3 and SAP R/2). Only one gateway work process is needed per one SAP system.
Figure 3 illustrates a generic SAP application instance with one dispatcher and several work processes.
As we said above, the SAP ERP system can contain several SAP application instances but among these instances there must be one special instance called the central instance (CI). The central instance has two additional components called the message process (M) and the enqueue server (E).
The message process (M) of the central instance is used for establishing communication between various application instances included in the SAP system. For instance, when a user logins to the SAP system, it is automatically assigned by the message process to one of the available application instances. Next, all the transactional requests related to this user will be re-routed by the message process to the chosen application instance.
The enqueue server (E) of the central instance is used for managing locks on the database tables. These locks ensure that database updates are performed in a proper sequence and guarantee consistency of the business data.
The central instance is schematically illustrated on Figure 4.
How Does SAP Work?
SAP system works in the following way:
- A request arrives from the presentation tier (it can be an online request from a user or a request related to a batch job or anything else).
- This request is analyzed by the dispatcher of the SAP central instance.
- The dispatcher passes the request to the message process (M).
- The message process (M) decided whether this request should be processed on this instance or needs to be forwarded to a different instance (for example, an instance with a lower computing load).
- If the request remains at the same instance, it is put in one of the work processes of the appropriate type (for instance, if it an online request from a user, it should be placed in the dialog work process).
- The request gets processed by the work process, and if necessary, the SAP system will commit an update to the database through the enqueue server (E).
- The feedback about outcome of the request is delivered back to the originator of the request in a reversed order.
This explanation of how does SAP work could be a little bit difficult to follow, and therefore, let us consider a simple example that will hopefully make understanding easier.
In our example, a business user runs a transaction called ZREPORT (it a fake transaction just for this example). This transaction selects one customer from the table with customers and changes its name. We are interested to see what happens in the SAP ERP system when the business user executes this simple transaction. Figure 5 provides an illustration of how SAP works in this example.
According to Figure 5, the SAP ERP system receives input via SAP GUI from a business user. This user launched the transaction. Next, the system process this input in a number of steps:
- The input is passed to the dispatcher of the central instance.
- The dispatcher passes the request to the message process (M).
- The message process (M) placed the request into one of the dialog work processes (D).
- The dialog work process (D) performs reading and update of the database through the enqueue server (E).
- The enqueue server (E) passes the update request to the database (it is necessary to update name of the customer).
- The database returns feedback to the dialog work process (D).
- The dialog work process (D) passes the feedback to the dispatcher.
- The dispatcher returns the outcome of the operation to the presentation tier (SAP GUI) and the business user sees the result on her screen.
Hopefully, this simple example will help you to understand the general principle of how does SAP work. Of course, in the real life, there are millions of technical details and nuances that are only known to SAP basis experts. Nevertheless, this explanation should be a good starting point for everyone who wants to understand the basic technical principles of how does SAP work.
In this post, we attempted to explain how does SAP work. We tried to avoid difficult technical details and keep the explanation easy for understanding. We first had to describe SAP architecture and various components of the system. Next, we explained and illustrated with a simple example how these components work together and support business processes of an enterprise. Your feedback is very important for us, so if you liked the article, please bookmark it in social networks and leave a comment below.