Programming

What Is SFLIGHT and the Flight and Booking Data Model for ABAP?

SAP's flight and booking data model exists in every ABAP system. It’s used in the ABAP documentation and training provided by SAP. This blog post explains the tables relevant to specific training exercises you may undertake when learning ABAP.

 

In the ERD shown below, you can see how the flight data tables are set up as provided by SAP. This post won’t cover every table or every field, but you can open the SAPBC_DATAMODEL package in Transaction SE80 and find all the flight-related tables.

 

ERD Showing Standard SAP Tables

 

The standard tables can be described as follows:

 

SCUSTOM

This table stores information about the customers.

 

SAIRPORT

This table stores the airport IDs and information about the airports.

 

SCARR

This table stores all the carriers (airlines).

 

SPFLI

This table stores the flight schedules for each airline—for example, flight 17 for American Airlines flies to San Francisco from New York and leaves at 11 a.m.

 

SFLIGHT

This table stores the actual flights for a flight schedule—for example, flight 17 for American Airlines will fly January 12 and will cost $500.

 

SBOOK

This table stores bookings for single flights.

 

You can see that the tables are normalized because the master data tables (such as airports and customers) are all separated out of the tables in which they are referenced multiple times. This means that changes to customer information will take place in table SCUSTOM and not affect the bookings in table SBOOK.

 

Note that the MANDT field is listed as the first key in every table. This field stores the SAP client number. Client here is the SAP concept that allows the system to separate data within the same database. It is different from a client in the client-server architecture concept.

 

Now that you know what the SAP flight and booking data model is, you’ll have a better understanding of what you’re seeing when going through ABAP training. To learn even more about this programming language, check out our free overview on ABAP here.

 

Editor’s note: This post has been adapted from a section of the book ABAP: An Introduction by Brian O’Neill and Jelena Perfiljeva.

Recommendation

ABAP: An Introduction
ABAP: An Introduction

Step into ABAP with this beginner's guide. First understand ABAP syntax and find out how to add data and logic to your applications. Then delve into backend programming: learn to work with the ABAP data dictionary, create database objects, and process and store data. Round out your skill set by practicing error handling, modularization, string manipulation, and more. With guided examples, step-by-step instructions, and detailed code you'll become an ABAP developer in no time!

Learn More
SAP PRESS
by SAP PRESS

SAP PRESS is the world's leading SAP publisher, with books on ABAP, SAP S/4HANA, SAP CX, intelligent technologies, SAP Business Technology Platform, and more!

Comments