Application Development and Automation 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: 
Read only

OPEN DATASET I_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.

Former Member
0 Likes
1,097

Hello I have tried open a file but this file is .CSV and I have problems because in my code sy-subrc = 8 so the file is not open ok.

I think that the problem is that I have to use a .CSV file .

PARAMETERS: I_FILE(80)
DEFAULT 'C:**.csv' OBLIGATORY.
.
 OPEN DATASET I_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.

  IF SY-SUBRC NE 0. 
    MESSAGE ID 'BC420' TYPE 'E' NUMBER '101' WITH I_FILE.
  ENDIF.

If somebody can help me , please.

Thanks a lot

1 ACCEPTED SOLUTION
Read only

rainer_hbenthal
Active Contributor
0 Likes
676

Open Dataset is for opening a file on the apllaction server, und your default make me think you are trying to open a file on the presentation server. Try using method gui_upload of class cl_gui_front_end_services instead of open dataset.

Open Dataset is for opening a file on the apllaction server, und your default make me think you are trying to open a file on the presentation server. Try using method gui_upload of class cl_gui_front_end_services instead of open dataset.

3 REPLIES 3
Read only

rainer_hbenthal
Active Contributor
0 Likes
677

Open Dataset is for opening a file on the apllaction server, und your default make me think you are trying to open a file on the presentation server. Try using method gui_upload of class cl_gui_front_end_services instead of open dataset.

Read only

0 Likes
676

I do it with CL_GUI_FRONTEND_SERVICES.

Thanks a lot.

Read only

Former Member
0 Likes
676

This could be access/authorization issues.