<?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: getting Last Payroll Record in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-last-payroll-record/m-p/2420971#M540443</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;When you fetch the RGDIR records from the CU_READ_RGDIR, it contains SEQNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEQNR number increases by 1 when a payroll is run for that pernr. So, the last SEQNR is the latest payroll record. Remember, this can be a retro payroll run for previous dates, yet it will be the latest payroll run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also get it by using PAYDT, the date on which the payroll was run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run the program RPCLSTRU to get a clear picture. This payroll program will give all the RGDIR records for a PERNR and you can check the dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you click on any of the record, the result will be shown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Navneet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jun 2007 04:03:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-27T04:03:16Z</dc:date>
    <item>
      <title>getting Last Payroll Record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-last-payroll-record/m-p/2420970#M540442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to fetch last payroll record of a pernr,from transaction pc_payresult.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the LDB PNP.&lt;/P&gt;&lt;P&gt;After calling GET PERNR, I am using functions CU_READ_RGDIR and then PYXX_READ_PAYROLL_RESULT to fetch the last active payroll record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But is there any way to &amp;lt;b&amp;gt;directly&amp;lt;/b&amp;gt; fetch the last active payroll record,based on the pernr? Please suggest a way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards&lt;/P&gt;&lt;P&gt;Ananya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2007 03:55:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-last-payroll-record/m-p/2420970#M540442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-27T03:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: getting Last Payroll Record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-last-payroll-record/m-p/2420971#M540443</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;When you fetch the RGDIR records from the CU_READ_RGDIR, it contains SEQNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEQNR number increases by 1 when a payroll is run for that pernr. So, the last SEQNR is the latest payroll record. Remember, this can be a retro payroll run for previous dates, yet it will be the latest payroll run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also get it by using PAYDT, the date on which the payroll was run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run the program RPCLSTRU to get a clear picture. This payroll program will give all the RGDIR records for a PERNR and you can check the dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you click on any of the record, the result will be shown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Navneet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2007 04:03:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-last-payroll-record/m-p/2420971#M540443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-27T04:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: getting Last Payroll Record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-last-payroll-record/m-p/2420972#M540444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Navneet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I want to fetch the Last Payroll Record from the LDB itself and donot want to use the function CU_READ_RGDIR.&lt;/P&gt;&lt;P&gt;Once I get the personnel using GET PERNR,is it possible to use a macro in the LDB to fetch the last payroll for that pernr ?&lt;/P&gt;&lt;P&gt;Or is there some other way to fetch from LDB itself ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Ananya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2007 04:08:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-last-payroll-record/m-p/2420972#M540444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-27T04:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: getting Last Payroll Record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-last-payroll-record/m-p/2420973#M540445</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;To get the payroll results, you need to read the cluster CU to get RGDIR. For this CU_READ_RGDIR is used and almost all standard programs also use this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple Report using LDBs to get latest payroll result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report ythr_read_payroll .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_rgdir type pc261 occurs 0,&lt;/P&gt;&lt;P&gt;      t_result type payus_result,&lt;/P&gt;&lt;P&gt;      w_bt type line of hrpay99_bt,&lt;/P&gt;&lt;P&gt;      out_seqnr like pc261-seqnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get pernr.&lt;/P&gt;&lt;P&gt;  call function 'CU_READ_RGDIR_NEW'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            persnr                = pernr-pernr&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            in_rgdir              = t_rgdir&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            no_record_found       = 1&lt;/P&gt;&lt;P&gt;            import_mismatch_error = 2&lt;/P&gt;&lt;P&gt;            no_read_authority     = 3&lt;/P&gt;&lt;P&gt;            others                = 4.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write:/1 'No payroll results for ', pernr-pernr.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'CD_READ_LAST'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            begin_date      = pn-begda&lt;/P&gt;&lt;P&gt;            end_date        = pn-endda&lt;/P&gt;&lt;P&gt;       importing&lt;/P&gt;&lt;P&gt;            out_seqnr       = out_seqnr&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            rgdir           = t_rgdir&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            no_record_found = 1&lt;/P&gt;&lt;P&gt;            others          = 2.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write:/1 'Error for ', pernr-pernr.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'PYXX_READ_PAYROLL_RESULT'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            clusterid                    = 'RU'&lt;/P&gt;&lt;P&gt;            employeenumber               = pernr-pernr&lt;/P&gt;&lt;P&gt;            sequencenumber               = out_seqnr&lt;/P&gt;&lt;P&gt;       changing&lt;/P&gt;&lt;P&gt;            payroll_result               = t_result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;            illegal_isocode_or_clusterid = 1&lt;/P&gt;&lt;P&gt;            error_generating_import      = 2&lt;/P&gt;&lt;P&gt;            import_mismatch_error        = 3&lt;/P&gt;&lt;P&gt;            subpool_dir_full             = 4&lt;/P&gt;&lt;P&gt;            no_read_authority            = 5&lt;/P&gt;&lt;P&gt;            no_record_found              = 6&lt;/P&gt;&lt;P&gt;            versions_do_not_match        = 7&lt;/P&gt;&lt;P&gt;            error_reading_archive        = 8&lt;/P&gt;&lt;P&gt;            error_reading_relid          = 9&lt;/P&gt;&lt;P&gt;            others                       = 10.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    write:/1 'Error for ', pernr-pernr.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_result-inter-bt into w_bt.&lt;/P&gt;&lt;P&gt;    write:/1 pernr-pernr, out_seqnr, w_bt-bankl, w_bt-bankn.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Navneet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2007 05:05:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-last-payroll-record/m-p/2420973#M540445</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-27T05:05:04Z</dc:date>
    </item>
  </channel>
</rss>

