SAP Function Modules

Share |

AUTHORITY_CHECK_DATASET SAP Function module - Check Authorization for File Access

AUTHORITY_CHECK_DATASET is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below are the pattern details for this FM showing its interface including any import, export parameters etc and for your convenience any standard documentation available. All this information and more can be viewed if you enter the function module name AUTHORITY_CHECK_DATASET into the relevant SAP transaction such as SE37 or SE80.

Contribute (Add Comments)
Within the comments section below there is also an opportunity for you to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name AUTHORITY_CHECK_DATASET or its description.

Pattern for FM AUTHORITY_CHECK_DATASET - AUTHORITY CHECK DATASET
Associated Function Group: SABC
Released Date: 02.03.2005
CALL FUNCTION 'AUTHORITY_CHECK_DATASET' "Check Authorization for File Access
  EXPORTING
*   program =                   " authb-program  ABAP program in which access occurs
    activity =                  " c             Access Type (See Function Documentation)
    filename =                  " authb-filename  File name
  EXCEPTIONS
    NO_AUTHORITY = 1            "               You are not authorized for this access
    ACTIVITY_UNKNOWN = 2        "               Access type unknown
    .  "  AUTHORITY_CHECK_DATASET

SAP Documentation for FM AUTHORITY_CHECK_DATASET


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.
    

    HINTS

    The values to be passed as the ACTIVITY are defined as constants in the TYPE-POOL SABC.
    Documentation extract taken from SAP system, Copyright (c) SAP AG





    comments powered by Disqus

    Terms of Service     Contact Us     Privacy Policy     Useful SAP related sites