SAP BAPI_TRIP_GET_FORM_HTML Function Module for Ouput of Travel Expense Form as HTML Table
BAPI_TRIP_GET_FORM_HTML is a standard bapi trip get form html SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Ouput of Travel Expense Form as HTML Table 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 get form html FM, simply by entering the name BAPI_TRIP_GET_FORM_HTML 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_GET_FORM_HTML 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_GET_FORM_HTML'"Ouput of Travel Expense Form as HTML Table.
EXPORTING
EMPLOYEENUMBER = "Employee's Personnel Number
* I_INTERVAL_BEGIN = "Start Date of Selection Range
* I_INTERVAL_END = "End Date of Selection Interval
TRIPNUMBER = "Trip Number of Employee Trip
* SET_PRINT_FLAG = ' ' "Set Printed Indicator (X/' ')
* HTML_TEMPLATE = "
* GET_TRIP_FROM_MEMORY = ' ' "
* PERIODNUMBER = '000' "Number of Trip Period
* DISPLAY_FORM = ' ' "Display as Dialog (X/' ')
* EINKOPF = "Only One Header Per Trip
* I_PROGRAM_TO_CALL = 'RPRTEF01' "ABAP Program Name
IMPORTING
RETURN = "Return Value (Instead of Exceptions)
TABLES
TRIPFORM_HTML = "Travel Expense Form as HTML
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_GET_FORM_HTML
EMPLOYEENUMBER - Employee's Personnel Number
Data type: BAPIEMPL-PERNROptional: No
Call by Reference: No ( called with pass by value option)
I_INTERVAL_BEGIN - Start Date of Selection Range
Data type: PTRV_DATV1Optional: Yes
Call by Reference: No ( called with pass by value option)
I_INTERVAL_END - End Date of Selection Interval
Data type: PTRV_DATBIOptional: Yes
Call by Reference: No ( called with pass by value option)
TRIPNUMBER - Trip Number of Employee Trip
Data type: BAPITRIP-TRIPNOOptional: No
Call by Reference: No ( called with pass by value option)
SET_PRINT_FLAG - Set Printed Indicator (X/SPACE)
Data type: BAPITRVXXX-BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
HTML_TEMPLATE -
Data type: WWWDATAID-OBJIDOptional: Yes
Call by Reference: No ( called with pass by value option)
GET_TRIP_FROM_MEMORY -
Data type: BAPITRVXXX-BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PERIODNUMBER - Number of Trip Period
Data type: BAPITRVXXX-PERIODDefault: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DISPLAY_FORM - Display as Dialog (X/SPACE)
Data type: BAPITRVXXX-BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EINKOPF - Only One Header Per Trip
Data type: RP_XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PROGRAM_TO_CALL - ABAP Program Name
Data type: PROGNAMEDefault: 'RPRTEF01'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_TRIP_GET_FORM_HTML
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_GET_FORM_HTML
TRIPFORM_HTML - Travel Expense Form as HTML
Data type: BAPIHTMLOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_TRIP_GET_FORM_HTML 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_tripform_html | TYPE STANDARD TABLE OF BAPIHTML, " | |||
| lv_employeenumber | TYPE BAPIEMPL-PERNR, " | |||
| lv_i_interval_begin | TYPE PTRV_DATV1, " | |||
| lv_i_interval_end | TYPE PTRV_DATBI, " | |||
| lv_tripnumber | TYPE BAPITRIP-TRIPNO, " | |||
| lv_set_print_flag | TYPE BAPITRVXXX-BOOLEAN, " SPACE | |||
| lv_html_template | TYPE WWWDATAID-OBJID, " | |||
| lv_get_trip_from_memory | TYPE BAPITRVXXX-BOOLEAN, " SPACE | |||
| lv_periodnumber | TYPE BAPITRVXXX-PERIOD, " '000' | |||
| lv_display_form | TYPE BAPITRVXXX-BOOLEAN, " SPACE | |||
| lv_einkopf | TYPE RP_XFELD, " | |||
| lv_i_program_to_call | TYPE PROGNAME. " 'RPRTEF01' |
|   CALL FUNCTION 'BAPI_TRIP_GET_FORM_HTML' "Ouput of Travel Expense Form as HTML Table |
| EXPORTING | ||
| EMPLOYEENUMBER | = lv_employeenumber | |
| I_INTERVAL_BEGIN | = lv_i_interval_begin | |
| I_INTERVAL_END | = lv_i_interval_end | |
| TRIPNUMBER | = lv_tripnumber | |
| SET_PRINT_FLAG | = lv_set_print_flag | |
| HTML_TEMPLATE | = lv_html_template | |
| GET_TRIP_FROM_MEMORY | = lv_get_trip_from_memory | |
| PERIODNUMBER | = lv_periodnumber | |
| DISPLAY_FORM | = lv_display_form | |
| EINKOPF | = lv_einkopf | |
| I_PROGRAM_TO_CALL | = lv_i_program_to_call | |
| IMPORTING | ||
| RETURN | = lv_return | |
| TABLES | ||
| TRIPFORM_HTML | = lt_tripform_html | |
| . " BAPI_TRIP_GET_FORM_HTML | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_TRIP_GET_FORM_HTML
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 BAPITRIP INTO @DATA(ld_tripnumber). | ||||
| "SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_set_print_flag). | ||||
| DATA(ld_set_print_flag) | = ' '. | |||
| "SELECT single OBJID FROM WWWDATAID INTO @DATA(ld_html_template). | ||||
| "SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_get_trip_from_memory). | ||||
| DATA(ld_get_trip_from_memory) | = ' '. | |||
| "SELECT single PERIOD FROM BAPITRVXXX INTO @DATA(ld_periodnumber). | ||||
| DATA(ld_periodnumber) | = '000'. | |||
| "SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_display_form). | ||||
| DATA(ld_display_form) | = ' '. | |||
| DATA(ld_i_program_to_call) | = 'RPRTEF01'. | |||
Search for further information about these or an SAP related objects