Sunteți pe pagina 1din 21

Flight Data Application Demo Example for Integration

Technolog
PDF download from SAP Help Portal:
http://help.sap.com/saphelp_nw70/helpdata/en/08/0a323c3980a57be10000000a11402f/frameset.htm
Created on May 17, 2015

The documentation may have changed since you downloaded the PDF. You can always find the latest information on SAP Help Portal.

Note
This PDF document contains the selected topic and its subtopics (max. 150) in the selected structure. Subtopics from other structures are not included.

2015 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose
without the express permission of SAP SE. The information contained herein may be changed without prior notice. Some software products marketed by SAP SE
and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by
SAP SE and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be
liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express
warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP and other
SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE in Germany and other
countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

Table of content

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 1 of 21

Table of content
1 Flight Data Application Demo Example for Integration Technolog
1.1 Flight Data Application: Overview
1.1.1 Web Interface for Travel Agency Customers
1.1.1.1 Administration of Customer Data
1.1.1.2 Look For Flight Connection
1.1.1.3 Book Flight Trip
1.1.1.4 Cancel Flight Trip
1.1.1.5 Look For Flight Trip
1.1.2 User Interface for Travel Agency Employees
1.1.3 Distributed System Landscape for Travel Agency and Airline
1.1.3.1 Replicate Flights
1.1.3.2 Checking Availability of a Flight Connection
1.1.3.3 Create Flight Trip
1.1.3.4 Cancel Flight Trip
1.1.4 Functions
1.1.4.1 Get Flight List
1.1.4.2 Get Flight Details
1.1.4.3 Get Flight Availability
1.1.4.4 Transfer Copy of Flight Data
1.1.4.5 Replicate Flight
1.1.4.6 Get Flight Booking List
1.1.4.7 Create Flight Booking
1.1.4.8 Create Flight Booking as Reservation
1.1.4.9 Confirm Flight Booking
1.1.4.10 Cancel Flight Booking
1.1.4.11 Get Flight Customer List
1.1.4.12 Create Flight Customer Data
1.1.4.13 Change Flight Customer Data
1.1.4.14 Set Up Web User
1.1.4.15 Check Web Password
1.1.4.16 Change Web Password
1.1.4.17 Get Flight Connection List
1.1.4.18 Get Flight Connection Details
1.1.4.19 Get Flight Trip List
1.1.4.20 Create Flight Trip
1.1.4.21 Cancel Flight Trip
1.1.5 Terms in the Flight Data Application
1.2 Testing the Flight Data Application
1.3 Setting Up the Flight Data Application
1.4 Technologies and Concepts

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 2 of 21

Flight Data Application: Demo Example for Integration


Technologies
Purpose
The following example of an application is based on the flight data model of the ABAP workbench, and is intended for use in training courses and demo materials
only. The application is not intended to be used productively.
It can be used mainly for explaining SAP integration technologies especially the integration technology ALE and the interface concepts BAPI and IDoc. Real
application scenarios are too complex for illustrating these and related technologies and concepts. They require specific application knowledge and certain system
settings (Customizing), and can therefore be used for arranging technology only with limitations.
For this reason, we provide a demo application with the following properties:
The application is simple, comprehensible, and requires little training effort.
It requires no specific application knowledge.
It is complex enough to explain all the relevant technologies.
It requires little Customizing and can be set up easily.

Features
The example application can be used to illustrate the following topics:
General BAPI concept
Business objects in the BOR
Generic object services in the BOR
Implementation of BAPIs
BAPI customer enhancement
Mass data-enabled BAPIs
BAPIs in the DX Workbench
Use of BAPIs in ABAP programs
BAPIs in Application Link Enabling (ALE)
Generation of ALE interfaces (IDocs) from BAPIs
Use of ALE distribution model
BAPIs in the Interface Repository
You can also create your own demo applications for the following technologies:
Use of BAPIs with different connectors (Business Connector, DCOM Connector, and Java Connector)
Use of BAPIs from front-end applications (Business Server Pages)
Business Workflow

The documentation about the example application provides the following entry options:
Content
overview about the flight data application
Testing the flight data application
Setting up the flight data application
Technologies and Concepts

1.1 Flight Data Application: Overview


Purpose
The example application supports various business processes that are connected with flights, flight trips, and flight bookings.

The application is intended for use in training courses and in demo materials only and is not intended for use productively.

Features
The application provides support for the travel agency and airline(s) when performing tasks in the following areas:
1. Flight information system and flight administration (airline)
The application provides support for airlines for the administration of their flight schedules, flights, and flight bookings, and for other administrative tasks
such as organizing in-flight refreshments.
The most important entities are flight and flight booking.
2. Flight sales system (travel agency)
The application provides support for flight ticket vendors for tasks such as looking for flight connections, and booking or canceling flight trips. The vendor is
usually a travel agency. If the tickets are sold directly, the vendor can be an airline.

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 3 of 21

The flight sales system has to be linked with the flight information systems of all the relevant airlines. If a customer books a flight trip at a travel agency, the
travel agency then has to make all the necessary flight bookings with the relevant airlines.
The most important entities are flight connection and flight trip.
3. Administration of flight business partners (airline and travel agency)
The application provides support for tasks that are connected with the administration of business partners. These tasks are of interest to travel agencies
and airlines. The business partners of a travel agency are the flight customers. The business partners of an airline are the travel agencies that sell its
tickets, and also the flight customers (for direct sales).
The most important entities are flight customer and travel agency.

It is possible that the application is operated by an Application Service Provider (ASP), who makes it available to the various airlines and travel
agencies as a service.
Various application options have been implemented.
User Interface for Travel Agency Employees and Customers
Travel agency employees and customers can use a suitable user interface to perform self-service tasks.
This has been taken into consideration, and all the necessary functions have been implemented. However, there is currently no application available for
implementing user interfaces.
See also:
For more information, see the following:
Web Interface for Travel Agency Customers
User Interface for Travel Agency Employees
Distributed Systems for Travel Agency and Airline
The flight sales system (travel agency) and various flight information systems (airline) can be operated in different systems. ALE and BAPIs ensure
synchronization and interaction between the systems.
This application has been implemented and is available.
See also:
For more information, see the following:
Distributed System Landscape for Travel Agency and Airline

Scenarios have been implemented for the various application options. There are functions available for each scenario. These functions are specified
in the relevant scenario description in the Process Flow keyblock and under
Functions.
The terms used in this document for a business application (flight, flight connection, flight trip, flight booking, flight customer, and travel agency) are
defined in the
Flight Data Application: Terminology section.

1.1.1 Web Interface for Travel Agency Customers


Purpose
A travel agency provides a Web application for its customers. Customers can use this application to get information about offers and make bookings themselves
on the Internet. The following scenarios are possible:
Administration of Customer Data
Looking For a Flight Connection
Booking a Flight Trip
Canceling a Flight Trip
Looking For a Flight Trip

This Web application has not been implemented yet. However, the functions are available in the back-end system of the travel agency. To
implement the Web application, simply create a user interface and link it to the existing functions.

1.1.1.1 Administration of Customer Data


Purpose
In this scenario, flight customers who are logged on to the Web application of a travel agency can maintain their own customer data. Customers can register
themselves as a new customer of the travel agency and create a Web user. In addition, customers can change their password. To book or cancel flight trips, a
registered customer has to log on to the Web application as a Web user with the corresponding password.

Process Flow
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 4 of 21

Create flight customer data (function:


Create Flight Customer Data)
Set up Web user (function:
Set Up Web User)
Log on to the Web application (function:
Check Web Password).
Change password (function:
Change Web Password)
A new customer must go through steps 1 and 2. Step 2 contains the logon to the Web application. A customer who is already registered with a travel agency logs
on to the Web application in step 3. In both cases, step 4 is optional.

Result
For a new customer, the customer data is entered in the travel agency system, a customer number is generated, and a Web user is set up.

Example
The scenario is illustrated in the following graphic.

The scenario
Booking a Flight Trip contains steps 1 - 3 of this scenario. The scenario Canceling a Flight Trip contains step 3 of this scenario.

Looking For a Flight Connection


Purpose
In this scenario, flight customers who are logged on to the Web application of a travel agency get a list of the flight connections offered by a travel agency. The
selection of flight connections can be limited to particular selection criteria. Additionally, details about the selected flight connections can be displayed.

Process Flow
Get flight connection list (function:
Get Flight Connection List)
Get flight connection details (function:
Get Flight Connection Details)

Result
The system gets a list of flight connections with the most important information about the flight connections (departure location, destination, and so on). Additional
detailed data (about availability in particular) is returned for selected flight connections.

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 5 of 21

Example
The scenario is illustrated in the following graphic.

Booking a Flight Trip


Purpose
In this scenario, flight customers book a flight trip in the Web application of a travel agency. The flight customers first have to look for a suitable flight connection for
the outbound flight and, optionally, for the return flight. Once suitable flights have been found, the customers must then identify themselves as customers of the
travel agency before the flight trip can be booked. If they are new customers, they have to register with the travel agency and then each set up a Web user. If the
customers have already registered, they have to log on as a Web user with the corresponding password (see also the scenario
Administration of Customer Data). The customers then have to enter the necessary information to book the flight trip (flight class, name, and date of birth of the
passengers), and can arrange for the flight trip to be booked.

Process Flow
Get flight connection list for outbound flight and, optionally, for return flight (function:
Get Flight Connection List)
Get details for selected flight connections (can run more than once) (function:
Get Flight Connection Details)
Manage customer data (see scenario
Administration of Customer Data):
1. (For new customers)
Create flight customer data (function:
Create Flight Customer Data).
(For new customers without a Web user) Set up Web user (function:
Set Up Web User)
(For registered customers)
Log on to the Web application (function:
Check Web Password).
Note: In the following graphic, only case c. is shown.
6. Create Flight Trip (function:
Create Flight Trip)

Result
A flight trip is created and a trip number is generated. When the flight trip is booked, the travel agency automatically ensures that all the required seats are
booked with the relevant airlines.

Example
The scenario is illustrated in the following graphic.

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 6 of 21

Canceling a Flight Trip


Purpose
In this scenario, a flight customer cancels a flight trip in the Web application of a travel agency. To do this, the customer has to first log on to the Web application
(scenario
Administration of Customer Data). If the customer does not know the number of the flight trip, the customer can look for the flight trip (scenario Looking For a Flight
Trip).

Process Flow
Log on to the Web application (function:
Check Web Password).
(Optional)
Look for the flight trip (function
Get Flight Trip List)
Cancel flight trip (function:
1.1.4.21 Cancel Flight Trip)

Result
The flight trip is canceled at the travel agency. Additionally, all flight bookings that were made when the flight trip was created are canceled with the airlines.

When a flight trip is canceled, you can assume that it the flight customer is registered and has Internet access.

Example
The scenario is illustrated in the following graphic.

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 7 of 21

Looking For a Flight Trip


Purpose
In this scenario, a flight customer displays a list of flight trips in the Web application of a travel agency. The selection of flight trips can be limited to a particular
booking period or trip period. To do this, the customer has to first log on to the Web application (scenario
Administration of Customer Data).

Process Flow
Log on to the Web application (function:
Check Web Password).
Look for the flight trip (function
Get Flight Trip List)

Result
The system gets a list of flight trips of the flight customer with the most important details.

Example
The scenario is illustrated in the following graphic.

1.1.2 User Interface for Travel Agency Employees


Purpose
Travel agency employees work at the front end of a travel agency system. They can access the data of the travel agency and of the customers who are registered
with the travel agency, and perform all tasks that are connected with the administration of customer data and the sale of flight trips.
The same scenarios as in the

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 8 of 21

Web Interface for Travel Agency Customers section are possible here. The difference is that all the steps that are connected with the identification as a user of the
Web application do not apply to the travel agency employees. We can assume that travel agency employees log on to the system once in a day (in the morning),
and are then authorized to perform all the activities in the application. In contrast to Web customers, employees do not need to log on separately to the system
before critical steps such as booking and canceling flight trips.
Here are the differences in detail:
Administration of Customer Data
A travel agency employee can enter a new customers details in the system, and create a corresponding customer data record. All the steps that
are connected with providing or checking the Web user do not apply here.
Looking For a Flight Connection
Booking a Flight Trip
The steps that refer to logging on as a Web user do not apply here. However, if a new customer has to be entered, the employee has to first create a
new customer data record in the travel agency system.
In contrast to the Web application, travel agency employees can book flight trips for all customers.
Canceling a Flight Trip
The steps that refer to logging on as a Web user do not apply here.
In contrast to the Web application, travel agency employees can cancel flight trips for all customers.
Looking For a Flight Trip
The steps that refer to logging on as a Web user do not apply here.
In contrast to the Web application, travel agency employees can look at the flight trips of every customer.

1.1.3 Distributed System Landscape for Travel Agency and


Airline
Purpose
The following scenarios have a distributed system landscape where the travel agency and the airline work and manage their data in different systems.
The tasks are distributed between the travel agency and the airline as follows:
Airline:
The airline performs tasks that are connected with the administration of its flights and bookings (see point 1. Flight Information Application under
Flight Data Application: Overview).
The airline is responsible for the administration of the travel agencies that sell its tickets (see point 3. Administration of Flight Business Partners under
Flight Data Application: Overview).
Note: The airline can also maintain flight customers for direct sales. This is not described in this document.
Travel agency:
The travel agency manages the flight connections that it offers and the flight trips that it has sold (see point 2. Flight Sales System under
Flight Data Application: Overview).
The travel agency determines existing flights but does not get the data about flight availability (see point 1. Flight Information Application under
Flight Data Application: Overview).
The travel agency is responsible for the administration of its customers (see point 3. Administration of Flight Business Partners under
Flight Data Application: Overview).
Note: The travel agency manages copies of the flight data for all airlines (except for time-critical and temporary data about flight availability).

Constraints
In contrast to the scenarios that are described under
Web Interface for Travel Agency Customers and User Interface for Travel Agency Employees, there are the following constraints or additions:
Data about flights (flight schedules) is stored in its original version in the airline system. The airline manages this data since it offers the flights. The flight
schedules have to be replicated from the airline system into the travel agency system and the systems of the other airlines. This ensures that the schedules
are available for travel agency employees and Web customers for additional planning. The data about the availability of each flight is not replicated since it
cannot be guaranteed that this time-critical data is up-to-date. Flight availability has to be looked up in the airline system before every booking transaction
takes place.
A travel agency sells flight trips to customers. These trips can consist of more than one flight (and possibly with different airlines). When a travel agency
sells a flight trip, it must make sure that a flight booking is made with the relevant airline for all the passengers and all the flights. In a distributed system
landscape, these bookings have to be made in multiple systems.
If a flight trip is canceled, all the flight bookings have to be canceled individually with the relevant airlines.

In the following scenarios, only the parts of the process flow are described that refer to the communication between the travel agency system
and the airline system. For simplification, the subscenarios that refer to the interaction between the user (Web customer, see
Web Interface for Travel Agency Customers, travel agency employee, see User Interface for Travel Agency Employees) and the system are omitted here. These
scenarios have already been described under Web Interface for Travel Agency Customers and User Interface for Travel Agency Employees. They do not contain
any new aspects from a technology point of view.

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 9 of 21

Replicating a Flight
Purpose
In this scenario, flight data is replicated from the (original) system of an airline into the travel agency system and the systems of the other airlines. In the airline
system, a flight is selected and the data for this flight is sent to the other systems. The original data for this flight is overwritten in the other systems. This scenario
is used to make the original flight schedules that are in the airline system also available in the travel system and to keep them up-to-date.

The data about the availability of each flight is not replicated since it cannot be guaranteed that this time-critical data is up-to-date.

Process Flow
Look for flight in the airline system (function
Get Flight List)
Initiate the replication of flight data in the airline system (function
Replicate Flight)
Transfer copy of flight data into the recipient system (function
Transfer Copy of Flight Data)

Result
The updated flight data is transferred into all the recipient systems.

1.1.3.2 Checking Availability of a Flight Connection


Purpose
In this scenario, data is retrieved about the availability of all flights (route segments) that belong to a particular flight connection (maximum number of seats and
number of available seats for all three flight classes). You use this scenario to check the current availability of the route segments contained in a flight trip before
you book the flight trip.

Process Flow
Get flight connection details (function:
Get Flight Connection List)
This function determines the availability of all the route segments that belong to a flight connection (by using the function
Get Flight Availability). The availability data is requested in the airline systems.

Result
Availability data is retrieved for all the route segments that belong to a particular flight connection.

Creating a Flight Trip


Purpose
In this scenario, a flight trip is created in a distributed system landscape by the travel agency and an a airline. All the necessary flight bookings are made in the
airline system.

Process Flow
(In the travel agency system:) 1.1.4.20 Create Flight Trip (function:
Create Flight Trip)
In a distributed system landscape, the following substeps of this function are processed:
1. Reserve flight bookings for outbound flight
A reservation is made in the relevant airline system for each route segment and each passenger (function:
Create Flight Booking as Reservation).
2. Optional: Reserve flight bookings for return flight

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 10 of 21

A reservation is made in the relevant airline system for each route segment and each passenger (function:
Create Flight Booking as Reservation).
3. Create flight bookings
Reservations are converted into a binding flight booking if they are confirmed (function:
Confirm Flight Booking).

Result
A flight trip is created, and is assigned a trip number in the travel agency system. All the flights that belong to the flight trip are booked in the airline system. The
data about the availability of the flights that belong to the flight trip is updated in the airline systems.

Example
The scenario is illustrated in the following graphic.

Canceling a Flight Trip


Purpose
The travel agency and the airline can use this scenario to cancel a flight trip in a distributed system landscape. If a flight trip is canceled in a travel agency
system, all the flight bookings that were made when the flight trip was booked are canceled in the airline system. These may also be reservations.

Process Flow
Look for the flight trip (function
Get Flight Trip List)
(In the travel agency system:) Cancel flight trip (function:
1.1.4.21 Cancel Flight Trip)

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 11 of 21

In a distributed system landscape, the following substep of this function is processed:


1. (In the airline system:) Cancel all flight bookings (function:
Cancel Flight Booking)

Result
A flight trip is canceled in the travel agency system. All the flight bookings that are affected by this are canceled in the airline systems. The data about the
availability of the flights that belong to the flight connections is updated in the airline systems.

1.1.4 Functions
Use
The following functions are available for the scenarios of the flight data application.

Features
Get Flight List
Get Flight Details
Get Flight Availability
Transfer Copy of Flight Data
Replicate Flight
Get Flight Booking List
Create Flight Booking
Create Flight Booking as Reservation
Confirm Flight Booking
Cancel Flight Booking
Get Flight Customer List
Create Flight Customer Data
Change Flight Customer Data
Set Up Web User
Check Web Password
Change Web Password
Get Flight Connection List
Get Flight Connection Details
Get Flight Trip List
Create Flight Trip
Cancel Flight Trip

The terms used for a business application are defined in the Flight Data Application: Terminology section.

1.1.4.1 Get Flight List


Use
You use this function to get a list of flights. You can limit the selection of flights to a particular airline, a departure location, a destination, or a period of time. The
most important information about the relevant flights is returned.
This function provides a first point of orientation when you look for flights.

This function is implemented by the method Flight.GetList (function module BAPI_FLIGHT_GETLIST). Read the documentation about this
method, which you can access with the
BAPI Explorer.

1.1.4.2 Get Flight Details

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 12 of 21

Use
You use this function to get detailed information about a particular flight. You have to specify the flight and the flight must exist. Apart from general information,
details about the price and the flight availability are returned. This function provides all the necessary details when you look for a flight so that the flight customer
can decide whether the flight is suitable.

This function is implemented by the method Flight.GetDetail (function module BAPI_FLIGHT_GETDETAIL). Read the documentation about
this method, which you can access with the
BAPI Explorer.

1.1.4.3 Get Flight Availability


Use
You use this function to get information about the availability of a particular flight. You have to specify the flight and the flight must exist. The maximum number of
seats and the number of available seats in the three flight classes are specified for a flight. You use this function if the travel agency and the airline work in
separate systems (see
Distributed System Landscape for Travel Agency and Airline).

This function is implemented by the method Flight.CheckAvailability (function module BAPI_FLIGHT_CHECKAVAILABILITY). Read the
documentation about this method, which you can access with the
BAPI Explorer.

1.1.4.4 Transfer Copy of Flight Data


Use
You use this function if the travel agency and the airlines work in separate systems (see
Distributed System Landscape for Travel Agency and Airline). If the flight data for an airline changes, these changes have to be communicated to and included in
all the other systems.
You can use this method to transfer updated flight data of an airline into a recipient system. When you do so, data about the availability of flights is not replicated.

This function is implemented by the method FlightBooking.SaveReplica (function module BAPI_FLBOOKING_SAVEREPLICA). Read the
documentation about this method, which you can access with the
BAPI Explorer.

1.1.4.5 Replicate Flight


Use
You use this function if the travel agency and the airlines work in separate systems (see
Distributed System Landscape for Travel Agency and Airline). If the flight data for an airline changes, these changes have to be communicated to and included in
all the other systems.
You can use this function to send updated flight data from an airline system to the other systems. When you do so, data about the availability of flights is not
replicated.
Changes to flight data are not automatically communicated to the other systems. This means that if you change flight data, you have to manually replicate the
changes.

This function is implemented by the SAPBC_REPLICATE_FLIGHTS report. Read the documentation about this report.

1.1.4.6 Get Flight Booking List


Use
You use this method to get flight bookings. You can limit the selection of the flight bookings to a particular travel agency, a flight customer, a flight period, or a
booking period. The most important information about the relevant flight bookings is returned.
If you select flight bookings according to customers, note that in some cases the customer cannot be determined unless you specify an airline or a travel agency.

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 13 of 21

This function is implemented by the method FlightBooking.GetList (function module BAPI_FLBOOKING_GETLIST). Read the documentation
about this method, which you can access with the
BAPI Explorer.

1.1.4.7 Create Flight Booking


Use
You use this method to create a new booking for a particular flight.
When you create a new booking, the system assigns a booking number. In addition, the price of the ticket is calculated, which is based on the standard list price
of the flight and contains surcharges for the flight class and any reductions depending on the age of the passenger.

Integration
Compare the functions
Create Flight Booking as Reservation and Confirm Flight Booking.

This function is implemented by the method FlightBooking.CreateFromData (function module BAPI_FLBOOKING_CREATEFROMDATA).


Read the documentation about this method, which you can access with the
BAPI Explorer.

1.1.4.8 Create Flight Booking as Reservation


Use
Alternatively to a flight booking (see function:
Create Flight Booking), a reservation can be made (that is, a flight booking with the status Reserved ).
A reservation is made for a particular flight. In addition, the price of the ticket is calculated, which is based on the standard list price of the flight and contains
surcharges for the flight class and any reductions depending on the age of the passenger.

Integration
Compare the functions
Confirm Flight Booking and Create Flight Booking.

This function is implemented by the method FlightBooking.CreateFromData (function module BAPI_FLBOOKING_CREATEFROMDATA).


Read the documentation about this method, which you can access with the
BAPI Explorer. Note in particular the information about the ReserveOnly parameter.

1.1.4.9 Confirm Flight Booking


Use
You use this function to convert a flight reservation into a legally binding flight booking.
A reserved flight booking is converted into a valid flight booking.

Integration
Compare the functions
Create Flight Booking as Reservation and Create Flight Booking.

This function is implemented by the method FlightBooking.Confirm (function module BAPI_FLBOOKING_CREATEFROMDATA). Read the
documentation about this method, which you can access with the
BAPI Explorer.

1.1.4.10 Cancel Flight Booking


Use
You use this function to cancel a flight booking. You can cancel legally binding flight bookings (compare the function

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 14 of 21

Create Flight Booking) and reservations (compare the function Create Flight Booking as Reservation).

This function is implemented by the method FlightBooking.Cancel (function module BAPI_FLBOOKING_CANCEL). Read the documentation
about this method, which you can access with the
BAPI Explorer.

1.1.4.11 Get Flight Customer List


Use
You use this function to get a list of flight customers. You can limit the selection of flight customers by using the name and Web user name of the flight customer.
The most important information about the relevant customers is returned.

This function is implemented by the method FlightCustomer.GetList (function module BAPI_FLCUST_GETLIST). Read the documentation about
this method, which you can access with the

BAPI Explorer.

1.1.4.12 Create Flight Customer Data


Use
You use this function to create a data record for a flight customer. You can use this function if you want to register a new customer with a travel agency, or if the
customer wants to register for a Web application of a travel agency (compare with
Web Interface for Travel Agency Customers).
When you enter a new customer, the system assigns a customer number.
This function is implemented by the method FlightCustomer.CreateFromData (function module BAPI_FLCUST_CREATEFROMDATA).
Read the documentation about this method, which you can access with the
BAPI Explorer.

1.1.4.13 Change Flight Customer Data


Use
You use this function to change a data record for a flight customer. You can use this function if a customer has a new address, which you need to update in the
system.
This function is implemented by the method FlightCustomer.Change (function module BAPI_FLCUST_CHANGE). Read the
documentation about this method, which you can access with the
BAPI Explorer.

1.1.4.14 Set Up Web User


Use
This function is used for the administration of Internet authorizations for flight customers. It can be used to grant a flight customer access authorization to an Internet
application.
This function can be used in a Web application of a travel agency. To make the Web application user-friendly, the flight customer has the option of choosing a
Web user name. This Web user name (and a password) is required for logging on to the Internet application.
This function is implemented by the FlightCustomer.EnableWebUse method (BAPI_FLCUST_ENABLEWEBUSE function module). Read
the documentation about this method, which you can access with the
BAPI Explorer.

1.1.4.15 Check Web Password


Use
This function is used for the administration of Internet authorizations for flight customers. It can be used to check the Web password of a flight customer.
This function can be used in a Web application of a travel agency.
This function is implemented by the FlightCustomer.CheckPassword method (BAPI_FLCUST_CHECKPASSWORD function module).
Read the documentation about this method, which you can access with the

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 15 of 21

Read the documentation about this method, which you can access with the
BAPI Explorer.

1.1.4.16 Change Web Password


Use
This function is used for the administration of Internet authorizations for flight customers. It can be used to change the Web password of a flight customer.
This function can be used in a Web application of a travel agency.

This function is implemented by the FlightCustomer.ChangePassword method (BAPI_FLCUST_CHANGEPASSWORD function module).


Read the documentation about this method, which you can access with the
BAPI Explorer.

1.1.4.17 Get Flight Connection List


Use
You can use this function to get a list of flight connections that are sold by a travel agency. You can limit the selection of flight connections to a particular departure
location, a destination, or a period of time. The most important information about the relevant flight connections is returned.
This function provides a first point of orientation when you look for a flight connection.

This function is implemented by the method FlightConnection.GetList (function module BAPI_FLCONN_GETLIST). Read the documentation
about this method, which you can access with the
BAPI Explorer.

1.1.4.18 Get Flight Connection Details


Use
You use this function to get detailed information about a particular flight connection. You have to specify the flight connection and the flight must exist. The following
information is returned for the flight connection: general connection data, price of the connection, and a list of the route segments including seat availability.
This function provides all the necessary details when you look for a flight connection so that the flight customer can decide whether the flight connection is suitable.

This function is implemented by the method FlightConnection.GetDetail (function module BAPI_FLCONN_GETDETAIL). Read the
documentation about this method, which you can access with the
BAPI Explorer.

1.1.4.19 Get Flight Trip List


Use
You use this function to determine all the flight trips that were booked at one travel agency. You can limit the selection of the flight bookings to a flight customer, a
flight period, or a booking period. The most important information about the relevant flight trips is returned.

This function is implemented by the method FlightTrip.GetList (function module BAPI_FLTRIP_GETLIST). Read the documentation about this
method, which you can access with the
BAPI Explorer.

1.1.4.20 Create Flight Trip


Use
You use this function to create a new flight trip.
A flight trip is created in the travel agency system. All the necessary flight bookings are made with the airline(s). When you create a new flight trip, the system
assigns a trip number. In addition, the price of the ticket is calculated, which is based on the standard list price of the flights and contains surcharges for the flight
class and any reductions depending on the age of the passenger.

This function is implemented by the method FlightTrip.Create (function module BAPI_FLTRIP_CREATE). Read the documentation about this

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 16 of 21

method, which you can access with the


BAPI Explorer.

1.1.4.21 Cancel Flight Trip


Use
You use this function to cancel a flight trip.
A flight trip is canceled in the travel agency system. Additionally, all the flight bookings that belong to the flight trip are canceled with the airlines.
This function is implemented by the method FlightTrip.Cancel (function module BAPI_FLTRIP_CANCEL). Read the documentation about
this method, which you can access with the
BAPI Explorer.

Flight Data Application: Terminology


Flight
A flight is a service provided by an airline to transport customers by aircraft from a departure location to a destination on a certain date and at a certain time.
Flight connection
A flight connection is an offer by a travel agency for a direct or an indirect flight. An indirect flight consists of multiple route segments.
Note: Not every travel agency has to have all possible flight connections in its system.
Flight booking
A flight booking is a seat reservation for a flight with an airline.
Flight trip
A flight trip consists of an outbound flight and, optionally, a return flight. Booking a flight trip constitutes a binding contract between the flight customer and
the travel agency. A flight trip can be booked for more than one passenger.
Travel agency
A travel agency is an airline partner. Airlines can offer their flights and sell tickets through a travel agency. Customers can book flight trips at a travel
agency and, in doing so, buy tickets from airlines.
Flight customer
A flight customer is a business partner who can make flight bookings at a travel agency or with an airline.
Note: In the scenarios that are specified in the
Web Interface for Travel Agency Customers section, flight customers can register as a Web user for the Web application of the travel agency. Customers then
receive a customer ID and a password for accessing this Web application.

1.2 Testing the Flight Data Application


Use
Currently there is no user interface for testing the scenarios of the flight data application.
You can, however, test individual functions. In the
Functions section under the description of the functions, there is a list of the corresponding function modules and programs. You can test/execute them in the
Function Builder (SE37) or in the ABAP Editor (SE38).

Procedure
From the SAP flight data model, the following tables are of interest for this application: SCARR (airlines), SPFLI (flight schedules), SFLIGHT (flights), SBOOK
(flight bookings), SCUSTOM (flight customers), SFLCONN (flight connections), SFLCONNPOS (route segments of flight connections), SFLTRIP (flight trips),
SFLTRIPPOS (flight trip passengers), and SFLTRIPBOK (booking numbers for flight trips).
Use the Data Browser (SE16) to get existing data from the tables of the flight data model. You can use this data to find suitable entry data to test functions and
check the results of the test.
To test the functions, the tables of the flight data application must be filled with data. For information about filling the tables with suitable data, see
Setting Up the Flight Data Application.

Example
Example 1:
You are interested in implementing a GetDetail BAPI. For this purpose, you could test the method Flight.GetDetail. First go to the Data Browser and determine
existing flights in the SFLIGHT table. In this table you find a flight LH 400 on January 1, 2002, for example. You can now test the function module
BAPI_FLIGHT_GETDETAIL for this flight. You get detailed information that you can compare with the data in the SFLIGHT table and the SPFLI table (for LH 400).
Example 2:
You are interested in implementing a (potentially) distributed scenario ( look for flight connection , for example). First you test the function module
BAPI_FLCONN_GETLIST in the travel agency system. You can limit the test to a departure location, destination, or a time period. You get a list of flight

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 17 of 21

connections Now test the function module BAPI_FLCONN_GETDETAIL and enter the ID of one of the flight connections in the list. You get detailed data about the
flight connection that you can check in the tables SFLCONN, SFLCONNPOS, and SPFLI. You can also see the number of available seats for all route segments
of the flight connection. To check whether this data is correct, you can look at the flight data in the SFLIGHT table in the original system of the relevant airline.

The BAPI concept ensures that BAPIs do not drop Commit Work commands. Write BAPIs can be tested in the Function Builder but the results are
not written to the database since no commit command is executed.
Therefore, if you want to test write BAPIs create a test report. This report first calls the relevant function module with the corresponding data. Then the
command Commit Work is executed. If the report is executed successfully, the changed data can be checked in the database tables.

Internal note:
The complete scenario was set up as a distributed ALE scenario in internal SAP demo systems. For information about this demo scenario, go to the
integration alias in SAPNet and then IBF Standards . This includes the following: Availability, systems, users, and test procedure. You are then
able to examine and test a distributed scenario that has already been set up without having to make all the necessary ALE settings yourself.

1.3 Setting Up the Flight Data Application


Use
The flight data application can be set up in demonstration systems for training or demonstration purposes. This section contains information about what settings to
make.

Flight Data Application in a Central System


The flight data application can be set up in one logical system. This means that the travel agency and all the airlines work in the same system.

This could happen if, for example, an application service provider offers its services to all involved parties but the technical realization
occurs in one system.
However, ALE-relevant concepts cannot be demonstrated in this configuration.
Only one setting is required:
1. In the system, go to the ABAP Editor (SE38) and execute the SAPBC_DATA_GENERATOR program. This program generates suitable sample data in the
tables of the flight data application, and initializes the number ranges, for example. Note the program completely deletes any existing data.
After this program has run, you can test the application as described in the
Testing the Flight Data Application.

Flight Data Application in Distributed Systems


The flight data application can also be set up in multiple logical systems. To do so, the travel agency and all the airlines each have to work in one fixed system.
You can group multiple airlines (or the travel agency and the airlines) in one system. However, ALE-relevant concepts cannot be demonstrated well in this
configuration.
You have to make the following settings:
1. Model the distribution. To do this, group the airlines (and the travel agency) that you want to work in one logical system. Give all the logical systems a name.
Decide which physical systems the logical systems will work in.
Example
Logical System

Physical System

Business Partner

TRAVAGENCY

T01(000)

Travel agency

AIRLINE1

T02(000)

LH, SQ, UA

AIRLINE2

T02(001)

AA, DL, QF

We recommend that you put the travel agency and two groups of airlines together (see example). This makes the model complex enough for
a useful recipient determination while keeping administration effort to a minimum.
To reduce the administration effort even more, we recommend that you install different logical systems in different clients of a physical
system.
2. Fill all logical systems with standard data. To do this, go to the ABAP Editor (SE38) and execute the SAPBC_DATA_GENERATOR program in each
system and client. This program generates suitable sample data in the tables of the flight data application, and initializes the number ranges, for example.
Note that the program completely deletes any existing data.
Since the flight data is client-specific, you have to execute the program in all the relevant clients.
It is also important that you execute the program in all the relevant systems on the same day. Since some of the generated data depends on the day
of execution, this is the only way of guaranteeing a consistent dataset.
3. Change the flight data in such a way that the distribution of data is reflected correctly. To do this, go to the ABAP Editor and execute the

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 18 of 21

SAPBC_DATA_GENERATOR_ALE program in each system and client. For this you need to specify which airlines have their original data in each system.
After step 2, identical flight data is available in all the systems. After step 3, general data and airline-specific data is available in every system
(identical in every system).
For more information, see the program documentation.
4. Maintain all the necessary ALE-relevant settings such as logical systems, RFC connections, ports, and so on.
5. Maintain the ALE distribution model. Create a new distribution model for this purpose. Maintain all the necessary connections. These are shown in the
following table:
Sender

Recipient

BAPI

Note

Travel agency

Airline n

Flight.CheckAvailability

Filter AIRLINEID for FG

Travel agency

Airline n

FlightBooking.CreateFromData

Filter AIRLINEID for FG

Travel agency

Airline n

FlightBooking.Confirm

Filter AIRLINEID for FG

Travel agency

Airline n

FlightBooking.Cancel

Filter AIRLINEID for FG

Airline n

Travel agency

Flight.SaveReplica

Airline n

Airline m

Flight.SaveReplica

This means that you have to maintain the first four entries from the travel agency for each recipient system that contains the original data of at least
one airline. If there is more than one airline system, you have to enter filter values for the AIRLINEID filter for all entries.
For the Flight.SaveReplica method, you have to determine a connection from each airline to the travel agency and to every other airline. You do not
need to set a filter.
6. Travel agencies sometimes request flight bookings but do not confirm them. These flight bookings need to be canceled after a grace period (24 hours) so
that the seats are not blocked unnecessarily. The SAPBC_CANCEL_RESERVATIONS program performs this task. Execute this program at regular
intervals. Schedule it as a job to be executed every night, for example.
7. If you change flight data (SFLIGHT table) after the data has been generated (steps 2 and 3), you must also make these changes in all the other systems.
First change the data in the original system of the airline. Then use the SAPBC_REPLICATE_FLIGHTS program to replicate the data in all the other
systems. The prerequisite for this is that the distribution model and all the other ALE settings have been maintained completely.

1.4 Technologies and Concepts


The flight data application was created to demonstrate as many technologies and concepts in the integration technology environment as possible by using real
examples.
This section gives an introduction to the flight data application from a technical point of view. If you are looking for an example of a particular concept or detail, this
section contains a reference to the corresponding example. However, this section does not explain each concept (see the relevant guides for each concept); it
contains only notes about the objects of the flight data application that are suitable for demonstrating the concepts.
The following topics can currently be demonstrated with the flight data application:
General BAPI concept
Technology/Concept

Example

Business objects in the BOR

Business objects SFLIGHT (Flight) and SBOOK (FlightBooking)

Generic object services in the BOR

Business object SFLIGHT (Flight), attribute FlightID

BAPI Design
Technology/Concept

Example

Instance and class methods

FlightBooking.GetList for a class method


FlightBooking.Cancel for an instance method
FlightBooking.CreateFromData for a create method

Standardized BAPI methods

Flight.GetList, Flight.GetDetail, FlightBooking.CreateFromData,


FlightBooking.Cancel, FlightCustomer.Change, Flight.SaveReplica

Standardized parameters

Parameter CustomerDataX for FlightCustomer.Change for a change parameter


Parameter ExtensionIn and ExtensionOut for Flight.GetDetail for extension
parameter
Return parameter for each of the flight BAPIs (Flight.GetDetail, for example)
DateRange parameter for Flight.GetList for a selection parameter
TestRun parameter for FlightBooking.Confirm for a TestRun parameter

Implementation of BAPI Data Structures


Technology/Concept

Example

Using data structures that begin with BAPI*

See all parameters of all BAPI methods


Note especially English field names, no includes or appends, use of existing
data elements, maintaining search helps/check tables, use of internal data
formats

Dealing with currency fields

Flight.GetDetail method, FlightData parameter (BAPISFLDAT Dictionary


structure), PRICE field

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 19 of 21

Dealing with ISO codes

For currency codes see the Flight.GetDetail method (for example), FlightData
parameter (BAPISFLDAT Dictionary structure), CURR and CURR_ISO fields
For unit of measure codes, see the Flight.GetDetail method (for example),
AdditionalData parameter (BAPISFLADD Dictionary structure), UNIT and
UNIT_ISO fields
For country codes, see the FlightCustomer.CreateFromData method (for
example), CustomerData parameter (BAPISCUNEW Dictionary structure),
COUNTR and COUNTR_ISO fields
For language codes, see the FlightCustomer.CreateFromData method (for
example), CustomerData parameter (BAPISCUNEW Dictionary structure),
LANGU and LANGU_ISO fields

Dealing with date fields

Flight.GetDetail method, FlightDate parameter (BAPISFLKEY Dictionary


structure, FLIGHTDATE field)

Defining the Interface of the Function Module


Technology/Concept

Example

Dealing with ID fields of business objects

See the BAPI Design section: examples for instance, class, and create
methods

Return parameter uses BAPIRET2 structure

See all BAPI methods

Implementing the Function Module


Technology/Concept

Example

Database changes due to an update

Flight.SaveReplica method (BAPI_FLIGHT_SAVEREPLICA function module);


this module uses the SAPBC_FLIGHT_REPLICA_UPDATE update module
No write BAPIs have a commit command

Authorization checks

Flight.GetDetail method; S_FLBOOK authorization object is queried here

Returning error messages

See all BAPI methods In the source code, the BALW_BAPIRETURN_GET2


module is used to fill the return parameter

Using mapping modules for converting between internal and external data
formats

A conversion from external to internal is in the FlightCustomer.CreateFromData


method, for example.
The MAP2I_BAPISCUNEW_TO_SCUSTOM mapping module is used.
A conversion from internal to external is in the Flight.GetDetail method, for
example.
The MAP2E_SFLIGHTS2_TO_BAPISFLADD mapping module is used.

Special BAPI Topics


Technology/Concept

Example

Mass data-enabled BAPIs

FlightCustomer.CreateFromData method
(BAPI_FLBOOKING_CREATEFROMDATA function module)

BAPIs in the DX Workbench

FlightCustomer project in the DX Workbench


FlightCustomer.CreateFromData method
(BAPI_FLBOOKING_CREATEFROMDATA function module) for implementing
a suitable BAPIs

Use of BAPIs in ABAP programs


Technology/Concept

Example

Use of BAPIs in ABAP programs

SAPBC_REPLICATE_FLIGHTS report or BAPI_FLTRIP_CREATE function


module

BAPIs in Application Link Enabling (ALE)


Technology/Concept

Example

Generation of ALE interfaces (IDocs) from BAPIs

The generated ALE interfaces for the FlightBooking.CreateFromData,


FlightBooking.Confirm, or FlightBooking.Cancel methods

Synchronous call of a BAPI (including query of ALE distribution model)

FlightConnection.GetDetail method calls the Flight.CheckAvailability method

Asynchronous call of a BAPI (including query of ALE distribution model)

FlightTrip.Create method calls the FlightBooking.Confirm method

Using filters for determining recipients

FlightConnection.GetDetail method; when Flight.CheckAvailability is called, the


AIRLINEID filter object type is queried

BAPIs in the Interface Repository


Technology/Concept

Example

BAPIs in the Interface Repository

See http://ifr.sap.com under SAP BASIS Release 6.10 Basis


Components ABAP Workbench

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 20 of 21

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 21 of 21

S-ar putea să vă placă și