‎2009 Feb 27 6:24 AM
Hi All
Iam reading a file from appliaction server using open dataset. But the particular file is not having the authorization to read. Is there any tcode or FM to check the particular file is not having the authorization .
‎2009 Feb 27 6:31 AM
you have to contact the basis team for getting the authorisation for your userid to access the files on app.server..
Regards.
Sravan
‎2009 Feb 27 6:54 AM
‎2009 Feb 27 6:58 AM
‎2009 Feb 27 7:05 AM
hi Vighnesh
AUTHORITY_CHECK_DATASET is the module for it.
For details go through SAP HELP
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3d5c358411d1829f0000e829fbfe/frameset.htm
Let me know in case of any issues.
regards
Sachin
‎2009 Feb 27 7:07 AM
Hi
Good
Please check this
The Function Module AUTHORITY_CHECK_DATASET
This function module allows you to check whether the user is authorized to access a file before the system tries to open it. This preempts a possible runtime error that can otherwise occur in the automatic authorization check.
The function module has the following import parameters:
· PROGRAM
Name of the ABAP program from which the file is to be opened. If you do not specify a program name, the system assumes the current program.
· ACTIVITY
Access type, with the following possible values:
¡ Read file
¡ Change file
¡ READ_WITH_FILTER
¡ WRITE_WITH_FILTER
¡ Delete file
These values are defined as constants in the type group SABC as follows:
TYPE-POOL SABC .
CONSTANTS:
SABC_ACT_READ(4) VALUE 'READ',
SABC_ACT_WRITE(5) VALUE 'WRITE',
SABC_ACT_READ_WITH_FILTER(16) VALUE 'READ_WITH_FILTER',
SABC_ACT_WRITE_WITH_FILTER(17) VALUE 'WRITE_WITH_FILTER',
SABC_ACT_DELETE(6) VALUE 'DELETE',
SABC_ACT_INIT(4) VALUE 'INIT',
SABC_ACT_ACCEPT(6) VALUE 'ACCEPT',
SABC_ACT_CALL(4) VALUE 'CALL'.
· FILENAME
Name of the file that you want to access.
TYPE-POOLS SABC.
.....
CALL FUNCTION 'AUTHORITY_CHECK_DATASET'
EXPORTING PROGRAM = SY-REPID
ACTIVITY = SABC_ACT_READ
FILENAME = '/tmp/sapv01'
EXCEPTIONS NO_AUTHORITY = 1
ACTIVITY_UNKNOWN = 2.
Thanks
mrutyun^