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: 

OPEN DATASET I_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.

Former Member
0 Kudos

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

rainer_hbenthal
Active Contributor
0 Kudos

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

rainer_hbenthal
Active Contributor
0 Kudos

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.

0 Kudos

I do it with CL_GUI_FRONTEND_SERVICES.

Thanks a lot.

Former Member
0 Kudos

This could be access/authorization issues.