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: 

GET PERNR skips some employees in the report

former_member636500
Participant
0 Kudos

Hi all.

This is my first post in this forum. I'm beginner in ABAP programming and I've got a issue in my report that I don't succeed in solving it.

In the first line of the source code, within the start-of-selection event, I use the GET PERNR command to bring the employee personnel numbers. While I was debugging I've noted this command was skipping some employees. There isn't any line of code before the GET PERNR.

Do you have any ideia about what's happening?

Thanks in advance.

Tiago.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

good

r u using any loop statement before the get pernr statement,check your condition,i hope if you have given any condition to get the pernr than some of the conditions are not satisfying.

thanks

mrutyun^

7 REPLIES 7

Former Member
0 Kudos

there can be 2 reasons -

1) Either something is wrong with the selection criteria u have given on selection screen of PNP

2) or the pernrs which are not getting read are locked ,to read pernrs which r locked ,

PL use this piece of code in your Program..

INITIALIZATION.

PNP-SW-IGNORELOCKEDRECORDS = 'N'.

see if it works..

reward if helpfull

amit

Former Member
0 Kudos

hi

good

r u using any loop statement before the get pernr statement,check your condition,i hope if you have given any condition to get the pernr than some of the conditions are not satisfying.

thanks

mrutyun^

0 Kudos

Hi Amit, Mrutyunjaya.

I used the piece of code suggested by Amit but it hadn't the desired result in the DEV environment. The issue remained. Amit, this alternative suggested by you would work in the Production environment instead?

Thanks in advanced.

Tiago.

0 Kudos

Hi,

Are the employees are in active state, also check the authorization. If there are authorization restriction than those employees will not come.

Regards,

Ramu N

0 Kudos

Hi Ramu,

Must this checking be done in the source code?

Thanks in advance.

Tiago.

0 Kudos

HI Tiago,

here is another probably cause. The dates. It´s important that the employees,

are active in the infotype(I think that is Infotype 0), in the dates that check your program. It´s useful to know

the selection data period (pnpbegda/pnpendda), the employees selection data (pnpbegps/pnpendps), the radiobutton selection data (pn-begda/pn-endda), of the pnp logical d.b.selection screen. You can see the values of these fields debbuging Ah!, another point, start-of-selection & Get pernr, are differents events in the execution of an abap program.

Hope this lines help you!

Carles

0 Kudos

Hi Carles

Your reply solved my issue. There was a selection screen parameter (pnpstat2-low) preventing some employess. I wouldn't know that in HR module a screen parameter would be related to the GET PERNR selection.

Thank you very much Carles, Amit, Mrutyunjaya and Ramu.

Tiago.