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 is returning sy-subrc of 8!

Former Member
0 Kudos

Hello All,

I am running the program RSEINB00 to process an inbound file but getting an error at the open dataset statement in the below code. I had checked all the conentions and standards and they are correct. What are the possible reason of getting an error. I am getting sy-subrc of 8 after trying to open the file.

form open_dataset_for_input
   using  l_filename    type edi_path-pthnam
          l_os_message  type t_os_message
          l_unicode     type edi_unicod
          l_repchar     type edi_repchr
          l_rc          type sy-subrc.

clear l_rc.
if l_unicode = c_true.
    catch system-exceptions convt_codepage_init = 9.
    open dataset l_filename for input in text mode encoding utf-8
       replacement character l_repchar message l_os_message.
    l_rc = sy-subrc.
    endcatch.
  else.
    catch system-exceptions convt_codepage_init = 9.
    *open dataset l_filename for input in text mode encoding non-unicode*
      *replacement character l_repchar message l_os_message.*
    l_rc = sy-subrc.
    endcatch.
  endif.
  if sy-subrc = 9.
    l_rc = sy-subrc.
  endif.

endform.                    " open_dataset_for_input

Here are the input values I am passing to the program RSEINB00.

*
w01dvec02\sbxedi\chgbck01*

ZCLR

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

This means the user has no authority to open the Doc.

Please check with the basis team.

sy-subrc Description 
0 File was opened. 
8 Operating system could not open file

Amandeep

5 REPLIES 5

Former Member
0 Kudos

This means the user has no authority to open the Doc.

Please check with the basis team.

sy-subrc Description 
0 File was opened. 
8 Operating system could not open file

Amandeep

Former Member
0 Kudos

I will tell you more about INPUT and OUTPUT:

Input: The addition FOR INPUT opens the file for reading. By default, the file pointer is set at the start of the file. If the file specified does not exist, sy-subrc is set to 8.

regards,

venkat.

Former Member
0 Kudos

Either the file does not exist or U don't have authorization to read the file ...

Former Member
0 Kudos

Hi ALL,

I was facing the same issue.

Then I converted parameter like this.

PARAMETERS: filename(200) TYPE c DEFAULT  '/tmp/test1.xml' LOWER CASE.

So, open dataset was able to find the file.

Thank you.

Bing

0 Kudos

This message was moderated.