SAP BAPI_TRIP_REPORT_INIT Function Module for Tables Needed for REPORT_CREATE (Local Workspace)
BAPI_TRIP_REPORT_INIT is a standard bapi trip report init SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Tables Needed for REPORT_CREATE (Local Workspace) 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 bapi trip report init FM, simply by entering the name BAPI_TRIP_REPORT_INIT into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRTR
Program Name: SAPLHRTR
Main Program: SAPLHRTR
Appliation area: P
Release date: 09-Aug-1997
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_TRIP_REPORT_INIT 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_REPORT_INIT'"Tables Needed for REPORT_CREATE (Local Workspace).
EXPORTING
EMPLOYEENUMBER = "Employee's personnel number
* DATE = SY-DATUM "Date of Authorization and Overlap Check
* LANGUAGE = SY-LANGU "Language of Rel. Table Entries
* CHECK_OVERLAP = ' ' "Check Overlaps with Existing Trips (X/' ')
* SEL_COUN = ' ' "Fill Table T706O_DAT (X/' ')
* SEL_CURR = ' ' "Fill Table TCURR_DAT /X/' ')
IMPORTING
RETURN = "Return Value (Instead of Exceptions)
TABLES
* EMP_INFO = "Infos for Personnel Number
DEFAULTS = "Default Values for Travel Expenses (PR04)
T706B_DAT = "Table of Expense Types
* T706O_DAT = "Table of Countries
* TCURR_DAT = "Table of Currencies
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_REPORT_INIT
EMPLOYEENUMBER - Employee's personnel number
Data type: BAPIEMPL-PERNROptional: No
Call by Reference: No ( called with pass by value option)
DATE - Date of Authorization and Overlap Check
Data type: BAPITRVXXX-DATEDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE - Language of Rel. Table Entries
Data type: BAPITRVXXX-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHECK_OVERLAP - Check Overlaps with Existing Trips (X/SPACE)
Data type: BAPITRVXXX-BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SEL_COUN - Fill Table T706O_DAT (X/SPACE)
Data type: BAPITRVXXX-BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SEL_CURR - Fill Table TCURR_DAT /X/SPACE)
Data type: BAPITRVXXX-BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_TRIP_REPORT_INIT
RETURN - Return Value (Instead of Exceptions)
Data type: BAPIRETURNOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_TRIP_REPORT_INIT
EMP_INFO - Infos for Personnel Number
Data type: BAPITRVEMPOptional: Yes
Call by Reference: No ( called with pass by value option)
DEFAULTS - Default Values for Travel Expenses (PR04)
Data type: BAPITRVDEFOptional: No
Call by Reference: No ( called with pass by value option)
T706B_DAT - Table of Expense Types
Data type: BAPITR706BOptional: No
Call by Reference: No ( called with pass by value option)
T706O_DAT - Table of Countries
Data type: BAPITR706OOptional: Yes
Call by Reference: No ( called with pass by value option)
TCURR_DAT - Table of Currencies
Data type: BAPITRCURROptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_TRIP_REPORT_INIT 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, " | |||
| lt_emp_info | TYPE STANDARD TABLE OF BAPITRVEMP, " | |||
| lv_employeenumber | TYPE BAPIEMPL-PERNR, " | |||
| lv_date | TYPE BAPITRVXXX-DATE, " SY-DATUM | |||
| lt_defaults | TYPE STANDARD TABLE OF BAPITRVDEF, " | |||
| lv_language | TYPE BAPITRVXXX-LANGU, " SY-LANGU | |||
| lt_t706b_dat | TYPE STANDARD TABLE OF BAPITR706B, " | |||
| lt_t706o_dat | TYPE STANDARD TABLE OF BAPITR706O, " | |||
| lv_check_overlap | TYPE BAPITRVXXX-BOOLEAN, " SPACE | |||
| lv_sel_coun | TYPE BAPITRVXXX-BOOLEAN, " SPACE | |||
| lt_tcurr_dat | TYPE STANDARD TABLE OF BAPITRCURR, " | |||
| lv_sel_curr | TYPE BAPITRVXXX-BOOLEAN. " SPACE |
|   CALL FUNCTION 'BAPI_TRIP_REPORT_INIT' "Tables Needed for REPORT_CREATE (Local Workspace) |
| EXPORTING | ||
| EMPLOYEENUMBER | = lv_employeenumber | |
| DATE | = lv_date | |
| LANGUAGE | = lv_language | |
| CHECK_OVERLAP | = lv_check_overlap | |
| SEL_COUN | = lv_sel_coun | |
| SEL_CURR | = lv_sel_curr | |
| IMPORTING | ||
| RETURN | = lv_return | |
| TABLES | ||
| EMP_INFO | = lt_emp_info | |
| DEFAULTS | = lt_defaults | |
| T706B_DAT | = lt_t706b_dat | |
| T706O_DAT | = lt_t706o_dat | |
| TCURR_DAT | = lt_tcurr_dat | |
| . " BAPI_TRIP_REPORT_INIT | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_TRIP_REPORT_INIT
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 DATE FROM BAPITRVXXX INTO @DATA(ld_date). | ||||
| DATA(ld_date) | = SY-DATUM. | |||
| "SELECT single LANGU FROM BAPITRVXXX INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = SY-LANGU. | |||
| "SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_check_overlap). | ||||
| DATA(ld_check_overlap) | = ' '. | |||
| "SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_sel_coun). | ||||
| DATA(ld_sel_coun) | = ' '. | |||
| "SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_sel_curr). | ||||
| DATA(ld_sel_curr) | = ' '. | |||
Search for further information about these or an SAP related objects