SAP Flight Data Model

SAP Flight Data Model is a simplified form of a flight booking system, which comes with SAP system for demonstration purposes. This model is used to demonstrate many features and the capabilities of ABAP programming language. For example, it is used in SAP Help files, ABAP training classes and various online resources. The flight data model has a set of relational database tables linked by Foreign key relationships.
Note: (for SAP ABAP newbies) You can just go through this once even if you don't understand it fully. Once you are familiar with some more features of ABAP language, you will be able to understand everything here. 
The flight data model has the following main tables in the SAP database (For more details, you can refer SAP Help Portal):
  • SCARR: Airline table listing various airlines
  • SPFLI: Flight connection table with details of place of Departure and Destination
  • SFLIGHT: Flight schedule
  • SBOOK: Flight booking details
You can check these tables using transaction code SE11. If you are a beginner, here are the steps (if you don't have access to SAP system, refer to my article on SAP Server Access):
1. Type SE11 (Transaction code for ABAP data dictionary) in the command field (also called input field) of SAP screen as below (If you find it difficult to see the details in the below picture, you can click on it and it will be opened in full original size):
SAP Easy Access
SAP Easy Access
2. The following screen opens. You can enter the name of one of the Flight data model table SCARR, say.

SE11- ABAP Dictionary
3. Click on display and the screen below with the details of the columns(Fields) follows:
SE11 - Table SCARR in ABAP Dictionary
4. If you want to see the contents of this table, click on the icon looking like a table structure, highlighted in the below picture with a red circle:

5. In the next screen, you can enter some criteria e.g Airline code, currency, etc. But for the time being, leave everything blank as it is.

6. Click on the Execute button in the toolbar highlighted with red circle below. By the way, the area (bar) which contains these buttons like Execute is called the Application toolbar.

7. You can see the results (SCARR table entries) below. But if you are unable to see any table entries and get the error message 'No table entries found for specified key', it means the tables are empty and SAP flight data system doesn't contain data in your system. Don't be discouraged if thats the case. SAP delivers them blank but you can generate data as explained in the next step.

SE11: Contents of Table SCARR
8. If the table above is blank, all other tables of the Flight data model must be blank too. You can generate data in them by executing SAP provided standard program SAPBC_DATA_GENERATOR. You can do so by using transaction code SE38 (ABAP Editor) in the command field. You will get a screen as below:

SE38: ABAP Editor
9. Enter the name of the program SAPBC_DATA_GENERATOR in the Program field and click on execute button highlighted in red circle.

SE38: Execute program
10. The next screen follows as below:

Selection-screen of Flight Data (Model) Generator program
11. Don't change anything here and just click on Execute button in the Application toolbar. The program will take some time to execute. Once it executes successfully, you can check the contents of different tables by repeating the steps mentioned above for SE11.
If you have executed the above steps correctly, SAP flight data model tables are filled with data. This sample data can be used by your ABAP programs to output results for selected criteria.
Moreover the knowledge of Flight data model will help you in understanding examples used in SAP Help documentation and elsewhere. As a beginner, it's definitely helpful to build and test ABAP programs with flight data model to understand programming concepts. Enjoy !

Mukesh Kumar, SAP Professional
Mukesh Kumar is an SAP ERP professional and certified SAP ABAP consultant in Netweaver environment. He is working in SAP technology for a decade. He enjoys making SAP simplified for the people interested to explore and learn SAP. Beginners can start here for self-help SAP training resources !

Featured Post

Top 5 Reasons you should be on Google+: [1] Immersive Look-and-Feel

Updated on August 5, 2017  due to remarkable changes in the landscape of Google+ making the post up-to-date and current. Enjoy the updated...