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: 

Want to delete the records from Standard Infotype where PERNR is Blank

Former Member
0 Kudos

HI Experts,

I have a simple problem.

There are few blank PERNRs are in infotypes PA0001 and PA0002 in Production.I have to remove them.

These blank PERNRs records are populated there because of some mistake.

This can not be done in production.

I have checked many FMs ,but couldnt find the correct one.

Now I want to use a simple query to delete the records.Please tell me the query to delete the records.

First i used to read these empty records but failed to do so by the following query.

select * from PA0001 into table it_pa0001

where PERNR = ' ' .

This query is not reading any record.

I used PERNR is NULL then also it is not working.I used other key fields but it is fetching other records then blank PERNRs.

Kindly suggest.

~Sachin

6 REPLIES 6

MarcinPciak
Active Contributor
0 Kudos

PERNR is key field in all infotypes, while for all FMs which work with infotypes this field is obligatory . Such entry should never come to production. If this happened, this should be removed by some backdoor operation. Direct table record deletion I guess is here the only (though not necessary safely) way of handling that.

Correct query would be


select * from PA0001 into table it_pa0001 
where PERNR = '00000000' .

PERNR is of type NUMC 8, so default value is not space but 8 zeros.

Regards

Marcin

0 Kudos

Hey Marcin

...Thanks for the reply....yes you are right ,it should have not been populated in the Infotype.

I have checked this query also...but it is not working.

Thanks

Sachin

0 Kudos

Sachin,

For me all three variants are working


"1
tables pa0001.
select single * from pa0001 where pernr = '00000000'.

"2 
select single * from pa0001 where pernr = space.

"3
select single * from pa0001 where pernr = ''.

Please ensure the client you are executing the query is correct. Also direct SE16N check with conditon PERNR = empty should confirm that.

Regards

Marcin

0 Kudos

Hi,

There is no need to run a select query if you want to delete the records for which pernr is not assigned..

Run the standard report RPUDELPN and it will delete all the data in prod server

Regards

Abhinav

Former Member
0 Kudos

Hi,

delete pa0001 where pernr = '00000000'.

it will be useful.

Ram.

Former Member
0 Kudos

use transaction PU00

personal No = 00000000

Thanks,

Anshul