Learn SAP from the Experts | The SAP PRESS Blog

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

Written by SAP PRESS | Sep 6, 2021 1:00:00 PM

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.

 

 

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.

 

Learn ABAP OOP in Our Upcoming Rheinwerk Course!

Enhance your ABAP skills with object-oriented programming! Create classes, implement polymorphism, and more. Use exceptions for error handling and write unit tests to improve your code. Learn about key design patterns and apply your ABAP Objects knowledge to the ALV object model (SAP List Viewer). This upcoming course in January is live on the web and will teach you all you need to know about these topics. Click on the banner below to learn more and order your ticket.

 

 

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