Application Development and Automation 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: 
Read only

Making a complex authorization check for a specific user

Former Member
0 Likes
1,288

Hi

I have implemented an authorization check like this with success:

K_PCA_RESP_AUTHORITY_CHECK

The check is made to see if the actual user has authoriszation to the profitcenter, and the hierarchy is also checked.

This is fine.

My new need is to run the same check in a remote function call, with the user id as a parameter.

User id is not a parameter on the function module K_PCA_RESP_AUTHORITY_CHECK, and I cannot find a similar module with user id as input.

Any ideas of how to fix that problem?

Br

Soeren Holmen

Hi

I have implemented an authorization check like this with success:

K_PCA_RESP_AUTHORITY_CHECK

The check is made to see if the actual user has authoriszation to the profitcenter, and the hierarchy is also checked.

This is fine.

My new need is to run the same check in a remote function call, with the user id as a parameter.

User id is not a parameter on the function module K_PCA_RESP_AUTHORITY_CHECK, and I cannot find a similar module with user id as input.

Any ideas of how to fix that problem?

Br

Soeren Holmen

4 REPLIES 4
Read only

Former Member
0 Likes
1,124

Hi Soeren,

please try to use function module SU_RAUTH_CHECK_FOR_USER.

Regards,

Klaus

Read only

Former Member
0 Likes
1,124

Thank you Klaus

I allready tried that, but the function module K_PCA_RESP_AUTHORITY_CHECK is more than a authorization check, it searches the profitcenter hierarchy also.

If it was a simple authorization check, your suggestion would be the solution.

Regards

Soeren

Read only

0 Likes
1,124

Hi Soeren,

just an idea.

SUBMIT report USER user VIA JOB ... AND RETURN.

In this report call fm K_PCA_RESP_AUTHORITY_CHECK in INITIALIZATION and try to pass the result back to your report.

Regards,

Klaus

Read only

Former Member
0 Likes
1,124

Klaus, good idea from you.

I tried it out, and It works for me.

We have to consider if we like the architecture of this, but it works.

Thank you 🙂

Regards

Soeren