Fonction SAP BAPI_FLIGHT_GETLIST - Find list of flights

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
AIRLINE BAPISFLKEY-AIRLINEID C 3 X Select airline
DESTINATION_FROM BAPISFLDST u 28 X Select departure city
DESTINATION_TO BAPISFLDST u 28 X Select destination
MAX_ROWS BAPISFLAUX-BAPIMAXROW I 4 X Maximum Number of Lines of Hits

Paramètre Reférence Long. Facultatif Description
DATE_RANGE BAPISFLDRA 19 X Selection range for flight date
EXTENSION_IN BAPIPAREX 990 X Import customer enhancements
EXTENSION_OUT BAPIPAREX 990 X Export customer enhancements
FLIGHT_LIST BAPISFLDAT 121 X List of flights
RETURN BAPIRET2 548 X Return Messages

Functionality
You can use this method to determine available flights. Here you canuse the import parameters to suitably restrict the selection. Thisreturns a list of flights with the most important attributes of theflights given in each case.
INCLUDE DOC_BAPI_DEMO OBJECT DOKU ID TX
INCLUDE DOC_AUTH03 OBJECT DOKU ID TX

Data Selection
The Airline, DestinationFrom, DestinationTo andDateRange parameters help you to restrict the selection. If oneof the parameters is intial, then no restriction of the flight listoccurs for this criterion. Only those flights are selected that satisfyall given conditions (AND relationship).
INCLUDE DOC_PAR1 OBJECT DOKU ID TX
INCLUDE BAPI_CUST1 OBJECT DOKU ID TX
INCLUDE BAPI_CUST_INOUT OBJECT DOKU ID TX
INCLUDE BAPI_CUST2 OBJECT DOKU ID TX
INCLUDE BAPI_RET
INCLUDE BAPI_INFO1 OBJECT DOKU ID TX
INCLUDE BAPI_INFO2 OBJECT DOKU ID TX
INCLUDE DOC_AIRLINE OBJECT DOKU ID TX

Description
You can use this parameter to restrict the selection in terms of thedeparture location. If this parameter is not filled, then norestriction for the choice of departure location occurs.
INCLUDE DOC_FL_DEST1 OBJECT DOKU ID TX
INCLUDE DOC_FL_DEST2 OBJECT DOKU ID TX
INCLUDE BAPI_DATAELEMENT

Example
(): Field not filled
AIRPORTID CITY COUNTR COUNTR_ISO
FRA New York US ()
The code FRA identifies Frankfurt airport uniquely. All flights fromFrankfurt (DE) are selected. The New York and US entries are ignored.
AIRPORTID CITY COUNTR COUNTR_ISO
XYZ New York () ()
There are no airports that have the code XYZ. An error message isgenerated. The New York entry is ignored.
AIRPORTID CITY COUNTR COUNTR_ISO
() Frankfurt () (),,,,,,,,
All flights from Frankfurt are selected. Since no country wasspecified, flights from Frankfurt (US), for example, are also selectedif they are available.
AIRPORTID CITY COUNTR COUNTR_ISO
() () DE US,,,,
All flights from German airports are selected. The US entry is ignored.

Description
You can use this parameter to restrict the selection in terms of thedestination. The parameter is optional. If this parameter is notfilled, then no restriction for the choice of destination occurs.
INCLUDE DOC_FL_DEST1 OBJECT DOKU ID TX
INCLUDE DOC_FL_DEST2 OBJECT DOKU ID TX
INCLUDE BAPI_DATAELEMENT

Example
(): Field not filled
AIRPORTID CITY COUNTR COUNTR_ISO
FRA New York US (),,,,,,
The code FRA identifies Frankfurt airport uniquely. All flights toFrankfurt (DE) are selected. The New York and US entries are completelyignored.
AIRPORTID CITY COUNTR COUNTR_ISO
XYZ New York () ()
There are no airports that have the code XYZ. An error message isgenerated. The New York entry is completely ignored.
AIRPORTID CITY COUNTR COUNTR_ISO
() Frankfurt () (),,,,,,
All flights to Frankfurt are selected. Since no country was specified,flights to Frankfurt (US), for example, are also selected, if they areavailable.
AIRPORTID CITY COUNTR COUNTR_ISO
() () DE US,,,,
All flights to German airports are selected. The US entry is completelyignored.
INCLUDE DOC_MAXROW OBJECT DOKU ID TX
INCLUDE DOC_MAXROW1 OBJECT DOKU ID TX

Description
You can use this parameter to restrict the flight selection to certaindate ranges.
INCLUDE DOC_RANGE1 OBJECT DOKU ID TX
INCLUDE BAPI_EXTIN OBJECT DOKU ID TX
INCLUDE BAPI_EXTOUT OBJECT DOKU ID TX

Description
This parameter returns a hit list of flights that suit the selectionconditions specified in the method call.
The key values and the most important attributes of the respectiveflights are returned.
INCLUDE DOC_CURR_ISO OBJECT DOKU ID TX
You can use the MaxRows parameter to define the length of thehit list.
INCLUDE BAPI_DATAELEMENT
INCLUDE BAPI_TABLE

Value range
Authorization messages
Type ID number message
E BC_IBF 004 No authorization
Value check messages
Type ID number message
E BC_IBF 050 Airline &1 unknown
E BC_IBF 051 Airport with code &1 unknown
E BC_IBF 052 City &1 &2 unknown
W BC_IBF 053 City &1 was found more than once (in different countries)
E BC_IBF 012 Unknown country code &1
E BC_IBF 017 ISO country code &1 unknown
E S& 026 value & in field SIGN can only be I, E
E S& 027 value & in field OPTION is invalid (EQ,NE,GT,GE,LE
,LT,BT,NB,CP,NP)
Other possible messages
Type ID number message
W BC_IBF 056 No flights match the selection conditions
S BC_IBF 000 Method executed successfully
W BC_IBF 015 Error when converting currency
E BC_IBF 001 Errors occurred