title: how to read/write text file from your local machine?
body: <pre><code>report  try1.
  
  class register definition.
    public section.
      methods: constructor.
  class-data: read_data type pa0008-bet01,    "i tried string first, but i found this one
  endclass.                                       "still doesnt work
  
  class register implementation.
   method constructor.
    data sometext(100) value 'C:\Users\tgbtstj3\Desktop\ZzZzZz.txt'.
    open dataset sometext for input in text mode encoding default.
    do.
     read dataset sometext into read_data.
     if sy-subrc &lt;&gt; 0.
      exit.
     endif.
     close dataset sometext.
     write / read_data.
    enddo.
   endmethod.
  endclass.
  
  data reg type ref to register.
  START-OF-SELECTION.
  create object reg.
  </code></pre>
  
  <p>here is my code, i just started abap programming and wanted to make a small program to learn... but i m stuck at reading txt file from my local machine and i cant proceed...
  the error says file is not open...
  and exception catched by cx_sy_file_open_mode</p>