SAP TP_1A_RAIL_SYNCHRO Function Module for Enable the synchronisation of NVS rail booking
TP_1A_RAIL_SYNCHRO is a standard tp 1a rail synchro SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Enable the synchronisation of NVS rail booking 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 tp 1a rail synchro FM, simply by entering the name TP_1A_RAIL_SYNCHRO into the relevant SAP transaction such as SE37 or SE38.
Function Group: FITP_AMADEUS_RAIL
Program Name: SAPLFITP_AMADEUS_RAIL
Main Program: SAPLFITP_AMADEUS_RAIL
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TP_1A_RAIL_SYNCHRO 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_1A_RAIL_SYNCHRO'"Enable the synchronisation of NVS rail booking.
EXPORTING
PROVIDER = "Provider Code
USER_GROUP = "Grouping: Travel Planning Control Variant
TRANSACTION_MODE = "Transaction mode 'C' when for change / 'D' for display
* SW_PORTAL = "Flag: Portal-Frontend
* ITS_RETURN = "Flag: ITS
CHANGING
VARIANT = "Plan variant number (sequential number)
PTRP_AAA_WORK_AREA = "'X' when PNR is in the Amadeus work area
SAV_BAPIRETTAB = "Table with existing BAPI Return Information
BAPIRETTAB = "Table with new BAPI Return Information
RETURN_CODE = "Return critical errors
TABLES
T_CUSTOMER_PROGRAMS = "HR master record infotype 0475 (customer programs)
T_ITEM = "Travel Service Request Item
T_ITEM_STATUS = "Item status for External Access: Portal Integration
T_TRAIN = "Travel Request Item - Train Service
T_SYNC_DATA = "Data Synchronization: SAP - External System
EXCEPTIONS
GENERAL_API_ERROR = 1 NO_VALID_VARIANT = 10 DISCONNECTION_ERROR = 11 NO_ENTRY_IN_TABLE = 12 NO_DESTINATION_FOUND = 13 APPLICATION_API_ERROR = 2 SEGMENT_SELL_UNSTABLE = 3 INVALID_SYSTEM = 4 INVALID_CONTEXT = 5 CONNECTION_ERROR = 6 OPEN_TRIP_ERROR = 7 NO_DESTINATION = 8 NO_VARIANT_CONNECTED = 9
IMPORTING Parameters details for TP_1A_RAIL_SYNCHRO
PROVIDER - Provider Code
Data type: PROVIDER_CODEOptional: No
Call by Reference: Yes
USER_GROUP - Grouping: Travel Planning Control Variant
Data type: TA20B-USERGOptional: No
Call by Reference: Yes
TRANSACTION_MODE - Transaction mode 'C' when for change / 'D' for display
Data type: CHAR1Optional: No
Call by Reference: Yes
SW_PORTAL - Flag: Portal-Frontend
Data type: CHAR1Optional: Yes
Call by Reference: Yes
ITS_RETURN - Flag: ITS
Data type: NOptional: Yes
Call by Reference: Yes
CHANGING Parameters details for TP_1A_RAIL_SYNCHRO
VARIANT - Plan variant number (sequential number)
Data type: FTPT_VARIANTOptional: No
Call by Reference: Yes
PTRP_AAA_WORK_AREA - 'X' when PNR is in the Amadeus work area
Data type: CHAR1Optional: No
Call by Reference: Yes
SAV_BAPIRETTAB - Table with existing BAPI Return Information
Data type: BAPIRETTABOptional: No
Call by Reference: Yes
BAPIRETTAB - Table with new BAPI Return Information
Data type: BAPIRETTABOptional: No
Call by Reference: Yes
RETURN_CODE - Return critical errors
Data type: SY-SUBRCOptional: No
Call by Reference: Yes
TABLES Parameters details for TP_1A_RAIL_SYNCHRO
T_CUSTOMER_PROGRAMS - HR master record infotype 0475 (customer programs)
Data type: P0475Optional: No
Call by Reference: Yes
T_ITEM - Travel Service Request Item
Data type: FTPT_ITEMOptional: No
Call by Reference: Yes
T_ITEM_STATUS - Item status for External Access: Portal Integration
Data type: FTPS_ITEM_STATUSOptional: No
Call by Reference: Yes
T_TRAIN - Travel Request Item - Train Service
Data type: FTPT_TRAINOptional: No
Call by Reference: Yes
T_SYNC_DATA - Data Synchronization: SAP - External System
Data type: FTPT_SYNC_DATAOptional: No
Call by Reference: Yes
EXCEPTIONS details
GENERAL_API_ERROR - Allgemeiner API-Fehler
Data type:Optional: No
Call by Reference: Yes
NO_VALID_VARIANT - Ungültige Reiseplanvariante
Data type:Optional: No
Call by Reference: Yes
DISCONNECTION_ERROR - Verbindungsfehler
Data type:Optional: No
Call by Reference: Yes
NO_ENTRY_IN_TABLE - Kein Eintrag in der Tabelle
Data type:Optional: No
Call by Reference: Yes
NO_DESTINATION_FOUND - Keine destination gefunden
Data type:Optional: No
Call by Reference: Yes
APPLICATION_API_ERROR - Anwendungsspezifischer API-Fehler
Data type:Optional: No
Call by Reference: Yes
SEGMENT_SELL_UNSTABLE - Amadeus-Errors: -32619 -32618 -32582 -32581 -32580
Data type:Optional: No
Call by Reference: Yes
INVALID_SYSTEM - Ungültiges Reservierungssystem
Data type:Optional: No
Call by Reference: Yes
INVALID_CONTEXT - Ungültiger Kontext
Data type:Optional: No
Call by Reference: Yes
CONNECTION_ERROR - Allgemeiner oder RFC-Verbindungsfehler
Data type:Optional: No
Call by Reference: Yes
OPEN_TRIP_ERROR - Fehler beim Anlegen eines Plans
Data type:Optional: No
Call by Reference: Yes
NO_DESTINATION - Keine RFC-Destination
Data type:Optional: No
Call by Reference: Yes
NO_VARIANT_CONNECTED - Ungültige Reiseplanvariante
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TP_1A_RAIL_SYNCHRO 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_variant | TYPE FTPT_VARIANT, " | |||
| lv_provider | TYPE PROVIDER_CODE, " | |||
| lv_general_api_error | TYPE PROVIDER_CODE, " | |||
| lt_t_customer_programs | TYPE STANDARD TABLE OF P0475, " | |||
| lv_no_valid_variant | TYPE P0475, " | |||
| lv_disconnection_error | TYPE P0475, " | |||
| lv_no_entry_in_table | TYPE P0475, " | |||
| lv_no_destination_found | TYPE P0475, " | |||
| lt_t_item | TYPE STANDARD TABLE OF FTPT_ITEM, " | |||
| lv_user_group | TYPE TA20B-USERG, " | |||
| lv_ptrp_aaa_work_area | TYPE CHAR1, " | |||
| lv_application_api_error | TYPE CHAR1, " | |||
| lt_t_item_status | TYPE STANDARD TABLE OF FTPS_ITEM_STATUS, " | |||
| lv_sav_bapirettab | TYPE BAPIRETTAB, " | |||
| lv_transaction_mode | TYPE CHAR1, " | |||
| lv_segment_sell_unstable | TYPE CHAR1, " | |||
| lt_t_train | TYPE STANDARD TABLE OF FTPT_TRAIN, " | |||
| lv_sw_portal | TYPE CHAR1, " | |||
| lv_bapirettab | TYPE BAPIRETTAB, " | |||
| lv_invalid_system | TYPE BAPIRETTAB, " | |||
| lv_its_return | TYPE N, " | |||
| lv_return_code | TYPE SY-SUBRC, " | |||
| lt_t_sync_data | TYPE STANDARD TABLE OF FTPT_SYNC_DATA, " | |||
| lv_invalid_context | TYPE FTPT_SYNC_DATA, " | |||
| lv_connection_error | TYPE FTPT_SYNC_DATA, " | |||
| lv_open_trip_error | TYPE FTPT_SYNC_DATA, " | |||
| lv_no_destination | TYPE FTPT_SYNC_DATA, " | |||
| lv_no_variant_connected | TYPE FTPT_SYNC_DATA. " |
|   CALL FUNCTION 'TP_1A_RAIL_SYNCHRO' "Enable the synchronisation of NVS rail booking |
| EXPORTING | ||
| PROVIDER | = lv_provider | |
| USER_GROUP | = lv_user_group | |
| TRANSACTION_MODE | = lv_transaction_mode | |
| SW_PORTAL | = lv_sw_portal | |
| ITS_RETURN | = lv_its_return | |
| CHANGING | ||
| VARIANT | = lv_variant | |
| PTRP_AAA_WORK_AREA | = lv_ptrp_aaa_work_area | |
| SAV_BAPIRETTAB | = lv_sav_bapirettab | |
| BAPIRETTAB | = lv_bapirettab | |
| RETURN_CODE | = lv_return_code | |
| TABLES | ||
| T_CUSTOMER_PROGRAMS | = lt_t_customer_programs | |
| T_ITEM | = lt_t_item | |
| T_ITEM_STATUS | = lt_t_item_status | |
| T_TRAIN | = lt_t_train | |
| T_SYNC_DATA | = lt_t_sync_data | |
| EXCEPTIONS | ||
| GENERAL_API_ERROR = 1 | ||
| NO_VALID_VARIANT = 10 | ||
| DISCONNECTION_ERROR = 11 | ||
| NO_ENTRY_IN_TABLE = 12 | ||
| NO_DESTINATION_FOUND = 13 | ||
| APPLICATION_API_ERROR = 2 | ||
| SEGMENT_SELL_UNSTABLE = 3 | ||
| INVALID_SYSTEM = 4 | ||
| INVALID_CONTEXT = 5 | ||
| CONNECTION_ERROR = 6 | ||
| OPEN_TRIP_ERROR = 7 | ||
| NO_DESTINATION = 8 | ||
| NO_VARIANT_CONNECTED = 9 | ||
| . " TP_1A_RAIL_SYNCHRO | ||
ABAP code using 7.40 inline data declarations to call FM TP_1A_RAIL_SYNCHRO
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 USERG FROM TA20B INTO @DATA(ld_user_group). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_return_code). | ||||
Search for further information about these or an SAP related objects