Skip to Content
0
Former Member
Apr 30, 2009 at 07:26 PM

HR selection upto rows issue....

13 Views

Hello,

I am using following query to select data from HR infotype tables. Now I want to put a restriction that, select the data below only until maximum number defined.

What I mean to say is if someone enters Last name as 'smith' and I define the maximum number as 5, then only 5 personnel number should be fetched, even if there are 50 personnels with same kind of last name. How can I do this with upto rows ?

SELECT aPERNR bNCHMC b~VNAMC

INTO TABLE itab_data

from PA0001 as a

inner join PA0002 as b

on apernr = bpernr

where a~PERNR in S_PERNR

and a~BUKRS in S_BUKRS

and a~KOSTL in S_KOSTL

and a~PERSG in S_EMPGP

and a~PERSK in S_SUBGP

and b~NCHMC in S_LAST

and b~VNAMC in S_FIRST.

Regards,

Jainam.

Moderator message - Pressing F1 on SELECT should resolve your issue - post locked

Edited by: Rob Burbank on Apr 30, 2009 4:29 PM