<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HR selection upto rows issue.... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-selection-upto-rows-issue/m-p/5534014#M1264158</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT a~PERNR b~NCHMC b~VNAMC
INTO TABLE itab_data
from PA0001 as a
inner join PA0002 as b
on a~pernr = b~pernr
up to 5 rows
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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SKJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Apr 2009 20:29:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-30T20:29:38Z</dc:date>
    <item>
      <title>HR selection upto rows issue....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-selection-upto-rows-issue/m-p/5534013#M1264157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a&lt;SUB&gt;PERNR b&lt;/SUB&gt;NCHMC b~VNAMC&lt;/P&gt;&lt;P&gt;       INTO TABLE itab_data&lt;/P&gt;&lt;P&gt;       from PA0001 as a&lt;/P&gt;&lt;P&gt;            inner join PA0002 as b&lt;/P&gt;&lt;P&gt;            on a&lt;SUB&gt;pernr = b&lt;/SUB&gt;pernr&lt;/P&gt;&lt;P&gt;       where a~PERNR in S_PERNR&lt;/P&gt;&lt;P&gt;       and   a~BUKRS in S_BUKRS&lt;/P&gt;&lt;P&gt;       and   a~KOSTL in S_KOSTL&lt;/P&gt;&lt;P&gt;       and   a~PERSG in S_EMPGP&lt;/P&gt;&lt;P&gt;       and   a~PERSK in S_SUBGP&lt;/P&gt;&lt;P&gt;       and   b~NCHMC in S_LAST&lt;/P&gt;&lt;P&gt;       and   b~VNAMC in S_FIRST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jainam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Pressing F1 on SELECT should resolve your issue - post locked&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Apr 30, 2009 4:29 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 19:26:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr-selection-upto-rows-issue/m-p/5534013#M1264157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-30T19:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: HR selection upto rows issue....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hr-selection-upto-rows-issue/m-p/5534014#M1264158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT a~PERNR b~NCHMC b~VNAMC
INTO TABLE itab_data
from PA0001 as a
inner join PA0002 as b
on a~pernr = b~pernr
up to 5 rows
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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SKJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 20:29:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hr-selection-upto-rows-issue/m-p/5534014#M1264158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-30T20:29:38Z</dc:date>
    </item>
  </channel>
</rss>

