SAP RFC_1A_GET_FLIGHT_AVAILABILITY Function Module for Get flight availability based on input









RFC_1A_GET_FLIGHT_AVAILABILITY is a standard rfc 1a get flight availability SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get flight availability based on input processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for rfc 1a get flight availability FM, simply by entering the name RFC_1A_GET_FLIGHT_AVAILABILITY into the relevant SAP transaction such as SE37 or SE38.

Function Group: FITP_AMADEUS_RFC_INTERFACE
Program Name: SAPLFITP_AMADEUS_RFC_INTERFACE
Main Program: SAPLFITP_AMADEUS_RFC_INTERFACE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function RFC_1A_GET_FLIGHT_AVAILABILITY pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RFC_1A_GET_FLIGHT_AVAILABILITY'"Get flight availability based on input
EXPORTING
CONTEXT_HANDLER = "Context handler
S_FLIGHT_AVAIL_IN = "Flight Availability Input 2
I_NB_SCREEN_WANTED = "

IMPORTING
ERROR_TYPE = "Type of API return error code
ERROR_CODE = "Return error code of API interface
NO_MORE_AVAILABLE = "
S_FLIGHT_AVAIL_OUT = "Output structure, a max of 4 recommendations can be returned

TABLES
T_FLT2_AVAIL_TRV_DTL_IN = "List of travel product and city info response
T_FLT2_APPL_ERROR_INFO_OUT = "info relatedo to an app. error, text, type & resp. agency
T_FLT2_AEI_INFO_FREE_TXT_OUT = "Text message pertaining to the request
T_FLT2_AVAIL_TRV_DTL_OUT = "List of travel product and city info response
T_FLT2_ATD_TRAVEL_PRD_INFO_OUT = "List of flight options for an input request.
T_FLT2_TPI_PREF_AIRLINE_OUT = "Preferences for airline, flightnum, op.suffix, class of serv
T_FLT2_TPI_SEQ_NUMBER_OUT = "List of seq. code for the availability information
T_FLT2_TPI_PRD_INFO_DTL_OUT = "Status, class, and modifiers for a generic product.
T_FLT2_TPI_ADD_PRD_DTL_OUT = "Info for additional flight and gate information
T_FLT2_TPI_APD_CODE_OUT = "Index List for Data Type STRING
T_FLT2_TPI_APPL_ERROR_INFO_OUT = "info relatedo to an app. error, text, type & resp. agency
T_FLT2_TRAVEL_PROD_INFO_IN = "List of flight options for an input request.
T_FLT2_TPI_INFO_FREE_TXT_OUT = "Text message pertaining to the request
T_FLT2_TPI_CABIN_DTL_OUT = "cabin type to reduce the availability
T_FLT2_TPI_CBD_PRD_INFODTL_OUT = "Status, class, and modifiers for a generic product.
T_FLT2_TPI_PREF_AIRLINE_IN = "Preferences for airline, flightnum, op.suffix, class of serv
T_FLT2_TPI_SEQ_NUMBER_IN = "List of seq. code for the availability information
T_FLT2_TPI_PRD_INFO_DTL_IN = "Status, class, and modifiers for a generic product.
T_FLT2_TPI_CONNECTION_DTL_IN = "info related to connection city and time between flights
T_FLT2_TPI_CABIN_DTL_IN = "cabin type to reduce the availability
T_FLT2_TPI_CBD_PRD_INFO_DTL_IN = "Status, class, and modifiers for a generic product.
T_FLT2_INFO_FREE_TXT_OUT = "Text message pertaining to the request

EXCEPTIONS
UNEXPECTED_HOST_RESPONSE = 1 EDIFACT_HEADERS_CORRUPT = 2 INCORRECT_LIB_FUNC_CALL = 3 MISSING_MANDATORY_INPUT = 4 UNEXPECTED_HOST_EVENT = 5
.



IMPORTING Parameters details for RFC_1A_GET_FLIGHT_AVAILABILITY

CONTEXT_HANDLER - Context handler

Data type: FTPS_API-CTXTID
Optional: No
Call by Reference: No ( called with pass by value option)

S_FLIGHT_AVAIL_IN - Flight Availability Input 2

Data type: FTPS_API_FLIGHT2_AVAIL_IN
Optional: No
Call by Reference: No ( called with pass by value option)

I_NB_SCREEN_WANTED -

Data type: FTPS_API-INT1
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RFC_1A_GET_FLIGHT_AVAILABILITY

ERROR_TYPE - Type of API return error code

Data type: FTPS_API-ERROR_TYPE
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_CODE - Return error code of API interface

Data type: FTPS_API-ERROR_CODE
Optional: No
Call by Reference: No ( called with pass by value option)

NO_MORE_AVAILABLE -

Data type: FTPS_API-CHAR1
Optional: No
Call by Reference: No ( called with pass by value option)

S_FLIGHT_AVAIL_OUT - Output structure, a max of 4 recommendations can be returned

Data type: FTPS_API_FLIGHT2_AVAIL_OUT
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for RFC_1A_GET_FLIGHT_AVAILABILITY

T_FLT2_AVAIL_TRV_DTL_IN - List of travel product and city info response

Data type: FTPS_API_FLIGHT2_AVAIL_TRV_DTL
Optional: No
Call by Reference: Yes

T_FLT2_APPL_ERROR_INFO_OUT - info relatedo to an app. error, text, type & resp. agency

Data type: FTPS_API_FLIGHT2_APPL_ERR_INFO
Optional: No
Call by Reference: Yes

T_FLT2_AEI_INFO_FREE_TXT_OUT - Text message pertaining to the request

Data type: FTPS_API_FLIGHT2_FREE_TXT
Optional: No
Call by Reference: Yes

T_FLT2_AVAIL_TRV_DTL_OUT - List of travel product and city info response

Data type: FTPS_API_FLIGHT2_AVAIL_TRV_DTL
Optional: No
Call by Reference: Yes

T_FLT2_ATD_TRAVEL_PRD_INFO_OUT - List of flight options for an input request.

Data type: FTPS_API_FLIGHT2_TRV_PRD_INFO
Optional: No
Call by Reference: Yes

T_FLT2_TPI_PREF_AIRLINE_OUT - Preferences for airline, flightnum, op.suffix, class of serv

Data type: FTPS_API_FLIGHT2_PREF_AIRLINE
Optional: No
Call by Reference: Yes

T_FLT2_TPI_SEQ_NUMBER_OUT - List of seq. code for the availability information

Data type: FTPS_API_FLIGHT2_SEQ_NUMBER
Optional: No
Call by Reference: Yes

T_FLT2_TPI_PRD_INFO_DTL_OUT - Status, class, and modifiers for a generic product.

Data type: FTPS_API_FLIGHT2_PRD_INFO_DTL
Optional: No
Call by Reference: Yes

T_FLT2_TPI_ADD_PRD_DTL_OUT - Info for additional flight and gate information

Data type: FTPS_API_FLIGHT2_ADDPRDINFODTL
Optional: No
Call by Reference: Yes

T_FLT2_TPI_APD_CODE_OUT - Index List for Data Type STRING

Data type: FTPS_API_STRING_NODE
Optional: No
Call by Reference: Yes

T_FLT2_TPI_APPL_ERROR_INFO_OUT - info relatedo to an app. error, text, type & resp. agency

Data type: FTPS_API_FLIGHT2_APPL_ERR_INFO
Optional: No
Call by Reference: Yes

T_FLT2_TRAVEL_PROD_INFO_IN - List of flight options for an input request.

Data type: FTPS_API_FLIGHT2_TRV_PRD_INFO
Optional: No
Call by Reference: Yes

T_FLT2_TPI_INFO_FREE_TXT_OUT - Text message pertaining to the request

Data type: FTPS_API_FLIGHT2_FREE_TXT
Optional: No
Call by Reference: Yes

T_FLT2_TPI_CABIN_DTL_OUT - cabin type to reduce the availability

Data type: FTPS_API_FLIGHT2_CABINDETAILS
Optional: No
Call by Reference: Yes

T_FLT2_TPI_CBD_PRD_INFODTL_OUT - Status, class, and modifiers for a generic product.

Data type: FTPS_API_FLIGHT2_PRD_INFO_DTL
Optional: No
Call by Reference: Yes

T_FLT2_TPI_PREF_AIRLINE_IN - Preferences for airline, flightnum, op.suffix, class of serv

Data type: FTPS_API_FLIGHT2_PREF_AIRLINE
Optional: No
Call by Reference: Yes

T_FLT2_TPI_SEQ_NUMBER_IN - List of seq. code for the availability information

Data type: FTPS_API_FLIGHT2_SEQ_NUMBER
Optional: No
Call by Reference: Yes

T_FLT2_TPI_PRD_INFO_DTL_IN - Status, class, and modifiers for a generic product.

Data type: FTPS_API_FLIGHT2_PRD_INFO_DTL
Optional: No
Call by Reference: Yes

T_FLT2_TPI_CONNECTION_DTL_IN - info related to connection city and time between flights

Data type: FTPS_API_FLIGHT2_CONNECTIONDTL
Optional: No
Call by Reference: Yes

T_FLT2_TPI_CABIN_DTL_IN - cabin type to reduce the availability

Data type: FTPS_API_FLIGHT2_CABINDETAILS
Optional: No
Call by Reference: Yes

T_FLT2_TPI_CBD_PRD_INFO_DTL_IN - Status, class, and modifiers for a generic product.

Data type: FTPS_API_FLIGHT2_PRD_INFO_DTL
Optional: No
Call by Reference: Yes

T_FLT2_INFO_FREE_TXT_OUT - Text message pertaining to the request

Data type: FTPS_API_FLIGHT2_FREE_TXT
Optional: No
Call by Reference: Yes

EXCEPTIONS details

UNEXPECTED_HOST_RESPONSE - Unexpected response from the host.

Data type:
Optional: No
Call by Reference: Yes

EDIFACT_HEADERS_CORRUPT - Edifact headers corrupted.

Data type:
Optional: No
Call by Reference: Yes

INCORRECT_LIB_FUNC_CALL - Incorrect Library function called.

Data type:
Optional: No
Call by Reference: Yes

MISSING_MANDATORY_INPUT - Missing mandatory input.

Data type:
Optional: No
Call by Reference: Yes

UNEXPECTED_HOST_EVENT - Unexpected host event.

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RFC_1A_GET_FLIGHT_AVAILABILITY Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_error_type  TYPE FTPS_API-ERROR_TYPE, "   
lv_context_handler  TYPE FTPS_API-CTXTID, "   
lt_t_flt2_avail_trv_dtl_in  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_AVAIL_TRV_DTL, "   
lv_unexpected_host_response  TYPE FTPS_API_FLIGHT2_AVAIL_TRV_DTL, "   
lt_t_flt2_appl_error_info_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_APPL_ERR_INFO, "   
lt_t_flt2_aei_info_free_txt_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_FREE_TXT, "   
lt_t_flt2_avail_trv_dtl_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_AVAIL_TRV_DTL, "   
lt_t_flt2_atd_travel_prd_info_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_TRV_PRD_INFO, "   
lt_t_flt2_tpi_pref_airline_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_PREF_AIRLINE, "   
lt_t_flt2_tpi_seq_number_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_SEQ_NUMBER, "   
lt_t_flt2_tpi_prd_info_dtl_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_PRD_INFO_DTL, "   
lt_t_flt2_tpi_add_prd_dtl_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_ADDPRDINFODTL, "   
lt_t_flt2_tpi_apd_code_out  TYPE STANDARD TABLE OF FTPS_API_STRING_NODE, "   
lt_t_flt2_tpi_appl_error_info_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_APPL_ERR_INFO, "   
lv_error_code  TYPE FTPS_API-ERROR_CODE, "   
lv_s_flight_avail_in  TYPE FTPS_API_FLIGHT2_AVAIL_IN, "   
lv_edifact_headers_corrupt  TYPE FTPS_API_FLIGHT2_AVAIL_IN, "   
lt_t_flt2_travel_prod_info_in  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_TRV_PRD_INFO, "   
lt_t_flt2_tpi_info_free_txt_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_FREE_TXT, "   
lt_t_flt2_tpi_cabin_dtl_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_CABINDETAILS, "   
lt_t_flt2_tpi_cbd_prd_infodtl_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_PRD_INFO_DTL, "   
lv_no_more_available  TYPE FTPS_API-CHAR1, "   
lv_i_nb_screen_wanted  TYPE FTPS_API-INT1, "   
lv_incorrect_lib_func_call  TYPE FTPS_API, "   
lt_t_flt2_tpi_pref_airline_in  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_PREF_AIRLINE, "   
lv_s_flight_avail_out  TYPE FTPS_API_FLIGHT2_AVAIL_OUT, "   
lv_missing_mandatory_input  TYPE FTPS_API_FLIGHT2_AVAIL_OUT, "   
lt_t_flt2_tpi_seq_number_in  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_SEQ_NUMBER, "   
lv_unexpected_host_event  TYPE FTPS_API_FLIGHT2_SEQ_NUMBER, "   
lt_t_flt2_tpi_prd_info_dtl_in  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_PRD_INFO_DTL, "   
lt_t_flt2_tpi_connection_dtl_in  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_CONNECTIONDTL, "   
lt_t_flt2_tpi_cabin_dtl_in  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_CABINDETAILS, "   
lt_t_flt2_tpi_cbd_prd_info_dtl_in  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_PRD_INFO_DTL, "   
lt_t_flt2_info_free_txt_out  TYPE STANDARD TABLE OF FTPS_API_FLIGHT2_FREE_TXT. "   

  CALL FUNCTION 'RFC_1A_GET_FLIGHT_AVAILABILITY'  "Get flight availability based on input
    EXPORTING
         CONTEXT_HANDLER = lv_context_handler
         S_FLIGHT_AVAIL_IN = lv_s_flight_avail_in
         I_NB_SCREEN_WANTED = lv_i_nb_screen_wanted
    IMPORTING
         ERROR_TYPE = lv_error_type
         ERROR_CODE = lv_error_code
         NO_MORE_AVAILABLE = lv_no_more_available
         S_FLIGHT_AVAIL_OUT = lv_s_flight_avail_out
    TABLES
         T_FLT2_AVAIL_TRV_DTL_IN = lt_t_flt2_avail_trv_dtl_in
         T_FLT2_APPL_ERROR_INFO_OUT = lt_t_flt2_appl_error_info_out
         T_FLT2_AEI_INFO_FREE_TXT_OUT = lt_t_flt2_aei_info_free_txt_out
         T_FLT2_AVAIL_TRV_DTL_OUT = lt_t_flt2_avail_trv_dtl_out
         T_FLT2_ATD_TRAVEL_PRD_INFO_OUT = lt_t_flt2_atd_travel_prd_info_out
         T_FLT2_TPI_PREF_AIRLINE_OUT = lt_t_flt2_tpi_pref_airline_out
         T_FLT2_TPI_SEQ_NUMBER_OUT = lt_t_flt2_tpi_seq_number_out
         T_FLT2_TPI_PRD_INFO_DTL_OUT = lt_t_flt2_tpi_prd_info_dtl_out
         T_FLT2_TPI_ADD_PRD_DTL_OUT = lt_t_flt2_tpi_add_prd_dtl_out
         T_FLT2_TPI_APD_CODE_OUT = lt_t_flt2_tpi_apd_code_out
         T_FLT2_TPI_APPL_ERROR_INFO_OUT = lt_t_flt2_tpi_appl_error_info_out
         T_FLT2_TRAVEL_PROD_INFO_IN = lt_t_flt2_travel_prod_info_in
         T_FLT2_TPI_INFO_FREE_TXT_OUT = lt_t_flt2_tpi_info_free_txt_out
         T_FLT2_TPI_CABIN_DTL_OUT = lt_t_flt2_tpi_cabin_dtl_out
         T_FLT2_TPI_CBD_PRD_INFODTL_OUT = lt_t_flt2_tpi_cbd_prd_infodtl_out
         T_FLT2_TPI_PREF_AIRLINE_IN = lt_t_flt2_tpi_pref_airline_in
         T_FLT2_TPI_SEQ_NUMBER_IN = lt_t_flt2_tpi_seq_number_in
         T_FLT2_TPI_PRD_INFO_DTL_IN = lt_t_flt2_tpi_prd_info_dtl_in
         T_FLT2_TPI_CONNECTION_DTL_IN = lt_t_flt2_tpi_connection_dtl_in
         T_FLT2_TPI_CABIN_DTL_IN = lt_t_flt2_tpi_cabin_dtl_in
         T_FLT2_TPI_CBD_PRD_INFO_DTL_IN = lt_t_flt2_tpi_cbd_prd_info_dtl_in
         T_FLT2_INFO_FREE_TXT_OUT = lt_t_flt2_info_free_txt_out
    EXCEPTIONS
        UNEXPECTED_HOST_RESPONSE = 1
        EDIFACT_HEADERS_CORRUPT = 2
        INCORRECT_LIB_FUNC_CALL = 3
        MISSING_MANDATORY_INPUT = 4
        UNEXPECTED_HOST_EVENT = 5
. " RFC_1A_GET_FLIGHT_AVAILABILITY




ABAP code using 7.40 inline data declarations to call FM RFC_1A_GET_FLIGHT_AVAILABILITY

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single ERROR_TYPE FROM FTPS_API INTO @DATA(ld_error_type).
 
"SELECT single CTXTID FROM FTPS_API INTO @DATA(ld_context_handler).
 
 
 
 
 
 
 
 
 
 
 
 
 
"SELECT single ERROR_CODE FROM FTPS_API INTO @DATA(ld_error_code).
 
 
 
 
 
 
 
"SELECT single CHAR1 FROM FTPS_API INTO @DATA(ld_no_more_available).
 
"SELECT single INT1 FROM FTPS_API INTO @DATA(ld_i_nb_screen_wanted).
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!