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 sy-subrc = 8 while creating

sriram_ramesh
Participant
0 Likes
16,630

Hello,

OPEN DATASET GV_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

I get sy-subrc = 8 when I try to create a new file in the folder.

But when I give existing filename in gv_file, sy-subrc goes 0.

This was working till yesterday.

Contacted the BASIS team. they said there is nothing wrong with the server.

What could be the reason?

Hello,

OPEN DATASET GV_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

I get sy-subrc = 8 when I try to create a new file in the folder.

But when I give existing filename in gv_file, sy-subrc goes 0.

This was working till yesterday.

Contacted the BASIS team. they said there is nothing wrong with the server.

What could be the reason?

9 REPLIES 9
Read only

RaymondGiuseppi
Active Contributor
6,903

Many errors are possible

  • Check Automatic Authorization Checks on target server as well as some authorization chek in SAP, you can check on SAP with FM AUTHORITY_CHECK_DATASET
  • Any problem related to target system froim invalid name to lack of free space or missing authorizations


Regards,

Raymond

Read only

0 Likes
6,903

Yes checked with authorization. No issue with that. Issue was due to lack of space.

Thanks

Read only

0 Likes
6,903

So I won "Any problem related to target system froim invalid name to lack of free space or missing authorizations" ?

Read only

0 Likes
6,903

Yes you did but you didn't tell me the way to find it

Anyway, I am not getting the option to mark correct answer/ helpful answer for this post.

know how to convert this discussion to question?

Read only

6,903

no thx, I've enough points

Read only

pranay570708
Active Contributor
6,903

Hi Sriram,

Pleae check below:

1. if path name is too long

2. Authorization issues

Otherwise, you can get exact error message using below piece of code:

Data: error(100) type c.

OPEN DATASET GV_FILE FOR OUTPUT MESSAGE error

                                                            IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc <> 0.

  WRITE / error.

  STOP.

ENDIF.

Read only

0 Likes
6,903

Thanks Pranay,

You suggestion helped me to find the reason.

Unfortunately I'm not able to mark it as correct answer. I am not getting the option to mark.

Read only

Former Member
0 Likes
6,903

Hi.

1. Check for write authorization to dataset using the FM AUTHORITY_CHECK_DATASET before the OPEN DATASET GV_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

2. If sy-subrc eq zero and still an issue, please check for the file name length.

Regards,

Suresh K

Read only

Chintu6august
Contributor
0 Likes
6,903

Hi,

converted file name  like this.

data: GV_FILE(200) TYPE c DEFAULT  '/tmp/test1.xml' LOWER CASE.

open dataset was able to find the file.

thanks!!