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: 

authorization issues on opening a dataset

Former Member
0 Kudos
4,630

hello,

I am not sure if this is the correct forum for this or not.

I have an ABAP program that was written before I got here that performs the following statement

OPEN DATASET w_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

where w_file is a file on the app server. the users that run this program have no issues.

I have made a copy of the program to add some additional functionality and when the users run this program, the program is abending with the following error messages when trying to execute the same command stated above

Runtime Error OPEN_DATASET_NO_AUTHORITY

Except. CX_SY_FILE_AUTHORITY

I have talking to the security person and he is going to make another role with the authorizations needed to run the program but I am curious as to why the same person can run the one program successfully and my program (which does basically the same thing when it comes to the file processing) abends with the authorization issue.

thanks in advance for your help

1 ACCEPTED SOLUTION

morten_nielsen
Active Contributor
1,326

Hi Timothy

Well it is the correct forum

When ever your accessing the file system the authorization object S_DATASET is checked.

This object has Filename, activity and <b>program name</b> as input parameter.

Best Practice would require you to limit access as much as possible, so my guess is that access only has been given to the original program, and not your new one - that's why your getting the ShortDump.

You can find the documentation here: http://help.sap.com/saphelp_webas620/helpdata/en/fc/eb3d5c358411d1829f0000e829fbfe/frameset.htm

Regards

Morten Nielsen

4 REPLIES 4

morten_nielsen
Active Contributor
1,327

Hi Timothy

Well it is the correct forum

When ever your accessing the file system the authorization object S_DATASET is checked.

This object has Filename, activity and <b>program name</b> as input parameter.

Best Practice would require you to limit access as much as possible, so my guess is that access only has been given to the original program, and not your new one - that's why your getting the ShortDump.

You can find the documentation here: http://help.sap.com/saphelp_webas620/helpdata/en/fc/eb3d5c358411d1829f0000e829fbfe/frameset.htm

Regards

Morten Nielsen

Former Member
0 Kudos
1,326

Hello,

Automatic authorization checks are active during DATASET operations (for example, OPEN DATASET), CALL C function, COMMUNICATION statements and OLE calls. If the user does not have the corresponding authorization, a runtime error occurs.

To prevent the runtime error, the application program must FIRST check whether the user has the required authorization. To do this, corresponding function modules (AUTHORITY_CHECK_DATASET, AUTHORITY_CHECK_C_FUNCT, AUTHORITY_CHECK_CPIC and AUTHORITY_CHECK_OLE) are available.

Also u require S_DATASET AUtho. in user profile.....

If usefull then please reqward the points..

Thanks

Former Member
0 Kudos
1,326

Hi

If the reesult of the automatic uthorization check is negative this particular runtime error occurs.There is no authorization to access a file.

Former Member
1,326

the probelm is corrected.

the program name was not in the S_DATASET authorization object. the security has corrected this and everything is working correctly.

thanks for all of the help on this.