Q
Problem solve Get help with specific problems with your technologies, process and projects.

Consolidated report from multiple payroll runs

I am an ABAP developer. We are in the midst of implementing HR. We are having trouble getting payroll results. If we have multiple payroll runs in a given week, how do we get the all the results for the given week? We are using the PNP logical database and don't quite understand the dates on the selection screen? Any advice?

I am an ABAP developer. We are in the midst of implementing HR. We are having trouble getting payroll results....

If we have multiple payroll runs in a given week, how do we get the all the results for the given week? We are using the PNP logical database and don't quite understand the dates on the selection screen? Any advice?


There are several ways to read payroll results. PNP, as mentioned, is one of them. I prefer to use the macro-based code from TRMAC because it provides a more controlled aspect. There is also a BAPI that I have used to varying degrees of success.

The dates on the standard selection screen of PNP are not the way to go because they do not necessarily mean anything to payroll. You can use the alternate selection screen, screen 900 to make more sense and have the program resemble RPCALCXX.

Here's a sample program that reads payroll results using the macro (LOGICAL DB PNP is used):

report zppyro016 no standard page heading line-size 80.
include zpayrolldata.
data: yearper(6).
parameters: p_wt like pa0008-lga01.
start-of-selection.
  get pernr.
  cd-key-pernr = pernr-pernr.
  rp-imp-c2-cu.
  concatenate pn-paper-pabrj pn-paper-pabrp into yearper.
   read table rgdir with key fpper = yearper
                             srtza  = 'A'.
   if sy-subrc <> 0.
     message i899(s1) with 'No stored results for' pernr-pernr.
     sy-subrc = 8.
   endif.
   check sy-subrc <> 8.
  loop at rgdir.
    rx-key-pernr = pernr-pernr.
    rx-key-seqno = rgdir-seqnr.
    rp-imp-c2-ru.
    loop at rt.
      if rt-lgart = p_wt.
        write: / pernr-pernr, rt-lgart, rt-betrg.
      endif.
    endloop.
  endloop.
  commit work. 

The include shown above looks like this:
*----------------------------------------------------------------------*
*   INCLUDE ZPAYROLLDATA                                               *
*----------------------------------------------------------------------*
tables: pcl1, pcl2, pernr.

include rpc2cd09.           "Cluster CD Data-Definition
include rpc2ca00.           "Cluster CA Data-Definition  "XUJP30K079863
include rpc2ruu0.           "Cluster RU Data-Definition
include rpc2rx09.           "Cluster RU Data-Definition internat. part
include rpppxd00.           "Data befinition buffer PCL1/PCL2
include rpppxd10.           "Common part buffer PCL1/PCL2
include: rpppxm00.


This was last published in November 2002

Dig Deeper on SAP HR management

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close