Skip to Content
Technical Articles
Author's profile photo Thiago Moya

Automating authority-check in Z/Y transactions

Hello guys.

After some years, I’ve faced with a new project that could be a little bit boring, that were called “check user authorizations in Z transactions” in the security information sector, but in the end of the day, it was funny.

The number of Z transactions were higher than I expected, something like 1000 transactions, so after some thinking, I’ve found a “automatic” way to deal with it.

Go to SE24 and create a Simple Class.

Then, create a STATIC method.

In parameters, I’ve used 10 id and 10 field check, that’s the maximum that the standard command authority-check object support.

In my logic I’ve not considered the “DUMMY” check, it makes no sense to use when we talk about the security information.

The method will check throught the maximum of id’s and fileds to the minimum, like this way:

A simple test to check if it is working as expected.

Using display Like ‘I” in message.

And the most important, the SU53 values to be used to map the authorizations needed by the user.

That’s it guys, the Abap version used on this customer is the 731, so not so much to do about “advanced” programing.

I hope it could help someone, see you on the next.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Paul Hardy
      Paul Hardy

      If you have your authority-check class as (a) implementing an interface and (b) the method is an instance method, then you can use it in unit tests, replacing the real authority check class with a test double during the methods being tested.

      Cheersy Cheers

      Paul