Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Profit center authorization based on user

Former Member
0 Kudos

Hi.

I am facing a performance problem which is why I post in this category, however I am not sure if it should be placed elsewhere.

I want to create a search for allowed profit centers for a specific user.

Performance when I use normal Authorit-check is really bad, because I have to loop through a very high number of profit centers.

Is there any standard function module/class where I can specify a user and in return get a list of profit centers this user is authorized for?

If not, how can I optimize my authority check?

(I do not have much knowledge about profit centers and FI in general, so my question may be a little vague).

Thanks, Jesper.

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

Which authorization object are you checking, does it work with the actual profit center number or some sort of authorization group? In the latter case, you can buffer the result for each group in an internal table instead of performing identical checks multiple times.

Thomas

5 REPLIES 5

ThomasZloch
Active Contributor
0 Kudos

Which authorization object are you checking, does it work with the actual profit center number or some sort of authorization group? In the latter case, you can buffer the result for each group in an internal table instead of performing identical checks multiple times.

Thomas

Former Member
0 Kudos

Thanks for your answer.

I am not completely sure as I have been assigned to this task taking it over from another developer.

My problem is that I have a user-name and I need a list of profit centers that he is allowed to use. The first attempt were to loop through all (relevant) profit centers and check authority which was very performance-heavy.

I will talk to the previous developer later so maybe I will be able to give a bit more information then.

0 Kudos

I've used FM SUSR_USER_AUTH_FOR_OBJ_GET to get authorized cost centers for a user. You should be able to pass different parameters to get profit centers. It's documented, so have a look at it.

Since it's not really a performance question, moved to ABAP General.

Rob

Edited by: Rob Burbank on Jan 10, 2012 9:59 AM

Former Member
0 Kudos

Thanks Rob I will look into it!

Former Member
0 Kudos

OK I had to go directly to the tables to get the wanted performance. Even then we chose to store the found data in two tables in a batch-job to gain even better performance.

Moderator message - Please respect the 5,000 character maximum when posting. Post only the relevant portions of code

Edited by: Rob Burbank on Feb 21, 2012 9:11 AM