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

Application file authorization

Former Member
0 Likes
775

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 .

5 REPLIES 5
Read only

former_member242255
Active Contributor
0 Likes
703

you have to contact the basis team for getting the authorisation for your userid to access the files on app.server..

Regards.

Sravan

Read only

Former Member
0 Likes
703

try FM AUTHORITY_CHECK_DATASET

regards

Prabhu

Read only

Former Member
0 Likes
703

Use this FM AUTHORITY_CHECK_FUNC

Regards,

Joan

Read only

Former Member
0 Likes
703

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

Read only

Former Member
0 Likes
703

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^