cancel
Showing results for 
Search instead for 
Did you mean: 

GetSystemPermission always returns 1 when authorization "Disable DI API Permission Check" has full authorization

thilo-simonstudt
Discoverer
0 Kudos

Hi everyone,

i've encountered a problem with the function GetSystemPermission in SAP 9.1 PL08.

It seems that there is a new SAP authorization called "Disable DI API Permission Check" wich prevents GetSystemPermission from getting correct results, it always return 1.

So i've got 2 questions about this:

1. Shouldn't the authorization handled more in a positiv way like "Enable DI API Permission", because this can lead to massive problems when using the GetSystemPermission function when this function is deactivated by Default for every new and existent user in SAP

2. Did i missed that GetSystemPermission ist obsolet and there is a new way to check user permissions?

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi Thilo,

The Disable DI API permission check is to by pass the permission restriction when the user is using the DI API object.

Thus, when this is set to Full Authorization, All permission will returns Read/Write enabled (1) and this DI API user will have access like a super user.

in view of the above, i think i should agree with you that we should be able to check the 'original' state of permission even though the 'Disable DI API permission check' is turned on, with this we could at least control our add on behaviour.

Regards

Edy

AdKerremans
Active Contributor
0 Kudos

Hi Edy,

Where can I find the Disable DI API permission check?

Regards

Ad

edy_simon
Active Contributor
0 Kudos

Hi Ad,

It is under the main menu - Administration - System Initialization - Authorization - General Authorization.

Expand the General Tree and it is the last authorization in this tree after the 'SAP HANA Database...' authorization.

It is available in 91PL5. (Am not sure the previous PL)

I can confirm that it is not available in 90PL16,

Regards

Edy

AdKerremans
Active Contributor
0 Kudos

Hi Edy,

Thanks, I was hoping I could set it in my program.

Regards

Ad

edy_simon
Active Contributor
0 Kudos

Hi Ad,

Please take a look at REFDI.chm search for SetSystemPermission.

Seems like we can set it, but the permission lists does not list out the ID for this permission.

Not sure if it is not updated, or they intentionally not disclosing it.

If you ever find what the ID is, please do share it with us.

Note, I believe only a superuser can set this though.

Regards
Edy

Answers (1)

Answers (1)

pdomingues
Explorer
0 Kudos

Hello.
I have the same problem in SAP 9.2 PL 07...
I have a scenario, where i'm using the method "GetSystemPermission", to see if a user as permission to a Price List Group, and the method should return 2 and it returns 1 allways...
The result is allways the same, when "Disable DI API permission check" is Full Authorization, ou any other value... And this is a real problem, because my costumer as an addon to change automatically the price in same price lists, but not all users have full permissions...
Can anyone help?