Skip to Content
-2
May 02, 2017 at 08:41 PM

File is not open in READ DATA SET

1174 Views Last edit May 02, 2017 at 08:54 PM 3 rev

Hi folks.

I have the next code:

DATA: l_text TYPE String.

lv_file = '/repo/FI/exit/ACCESS_FILE.TXT'.

TRY.
OPEN DATASET lv_file FOR INPUT IN TEXT MODE ENCODING DEFAULT WITH SMART LINEFEED.
CATCH cx_sy_file_authority.
      g_message = 'No authorization'.
ENDTRY.

READ DATASET lv_file INTO l_text.------>ERROR

When I try read dataset, there are an error in this point with the next description:

When accessing the file "/repo/FI/exit/ACCESS_FILE.TXT", the system recognized that this file is not open. Therefore, the file cannot be accessed.