SAP FTBU_START_EXCEL Function Module for Start Excel, Download Data, and Execute Macro
FTBU_START_EXCEL is a standard ftbu start excel SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Start Excel, Download Data, and Execute Macro 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 ftbu start excel FM, simply by entering the name FTBU_START_EXCEL into the relevant SAP transaction such as SE37 or SE38.
Function Group: FTBU_CONV
Program Name: SAPLFTBU_CONV
Main Program: SAPLFTBU_CONV
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FTBU_START_EXCEL 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 'FTBU_START_EXCEL'"Start Excel, Download Data, and Execute Macro.
EXPORTING
* CHECK_VERSION = ' ' "Version Check Greater than CHECK_VERSION
* DATA_NAME = ' ' "Name of Data File on Frontend
* DATA_PATH_FLAG = 'W' "
* DATA_TYPE = 'ASC' "Type According to WS_DOWNLOAD
* DATA_BIN_FILE_SIZE = "If Type = BIN, Transfer File Length Here
* MACRO_NAME = ' ' "Name of Macro to Be Started
* MACRO_PATH_FLAG = ' ' "
* FORCE_START = ' ' "Start Even if Excel Path Is Unknown
* WAIT = 'X' "X=Start Excel and Wait
IMPORTING
WINID = "Return of Window ID
TABLES
* DATA_TAB = "Data Table
EXCEPTIONS
NO_BATCH = 1 EXCEL_NOT_INSTALLED = 2 WRONG_VERSION = 3 INTERNAL_ERROR = 4 INVALID_TYPE = 5 CANCELLED = 6 DOWNLOAD_ERROR = 7
IMPORTING Parameters details for FTBU_START_EXCEL
CHECK_VERSION - Version Check Greater than CHECK_VERSION
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATA_NAME - Name of Data File on Frontend
Data type: RLGRAP-FILENAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATA_PATH_FLAG -
Data type: CDefault: 'W'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATA_TYPE - Type According to WS_DOWNLOAD
Data type: RLGRAP-FILETYPEDefault: 'ASC'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATA_BIN_FILE_SIZE - If Type = BIN, Transfer File Length Here
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
MACRO_NAME - Name of Macro to Be Started
Data type: RLGRAP-FILENAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MACRO_PATH_FLAG -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FORCE_START - Start Even if Excel Path Is Unknown
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WAIT - X=Start Excel and Wait
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FTBU_START_EXCEL
WINID - Return of Window ID
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FTBU_START_EXCEL
DATA_TAB - Data Table
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_BATCH - Batch Call Not Permitted
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEL_NOT_INSTALLED - Excel Is Not Installed on the Frontend
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_VERSION - Version Smaller Than Required in CHECK_VERSION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_ERROR - Internal Error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_TYPE - Invalid Data Type in DATA_TYPE
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CANCELLED - Action Canceled by User
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DOWNLOAD_ERROR - File Could Not Be Created
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FTBU_START_EXCEL 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_winid | TYPE STRING, " | |||
| lt_data_tab | TYPE STANDARD TABLE OF STRING, " | |||
| lv_no_batch | TYPE STRING, " | |||
| lv_check_version | TYPE STRING, " SPACE | |||
| lv_data_name | TYPE RLGRAP-FILENAME, " SPACE | |||
| lv_excel_not_installed | TYPE RLGRAP, " | |||
| lv_wrong_version | TYPE RLGRAP, " | |||
| lv_data_path_flag | TYPE C, " 'W' | |||
| lv_data_type | TYPE RLGRAP-FILETYPE, " 'ASC' | |||
| lv_internal_error | TYPE RLGRAP, " | |||
| lv_invalid_type | TYPE RLGRAP, " | |||
| lv_data_bin_file_size | TYPE RLGRAP, " | |||
| lv_cancelled | TYPE RLGRAP, " | |||
| lv_macro_name | TYPE RLGRAP-FILENAME, " SPACE | |||
| lv_download_error | TYPE RLGRAP, " | |||
| lv_macro_path_flag | TYPE C, " SPACE | |||
| lv_force_start | TYPE C, " SPACE | |||
| lv_wait | TYPE C. " 'X' |
|   CALL FUNCTION 'FTBU_START_EXCEL' "Start Excel, Download Data, and Execute Macro |
| EXPORTING | ||
| CHECK_VERSION | = lv_check_version | |
| DATA_NAME | = lv_data_name | |
| DATA_PATH_FLAG | = lv_data_path_flag | |
| DATA_TYPE | = lv_data_type | |
| DATA_BIN_FILE_SIZE | = lv_data_bin_file_size | |
| MACRO_NAME | = lv_macro_name | |
| MACRO_PATH_FLAG | = lv_macro_path_flag | |
| FORCE_START | = lv_force_start | |
| WAIT | = lv_wait | |
| IMPORTING | ||
| WINID | = lv_winid | |
| TABLES | ||
| DATA_TAB | = lt_data_tab | |
| EXCEPTIONS | ||
| NO_BATCH = 1 | ||
| EXCEL_NOT_INSTALLED = 2 | ||
| WRONG_VERSION = 3 | ||
| INTERNAL_ERROR = 4 | ||
| INVALID_TYPE = 5 | ||
| CANCELLED = 6 | ||
| DOWNLOAD_ERROR = 7 | ||
| . " FTBU_START_EXCEL | ||
ABAP code using 7.40 inline data declarations to call FM FTBU_START_EXCEL
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.| DATA(ld_check_version) | = ' '. | |||
| "SELECT single FILENAME FROM RLGRAP INTO @DATA(ld_data_name). | ||||
| DATA(ld_data_name) | = ' '. | |||
| DATA(ld_data_path_flag) | = 'W'. | |||
| "SELECT single FILETYPE FROM RLGRAP INTO @DATA(ld_data_type). | ||||
| DATA(ld_data_type) | = 'ASC'. | |||
| "SELECT single FILENAME FROM RLGRAP INTO @DATA(ld_macro_name). | ||||
| DATA(ld_macro_name) | = ' '. | |||
| DATA(ld_macro_path_flag) | = ' '. | |||
| DATA(ld_force_start) | = ' '. | |||
| DATA(ld_wait) | = 'X'. | |||
Search for further information about these or an SAP related objects