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: 

PNP authority check

Former Member
0 Kudos

Hi all,

I have a problem with authority check in a report.

I have to access to a field in an infotype and subtype.

I have all authorizations for this subtype and infotype.

I'm trying to retrieve this data from an employee, but this employee has informed another subtype in this infotype where I haven't permisions.

As in the source code there aren't access to this subtype where I haven't permisions, I found that the systems make it's authority check before the START-OF-SELECTION in class CL_HRPAD00AUTH_CHECK_STD, method IF_EX_HRPAD00AUTH_CHECK~CHECK_AUTHORIZATION.

The system takes the employee number, gets all its informed infotypes and subtypes and perform the authority check for my user, so I can't access to this employee information.

I think this authority check is made by the use of PNP logical database.

Is there any way to avoid this authority check?

Regards,

Angel Cepa

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Angel Cepa,

first of all: maybe you can use logical database PNPCE, because PNP is obsolet.

Anyway, please refer to the documentation of PNPCE (transaction SE36), that may solve your problem.

PNP/PNPCE knows two ways to check authority:

1. If no authorization exists for even one individual data record of one of the infotypes used, processing of the personnel numbers is terminated by default (switch "PNP_SW_SKIP_PERNR" = Y)

2. If you set this switch (at the INITIALIZATION or START-OF-SELECTION events) to N, no more personnel numbers (without authorization) are skipped. Only the data records for which no authorization exists are rejected (that is, not made available).

So, simply set the switch, mentioned above, to "N" and you will have access to this employee (except the infotype-records, you don't have authority for).

Regards

CHRIS

2 REPLIES 2

Former Member
0 Kudos

Hi Angel Cepa,

first of all: maybe you can use logical database PNPCE, because PNP is obsolet.

Anyway, please refer to the documentation of PNPCE (transaction SE36), that may solve your problem.

PNP/PNPCE knows two ways to check authority:

1. If no authorization exists for even one individual data record of one of the infotypes used, processing of the personnel numbers is terminated by default (switch "PNP_SW_SKIP_PERNR" = Y)

2. If you set this switch (at the INITIALIZATION or START-OF-SELECTION events) to N, no more personnel numbers (without authorization) are skipped. Only the data records for which no authorization exists are rejected (that is, not made available).

So, simply set the switch, mentioned above, to "N" and you will have access to this employee (except the infotype-records, you don't have authority for).

Regards

CHRIS

0 Kudos

Hi Christian,

It works perfectly.

Many Thanks.

Regards,

Angel Cepa