2007 Jul 13 8:34 PM
Hi,
Can somebody please let me know regarding common UCCHECK errors and how to fix it ?
Thanks,
Yogita
2007 Jul 13 8:40 PM
2007 Jul 13 8:40 PM
2007 Jul 16 9:46 PM
Hi,
I am getting UCCHECK error "<i>Upload/Ws_Upload and Download/Ws_Download are obsolete, since they are not Unicode-enabled; use the class cl_gui_frontend_services"</i>
for CALL FUNCTION 'UPLOAD'
........
WS_UPLOAD can be replaced by GUI_UPLOAD, But how do I fix UCCHECK error for function module 'UPLOAD'?
Thanks,
Yogita
2007 Jul 16 9:53 PM
'UPLOAD' can be fixed by..GUI_UPLOAD.
before calling GUI_UPLOAD call
Use CL_GUI_FRONTEND_SERVICES
method FILE_OPEN_DIALOG.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
DEFAULT_EXTENSION = 'txt'
INITIAL_DIRECTORY = 'C:\'
CHANGING
FILE_TABLE = li_file
RC = lv_rc
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
others = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
now call GUI_UPLOAD.
Thanks,
Vamshi.
2007 Jul 16 9:58 PM
Hello Yogita
Replace fm UPLOAD with method calls of <b>CL_GUI_FRONTEND_SERVICES</b> as well:
(1) FILE_OPEN_DIALOG
(2) GUI_UPLOAD
Note: The replacement is described in the fm documenation.
Regards
Uwe
2007 Jul 16 11:11 PM
Hi,
I have below code for UPLOAD fm. Can you please let me know the sample code/details(with declaration) to replace below fm with
-method FILE_OPEN_DIALOG
-method GUI_UPLOAD
.........
data : BEGIN OF UPLTAB OCCURS 0,
DATA(200) TYPE C,
END OF UPLTAB,
Data : fname type LOCALFILE,
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = FNAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = UPLTAB.
..........
Thanks,
yogita
2007 Jul 16 11:17 PM
Hi,
Can you please let me know where can I find the documentation as you mentioned below? I checked GUI_UPLOAD fm documentation, but it doesn't have details regarding replacement.
Also do you know if can use method FILE_SAVE_DIALOG here instead of FILE_OPEN_DIALOG?
Thanks,
Yogita
2007 Jul 16 11:20 PM
Just see example code :
tables rlgrap.
data: it_tab type filetable,
gd_subrc type i.
selection-screen begin of block m with frame.
select-options so_fpath for rlgrap-filename.
selection-screen end of block m.
at selection-screen on value-request for so_fpath-low.
REFRESH: it_tab.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'Select File'
DEFAULT_FILENAME = '*.txt'
MULTISELECTION = 'X'
CHANGING
FILE_TABLE = it_tab
RC = gd_subrc.
loop at it_tab into so_fpath-low.
so_fpath-sign = 'I'.
so_fpath-option = 'EQ'.
append so_fpath.
endloop.
Check the below Link :
Thanks
Seshu
2007 Jul 16 11:22 PM
You can find the documentation in Se37. Or SE24. class CL_GUI_FRONTEND_SERVICES.
Search for both the methods.
2007 Jul 16 11:26 PM
DATA: v_file TYPE file_table,
i_file TYPE filetable.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = l_msg
default_extension = 'txt'
default_filename = v_default_file
file_filter = '*.TXT'
initial_directory = v_dir
CHANGING
file_table = i_file
rc = v_rc " This is like sy-subrc return code
user_action = v_action "user action
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE e000
WITH 'Error specifing a file name and path for upload.'(012).
ENDIF.
READ TABLE i_file INDEX 1 INTO fname.
*---Upload
pass the filename to string
data:l_file type string.
l_file = FNAME.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_file
filetype = 'ASC'
CHANGING
data_tab = UPLTAB
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE e000
WITH 'Error uploading the file, return code ='(013) sy-subrc.
ENDIF.
2007 Jul 13 8:44 PM