2006 Nov 15 6:35 PM
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
2006 Nov 15 8:11 PM
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
2006 Nov 15 8:11 PM
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
2006 Nov 16 3:04 AM
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
2006 Nov 16 3:40 AM
Hi
If the reesult of the automatic uthorization check is negative this particular runtime error occurs.There is no authorization to access a file.
2006 Nov 16 1:03 PM