Is there a way to get a list of all BUKRS which the current user is allowed to see?
I want to use this list as a filter in open sql. Imagine the result of the method I search stored the result in bk_list
. Then I could use bk_list
like this:
SELECT * FROM some_table WHERE bukrs IN bk_list
I am afraid you can do it one by one only. Roughly:
At the end lt_t001 contains only the company codes, for which the user has authorization.
Another way to do it, based on the class
CL_AUTH_OBJECTS_TO_SQL
(>= 7.50), here the program reads the flights from the read-authorized airline carriers :