Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unicode UCCHECK errors

Former Member
0 Kudos
320

Hi,

Can somebody please let me know regarding common UCCHECK errors and how to fix it ?

Thanks,

Yogita

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
209

You may see some errors saying that the calls to WS_UPLOAD and WS_DOWNLOAD should be replaced by the funciton modules GUI_UPLOAD and GUI_DOWNLOAD. In this case, you need to visit these programs and change the call to the new function module.

Regards,

Rich Heilman

10 REPLIES 10

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
210

You may see some errors saying that the calls to WS_UPLOAD and WS_DOWNLOAD should be replaced by the funciton modules GUI_UPLOAD and GUI_DOWNLOAD. In this case, you need to visit these programs and change the call to the new function module.

Regards,

Rich Heilman

0 Kudos
209

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

0 Kudos
209

'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.

0 Kudos
209

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

0 Kudos
209

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

0 Kudos
209

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

0 Kudos
209

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

0 Kudos
209

You can find the documentation in Se37. Or SE24. class CL_GUI_FRONTEND_SERVICES.

Search for both the methods.

0 Kudos
209

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.

Former Member
0 Kudos
209

manually look at the code and see if there are any commands specified in the UNICODE COOKBOOK for ABAP used in the program.

Check the below links :

/people/thomas.mann2/blog/2006/08/22/sap-upgrade-conflicts-1

Thanks

Seshu