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

How To Create ABAP Code For HR Context Sensitive Structural Authorization

Former Member
0 Likes
672

Hello,

We have created a HR Custom Program which IS NOT built off the PCH or PNP Logical Database. As a result, we need to manually create ABAP code for HR Context Sensitive Structural Authorization Check in our custom HR program. Via HR Context Sensitive Structural Authorizations, we are restricting access to personnel numbers and the underlying HRP* tables.

Any assistance would be greatly appreciated with the identification of the SAP standard function modules (Ex. RH_STRU_AUTHORITY_CHECK, HR_CHECK_AUTHORITY_INFTY, HR_CHECK_AUTHORITY_INFTY , etc) used in HR Context Sensitive Structural Authorization Check, how they are used to control HR Structural authorization (P_ORGINCON), and some sample code.

.

Thank you in advance for all your assistance,

Ken Bowers

3 REPLIES 3
Read only

mvoros
Active Contributor
0 Likes
574

Hi,

check include DBPNP_PNPCE_AUTH_FORMS. This include is used in logical DB PNP. You can see there is multiple routines. Ideally, you can just include them into your code and call them. If you do that then all BADIs and standard objects will be checked in your custom report.

Cheers

Read only

Former Member
0 Likes
574

Hello Ken

You can use the interface methods IF_EX_HRPAD00AUTH_CHECK to get the same structural authorization as you can see in PA20/PA30. You need to use the methods set_org_assignment and check_authorization for this purpose. For more information you can refer to include FP50PE21 from line 237 onwards till 270.

Regards

Ranganath

Read only

Former Member
0 Likes
574

Thank you very much for your response.

Cheers,

Ken Bowers