2007 Jun 14 11:07 AM
Hi ,
I am new to OOP ABAP.i want the code to upload a flat file from PC to appl server using CL_GUI_FRONTEND_SERVICES.
Thanks,
Rakesh.
Hi ,
I am new to OOP ABAP.i want the code to upload a flat file from PC to appl server using CL_GUI_FRONTEND_SERVICES.
Thanks,
Rakesh.
2007 Jun 14 11:28 AM
You can have a look on this example:
Peter
*- Get current windows directory of user
call method cl_gui_frontend_services=>directory_get_current
CHANGING
current_directory = lv_currdir
EXCEPTIONS
directory_get_current_failed = 1
cntl_error = 2.
*- Only for 4.7 or higher :
* error_no_gui = 3
* not_supported_by_gui = 4
* OTHERS = 5.
*- Open windows popup for file selection
call method cl_gui_frontend_services=>file_open_dialog
EXPORTING
initial_directory = lv_currdir
CHANGING
file_table = lv_files
rc = lv_rc.
*- Get selected file from network or pc
read table lv_files index 1 into lv_fname.
call method cl_gui_frontend_services=>gui_upload
EXPORTING
filename = lv_fname
filetype = lc_type
CHANGING
data_tab = pt_f_cont[]
EXCEPTIONS
file_open_error = 1
file_read_error = 2
bad_data_format = 8
others = 19.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |