SAP TP_GET_PNR_IN_QUEUE Function Module for
TP_GET_PNR_IN_QUEUE is a standard tp get pnr in queue SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 tp get pnr in queue FM, simply by entering the name TP_GET_PNR_IN_QUEUE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FITP_GEN
Program Name: SAPLFITP_GEN
Main Program: SAPLFITP_GEN
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TP_GET_PNR_IN_QUEUE 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 'TP_GET_PNR_IN_QUEUE'".
EXPORTING
PROVIDER = "Reservation System
CONTEXT = "Plan Variant Number (Sequential Number)
OFFICE = "Sales Office
QUEUE_NR = "Queue
QUEUECAT_NR = "Queue Category
QUEUESTA = "
IMPORTING
RECORD_LOCATOR = "Passenger Name Record Locator
TABLES
* PNR_MAIN_OUT = "PNR Main
* PNR_FOP_OUT = "PNR Payment Mode
* PNR_REMARKS_OUT = "PNR Remarks
* PNR_FQTV_OUT = "PNR Frequent Flyer
* PNR_SEAT_OUT = "PNR Seat
* PNR_SEAT_DETAILS_OUT = "PNR Seat Details
* PNR_MISC_SSR_OUT = "PNR SSR Miscellaneous
* PNR_OSI_OUT = "PNR OSI
* PNR_TK_ELEMENT_OUT = "PNR Flight Ticket Line
* PNR_SEGMENT_ASSOCIATION = "PNR Segment Link
* PNR_ACKNOWLEDGEMENT = "PNR receipt message
* PNR_NAME_OUT = "PNR Name
* PNR_FLIGHT_OUT = "PNR flight
* PNR_HOTEL_OUT = "PNR Hotel
* PNR_CAR_OUT = "PNR car rental
* PNR_OTHER_SERVICE_OUT = "PNR Additional Service
* PNR_AUXILIARY_OUT = "PNR auxiliary
* PNR_ADDRESS_OUT = "PNR address
* PNR_PHONE_OUT = "PNR Telephone
EXCEPTIONS
NO_DESTINATION = 1 INVALID_CONTEXT = 2 CONNECTION_ERROR = 3 RFC_ERROR = 4 API_ERROR = 5 INVALID_SYSTEM = 6 OTHER_ERROR = 7
IMPORTING Parameters details for TP_GET_PNR_IN_QUEUE
PROVIDER - Reservation System
Data type: TA20BA-RES_SYSTEMOptional: No
Call by Reference: No ( called with pass by value option)
CONTEXT - Plan Variant Number (Sequential Number)
Data type: FTPT_VARIANT-VARIANTOptional: No
Call by Reference: No ( called with pass by value option)
OFFICE - Sales Office
Data type: OFFICEOptional: No
Call by Reference: No ( called with pass by value option)
QUEUE_NR - Queue
Data type: QUEUENROptional: No
Call by Reference: No ( called with pass by value option)
QUEUECAT_NR - Queue Category
Data type: QUEUECATOptional: No
Call by Reference: No ( called with pass by value option)
QUEUESTA -
Data type: CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TP_GET_PNR_IN_QUEUE
RECORD_LOCATOR - Passenger Name Record Locator
Data type: FTPT_VARIANT-REC_LOCATOROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TP_GET_PNR_IN_QUEUE
PNR_MAIN_OUT - PNR Main
Data type: FTPS_API_PNR_MAINOptional: Yes
Call by Reference: Yes
PNR_FOP_OUT - PNR Payment Mode
Data type: FTPS_API_PNR_FOPOptional: Yes
Call by Reference: Yes
PNR_REMARKS_OUT - PNR Remarks
Data type: FTPS_API_PNR_REMARKSOptional: Yes
Call by Reference: Yes
PNR_FQTV_OUT - PNR Frequent Flyer
Data type: FTPS_API_PNR_FQTVOptional: Yes
Call by Reference: Yes
PNR_SEAT_OUT - PNR Seat
Data type: FTPS_API_PNR_SEATOptional: Yes
Call by Reference: Yes
PNR_SEAT_DETAILS_OUT - PNR Seat Details
Data type: FTPS_API_PNR_SEAT_DETAILSOptional: Yes
Call by Reference: Yes
PNR_MISC_SSR_OUT - PNR SSR Miscellaneous
Data type: FTPS_API_PNR_SSR_MISCOptional: Yes
Call by Reference: Yes
PNR_OSI_OUT - PNR OSI
Data type: FTPS_API_PNR_OSIOptional: Yes
Call by Reference: Yes
PNR_TK_ELEMENT_OUT - PNR Flight Ticket Line
Data type: FTPS_API_PNR_TK_ELEMOptional: Yes
Call by Reference: Yes
PNR_SEGMENT_ASSOCIATION - PNR Segment Link
Data type: FTPS_API_PNR_SEG_ASSOCOptional: Yes
Call by Reference: Yes
PNR_ACKNOWLEDGEMENT - PNR receipt message
Data type: FTPS_API_PNR_ACK_DATAOptional: Yes
Call by Reference: Yes
PNR_NAME_OUT - PNR Name
Data type: FTPS_API_PNR_NAMEOptional: Yes
Call by Reference: Yes
PNR_FLIGHT_OUT - PNR flight
Data type: FTPS_API_PNR_FLIGHTOptional: Yes
Call by Reference: Yes
PNR_HOTEL_OUT - PNR Hotel
Data type: FTPS_API_PNR_HOTELOptional: Yes
Call by Reference: Yes
PNR_CAR_OUT - PNR car rental
Data type: FTPS_API_PNR_CAROptional: Yes
Call by Reference: Yes
PNR_OTHER_SERVICE_OUT - PNR Additional Service
Data type: FTPS_API_PNR_OTHER_SERVICEOptional: Yes
Call by Reference: Yes
PNR_AUXILIARY_OUT - PNR auxiliary
Data type: FTPS_API_PNR_AUXILIARYOptional: Yes
Call by Reference: Yes
PNR_ADDRESS_OUT - PNR address
Data type: FTPS_API_PNR_ADDRESSOptional: Yes
Call by Reference: Yes
PNR_PHONE_OUT - PNR Telephone
Data type: FTPS_API_PNR_PHONEOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_DESTINATION -
Data type:Optional: No
Call by Reference: Yes
INVALID_CONTEXT -
Data type:Optional: No
Call by Reference: Yes
CONNECTION_ERROR -
Data type:Optional: No
Call by Reference: Yes
RFC_ERROR -
Data type:Optional: No
Call by Reference: Yes
API_ERROR -
Data type:Optional: No
Call by Reference: Yes
INVALID_SYSTEM -
Data type:Optional: No
Call by Reference: Yes
OTHER_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TP_GET_PNR_IN_QUEUE 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_provider | TYPE TA20BA-RES_SYSTEM, " | |||
| lt_pnr_main_out | TYPE STANDARD TABLE OF FTPS_API_PNR_MAIN, " | |||
| lv_no_destination | TYPE FTPS_API_PNR_MAIN, " | |||
| lv_record_locator | TYPE FTPT_VARIANT-REC_LOCATOR, " | |||
| lt_pnr_fop_out | TYPE STANDARD TABLE OF FTPS_API_PNR_FOP, " | |||
| lt_pnr_remarks_out | TYPE STANDARD TABLE OF FTPS_API_PNR_REMARKS, " | |||
| lt_pnr_fqtv_out | TYPE STANDARD TABLE OF FTPS_API_PNR_FQTV, " | |||
| lt_pnr_seat_out | TYPE STANDARD TABLE OF FTPS_API_PNR_SEAT, " | |||
| lt_pnr_seat_details_out | TYPE STANDARD TABLE OF FTPS_API_PNR_SEAT_DETAILS, " | |||
| lt_pnr_misc_ssr_out | TYPE STANDARD TABLE OF FTPS_API_PNR_SSR_MISC, " | |||
| lt_pnr_osi_out | TYPE STANDARD TABLE OF FTPS_API_PNR_OSI, " | |||
| lt_pnr_tk_element_out | TYPE STANDARD TABLE OF FTPS_API_PNR_TK_ELEM, " | |||
| lt_pnr_segment_association | TYPE STANDARD TABLE OF FTPS_API_PNR_SEG_ASSOC, " | |||
| lt_pnr_acknowledgement | TYPE STANDARD TABLE OF FTPS_API_PNR_ACK_DATA, " | |||
| lv_context | TYPE FTPT_VARIANT-VARIANT, " | |||
| lt_pnr_name_out | TYPE STANDARD TABLE OF FTPS_API_PNR_NAME, " | |||
| lv_invalid_context | TYPE FTPS_API_PNR_NAME, " | |||
| lv_office | TYPE OFFICE, " | |||
| lt_pnr_flight_out | TYPE STANDARD TABLE OF FTPS_API_PNR_FLIGHT, " | |||
| lv_connection_error | TYPE FTPS_API_PNR_FLIGHT, " | |||
| lv_queue_nr | TYPE QUEUENR, " | |||
| lv_rfc_error | TYPE QUEUENR, " | |||
| lt_pnr_hotel_out | TYPE STANDARD TABLE OF FTPS_API_PNR_HOTEL, " | |||
| lv_api_error | TYPE FTPS_API_PNR_HOTEL, " | |||
| lt_pnr_car_out | TYPE STANDARD TABLE OF FTPS_API_PNR_CAR, " | |||
| lv_queuecat_nr | TYPE QUEUECAT, " | |||
| lv_queuesta | TYPE CHAR1, " | |||
| lv_invalid_system | TYPE CHAR1, " | |||
| lt_pnr_other_service_out | TYPE STANDARD TABLE OF FTPS_API_PNR_OTHER_SERVICE, " | |||
| lv_other_error | TYPE FTPS_API_PNR_OTHER_SERVICE, " | |||
| lt_pnr_auxiliary_out | TYPE STANDARD TABLE OF FTPS_API_PNR_AUXILIARY, " | |||
| lt_pnr_address_out | TYPE STANDARD TABLE OF FTPS_API_PNR_ADDRESS, " | |||
| lt_pnr_phone_out | TYPE STANDARD TABLE OF FTPS_API_PNR_PHONE. " |
|   CALL FUNCTION 'TP_GET_PNR_IN_QUEUE' " |
| EXPORTING | ||
| PROVIDER | = lv_provider | |
| CONTEXT | = lv_context | |
| OFFICE | = lv_office | |
| QUEUE_NR | = lv_queue_nr | |
| QUEUECAT_NR | = lv_queuecat_nr | |
| QUEUESTA | = lv_queuesta | |
| IMPORTING | ||
| RECORD_LOCATOR | = lv_record_locator | |
| TABLES | ||
| PNR_MAIN_OUT | = lt_pnr_main_out | |
| PNR_FOP_OUT | = lt_pnr_fop_out | |
| PNR_REMARKS_OUT | = lt_pnr_remarks_out | |
| PNR_FQTV_OUT | = lt_pnr_fqtv_out | |
| PNR_SEAT_OUT | = lt_pnr_seat_out | |
| PNR_SEAT_DETAILS_OUT | = lt_pnr_seat_details_out | |
| PNR_MISC_SSR_OUT | = lt_pnr_misc_ssr_out | |
| PNR_OSI_OUT | = lt_pnr_osi_out | |
| PNR_TK_ELEMENT_OUT | = lt_pnr_tk_element_out | |
| PNR_SEGMENT_ASSOCIATION | = lt_pnr_segment_association | |
| PNR_ACKNOWLEDGEMENT | = lt_pnr_acknowledgement | |
| PNR_NAME_OUT | = lt_pnr_name_out | |
| PNR_FLIGHT_OUT | = lt_pnr_flight_out | |
| PNR_HOTEL_OUT | = lt_pnr_hotel_out | |
| PNR_CAR_OUT | = lt_pnr_car_out | |
| PNR_OTHER_SERVICE_OUT | = lt_pnr_other_service_out | |
| PNR_AUXILIARY_OUT | = lt_pnr_auxiliary_out | |
| PNR_ADDRESS_OUT | = lt_pnr_address_out | |
| PNR_PHONE_OUT | = lt_pnr_phone_out | |
| EXCEPTIONS | ||
| NO_DESTINATION = 1 | ||
| INVALID_CONTEXT = 2 | ||
| CONNECTION_ERROR = 3 | ||
| RFC_ERROR = 4 | ||
| API_ERROR = 5 | ||
| INVALID_SYSTEM = 6 | ||
| OTHER_ERROR = 7 | ||
| . " TP_GET_PNR_IN_QUEUE | ||
ABAP code using 7.40 inline data declarations to call FM TP_GET_PNR_IN_QUEUE
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 RES_SYSTEM FROM TA20BA INTO @DATA(ld_provider). | ||||
| "SELECT single REC_LOCATOR FROM FTPT_VARIANT INTO @DATA(ld_record_locator). | ||||
| "SELECT single VARIANT FROM FTPT_VARIANT INTO @DATA(ld_context). | ||||
Search for further information about these or an SAP related objects