SAP BAPI_TRIP_CHANGE_STATUS Function Module for
BAPI_TRIP_CHANGE_STATUS is a standard bapi trip change status 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 bapi trip change status FM, simply by entering the name BAPI_TRIP_CHANGE_STATUS into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRTR
Program Name: SAPLHRTR
Main Program: SAPLHRTR
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function BAPI_TRIP_CHANGE_STATUS 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 'BAPI_TRIP_CHANGE_STATUS'".
EXPORTING
EMPLOYEENUMBER = "Employee's Personnel Number
TRIPNUMBER = "Trip Number of Employee Trip
PERIODNUMBER = "Trip Period
* PRINTED_NEW = "New Print Status of a Trip
* APPROVED_NEW = "New Travel Request Indicator
* ACCOUNT_NEW = "New Settlement Status
* SHOW_DIALOG = ' ' "Dialog Display
* ALWAYS_SET_STATUS = ' ' "Trip status is always set
IMPORTING
RETURN = "Return Structure (Instead of Exceptions)
CURRENT_PERIOD_VERSION = "Current period version
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLHRTRV_STAT_001
EXIT_SAPLHRTRV_STAT_002
IMPORTING Parameters details for BAPI_TRIP_CHANGE_STATUS
EMPLOYEENUMBER - Employee's Personnel Number
Data type: BAPIEMPL-PERNROptional: No
Call by Reference: No ( called with pass by value option)
TRIPNUMBER - Trip Number of Employee Trip
Data type: BAPITRVXXX-TRIPNOOptional: No
Call by Reference: No ( called with pass by value option)
PERIODNUMBER - Trip Period
Data type: BAPITRVXXX-PERIODOptional: No
Call by Reference: No ( called with pass by value option)
PRINTED_NEW - New Print Status of a Trip
Data type: BAPITRIP-PRINTEDOptional: Yes
Call by Reference: No ( called with pass by value option)
APPROVED_NEW - New Travel Request Indicator
Data type: BAPITRIP-APPROVEDOptional: Yes
Call by Reference: No ( called with pass by value option)
ACCOUNT_NEW - New Settlement Status
Data type: BAPITRIP-ACCOUNTOptional: Yes
Call by Reference: No ( called with pass by value option)
SHOW_DIALOG - Dialog Display
Data type: BAPITRVXXX-SHOW_DIALOGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ALWAYS_SET_STATUS - Trip status is always set
Data type: BAPITRVXXX-ALWAYS_SET_STATUSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_TRIP_CHANGE_STATUS
RETURN - Return Structure (Instead of Exceptions)
Data type: BAPIRETURNOptional: No
Call by Reference: No ( called with pass by value option)
CURRENT_PERIOD_VERSION - Current period version
Data type: BAPITRVXXX-CURRENT_PERIOD_VERSIONOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_TRIP_CHANGE_STATUS 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_return | TYPE BAPIRETURN, " | |||
| lv_employeenumber | TYPE BAPIEMPL-PERNR, " | |||
| lv_tripnumber | TYPE BAPITRVXXX-TRIPNO, " | |||
| lv_current_period_version | TYPE BAPITRVXXX-CURRENT_PERIOD_VERSION, " | |||
| lv_periodnumber | TYPE BAPITRVXXX-PERIOD, " | |||
| lv_printed_new | TYPE BAPITRIP-PRINTED, " | |||
| lv_approved_new | TYPE BAPITRIP-APPROVED, " | |||
| lv_account_new | TYPE BAPITRIP-ACCOUNT, " | |||
| lv_show_dialog | TYPE BAPITRVXXX-SHOW_DIALOG, " SPACE | |||
| lv_always_set_status | TYPE BAPITRVXXX-ALWAYS_SET_STATUS. " SPACE |
|   CALL FUNCTION 'BAPI_TRIP_CHANGE_STATUS' " |
| EXPORTING | ||
| EMPLOYEENUMBER | = lv_employeenumber | |
| TRIPNUMBER | = lv_tripnumber | |
| PERIODNUMBER | = lv_periodnumber | |
| PRINTED_NEW | = lv_printed_new | |
| APPROVED_NEW | = lv_approved_new | |
| ACCOUNT_NEW | = lv_account_new | |
| SHOW_DIALOG | = lv_show_dialog | |
| ALWAYS_SET_STATUS | = lv_always_set_status | |
| IMPORTING | ||
| RETURN | = lv_return | |
| CURRENT_PERIOD_VERSION | = lv_current_period_version | |
| . " BAPI_TRIP_CHANGE_STATUS | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_TRIP_CHANGE_STATUS
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 PERNR FROM BAPIEMPL INTO @DATA(ld_employeenumber). | ||||
| "SELECT single TRIPNO FROM BAPITRVXXX INTO @DATA(ld_tripnumber). | ||||
| "SELECT single CURRENT_PERIOD_VERSION FROM BAPITRVXXX INTO @DATA(ld_current_period_version). | ||||
| "SELECT single PERIOD FROM BAPITRVXXX INTO @DATA(ld_periodnumber). | ||||
| "SELECT single PRINTED FROM BAPITRIP INTO @DATA(ld_printed_new). | ||||
| "SELECT single APPROVED FROM BAPITRIP INTO @DATA(ld_approved_new). | ||||
| "SELECT single ACCOUNT FROM BAPITRIP INTO @DATA(ld_account_new). | ||||
| "SELECT single SHOW_DIALOG FROM BAPITRVXXX INTO @DATA(ld_show_dialog). | ||||
| DATA(ld_show_dialog) | = ' '. | |||
| "SELECT single ALWAYS_SET_STATUS FROM BAPITRVXXX INTO @DATA(ld_always_set_status). | ||||
| DATA(ld_always_set_status) | = ' '. | |||
Search for further information about these or an SAP related objects