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 For Output' throws error 'Permission Denied'

Former Member
0 Kudos

Hello All,

I am getting error as 'Permission Denied' (sy-subrc = 😎 while writing the text to txt file which is present on server. I am tried using --


  OPEN DATASET pa_upld FOR OUTPUT IN TEXT MODE ENCODING DEFAULT MESSAGE error_message.
  IF sy-subrc <> 0.
    WRITE : / sy-subrc, error_message.
    EXIT.
  ENDIF.

Can anybody faced the same problem??

FYI.. The following statement is working fine while reading the contents of the file.


OPEN DATASET pa_upld FOR INPUT IN TEXT MODE ENCODING DEFAULT.

Any help??

Thanks in Advance,

Prashant

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You may not have WRITE authorizations for the server file . Check with your BASIS team

Regards

10 REPLIES 10

Former Member
0 Kudos

Hi,

You may not have WRITE authorizations for the server file . Check with your BASIS team

Regards

0 Kudos

Can you please provide me help regarding "How to give write permission/authorizations for the server file".

Currently i can able to perform read operation on server file.

Thanks,

Prashant

Former Member
0 Kudos

Hi,

I think you dont have access for get the file from the Application server.

go to the AL11 tcode , double click on the folder , it will says you do u have acess or not?

regards,

Rama reddy

0 Kudos

Hello Ram,

On which folder should i double click?

For writing the file , in which location my file should be located?

Thanks,

Prashant

0 Kudos

Hi,

This may be a authorization issue. Either your ID should have role SAP_ALL or the other role with the authorization object S_DATASET (Authorization for file access) with write access.

The activity read and write is separate. May be you have only read assigned to your ID

Regards

alex_m
Active Contributor
0 Kudos

May be you opened the file but not closed then try to open it the same file you get this type of error. Pls chk.

Former Member
0 Kudos

Hello Raghava and Alexander,

Thanks for your prompt reply .

I have closed the file using statement.


CLOSE DATASET pa_upld.

Regards,

Prashant

Former Member
0 Kudos

hi,

check that opened dataset be closed or not

and also check may be another person may work on that one.

regards.

former_member187457
Active Contributor
0 Kudos

check with the basis people....

Former Member
0 Kudos

Saving the file in the usr folder of the server solves the problem.