Quantcast
Channel: SCN: Message List - ABAP for SAP HANA
Viewing all articles
Browse latest Browse all 2110

Re: Authority Check on DatabaseConnection for HANA

$
0
0

Hi,

 

If different packages are customized development and assigned to different DB connection name, there is a possibility you can use S_DBCON object to check though that is not the original intention as Lars mentioned.

 

Sample routine:

* Check authority to access the specified connection
  IF con_name IS NOT INITIAL.
    AUTHORITY-CHECK OBJECT 'S_DBCON'
             ID 'DBA_DBHOST' FIELD space
             ID 'DBA_DBSID'  FIELD con_name
             ID 'DBA_DBUSER' FIELD space
             ID 'ACTVT'      FIELD '03'.
  ENDIF.

  IF sy-subrc <> 0.
    MESSAGE
      'You are not authorized to run this program' TYPE 'I'.
    RETURN.

 

A user without the assigned DB connection name is unable to execute objects in a package when that connection is not assigned to him.

 

Regards.

YS


Viewing all articles
Browse latest Browse all 2110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>