Ansicht
Dokumentation

AUTHORITY_CHECK_DATASET - Check Authorization for File Access

AUTHORITY_CHECK_DATASET - Check Authorization for File Access

CPI1466 during Backup   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module allows you to check authorization to access files (with the key words OPEN DATASET, READ DATASET, TRANSFER and DELETE DATASET). A check should be performed before opening a file.

The authorization check is performed uwing the authorization object S_DATASET.

Description of function parameters:

  • PROGRAM: Name of the ABAP program from which the file access is performed. If no program name is specified, the system assumes the current program.
  • ACTIVITY: Access type. The possible values are:
  • READ: Read file

  • WRITE: Change file

  • READ_WITH_FILTER: Read file with filter function

  • WRITE_WITH_FILTER: Change file with filter function

  • DELETE: Delete file

  • FILENAME: Name of accessed file

Example

TYPE-POOLS SABC.

CALL FUNCTION 'AUTHORITY_CHECK_DATASET'
EXPORTING PROGRAM = 'ZDATASET'
ACTIVITY = SABC_ACT_READ
FILENAME = '/tmp/sapv01'
EXCEPTIONS NO_AUTHORITY = 1
ACTIVITY_UNKNOWN = 2.

Notes

The values to be passed as the ACTIVITY are defined as constants in the TYPE-POOL SABC.

Further information





Parameters

ACTIVITY
FILENAME
PROGRAM

Exceptions

ACTIVITY_UNKNOWN
NO_AUTHORITY

Function Group

SABC

BAL_S_LOG - Application Log: Log header data   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 2259 Date: 20240523 Time: 114353     sap01-206 ( 28 ms )