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: 

getting pernr

Former Member
0 Kudos

I have a internal table containg ssn number only,now i want to select pernr from pa0002 into an internal table comparing each ssn number from the previous internal table.Can anybody tell me the detail code.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

use this..

select pernr

perid

from pa0002

into table itab1

for all entries in itab

where perid = itab-perid.

3 REPLIES 3

Former Member
0 Kudos

use this..

select pernr

perid

from pa0002

into table itab1

for all entries in itab

where perid = itab-perid.

Former Member
0 Kudos


  DATA: itab2 LIKE pa0002 OCCURS 0 WITH HEADER LINE.

  SELECT * FROM pa0002 INTO TABLE itab2 FOR ALL ENTRIES IN itab1
                          WHERE  perid = itab1-ssn.

Former Member
0 Kudos

hi,

You can try this.

select distinct Pernr
                     perid
for all entries in itab1
into table itab2
where perid EQ itab1-ssn.

This will help you to get Distinct Pernr.

Regards

Sumit Agarwal