PNPCE -- Payroll results

When using PNPCE LDB, how to retrive payroll record for an employee.
Regards
Manvi

Hi,
Please refer to the following code.
Basically the payroll data is stored in  the Cluster tables PCL1 and PCL2.
If help ful please reward points.
Regards,
Irfan Hussain
*& Report  ZHR_READ_CLUSTER                                            *
REPORT  ZHR_READ_CLUSTER                        .
TABLES : PERNR,
       PCL1,
       PCL2.
Infotypes : 0001,
           0002.
Data : molga like t001p-molga,
     num  like pc261-seqnr.
                   STANDARD INCLUDES                                *
INCLUDE rpc2cd09.  " Data Definition - CD Cluster INCLUDE rpc2ca00.  " Data Definition Import/Export Macros for ClusterCA INCLUDE rpc2ruu0.  " Data Definition for Cluster RU (USA) INCLUDE rpc2rx09.  " Cluster RU Data-Definition internat. part INCLUDE rpppxd00.  " Data befinition buffer PCL1/PCL2 INCLUDE rpppxd10.  " Common part buffer PCL1/PCL2 INCLUDE rpppxm00.  " Buffer handling routine
Start-Of-Selection.
Get Pernr.
rp_provide_from_last p0001 space pn-begda pn-endda.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
   persnr                  = pernr-pernr
IMPORTING
MOLGA                    = molga
tables
   in_rgdir                = rgdir
EXCEPTIONS
NO_RECORD_FOUND          = 1
OTHERS                  = 2
IF sy-subrc = 1.
write /: 'No Records Found'.
ENDIF.
CALL FUNCTION 'CD_READ_LAST'
EXPORTING
   begin_date            = pn-begda
   end_date              = pn-endda
IMPORTING
OUT_SEQNR            = num
tables
   rgdir                = rgdir
EXCEPTIONS
NO_RECORD_FOUND      = 1
OTHERS                = 2
IF sy-subrc = 1.
write :/ ' No Payroll Exist'.
ELSE.
rx-key-pernr = pernr-pernr.
rx-key-seqno = num.
rp-imp-c2-ru.
IF SY-SUBRC = 0.
PERFORM PRINT_FORM.
ELSE.
WRITE :/ 'Results Could not be read this time'.
endif.
ENDIF.
*&      Form  PRINT_FORM
     text
-->  p1        text
<--  p2        text
form PRINT_FORM .
DATA : l_betrg LIKE p0008-bet01,
     l_betrg1 like p0008-bet01.
read table rgdir with key seqnr = num.
IF sy-subrc = 0.
   WRITE:  /1 'Empd id' COLOR 1,20 p0001-pernr COLOR 5,
           /1 'Name' COLOR 1,20 p0001-ename COLOR 5,
           /1 'Personnel Area' COLOR 1,20 p0001-werks COLOR 5,
           /1 'Personnel Subarea' COLOR 1 ,20 p0001-btrtl COLOR 5.
   SKIP 1.
   WRITE: / 'For-period' COLOR 1, 30 rgdir-fpper  COLOR 3,
           / 'In-period' COLOR 1, 30 rgdir-inper COLOR 3.
   SKIP 1.
ENDIF.
loop at crt where lgart = '/101' or lgart = '\5UH' .
       if crt-cumty = 'Q'.
             l_betrg = l_betrg + crt-betrg.
       endif.
endloop.
loop at crt where lgart = '/102' and cumty = 'Y'.
           l_betrg1 = l_betrg1 + crt-betrg.
endloop.
l_betrg1 = l_betrg1 / 4.
l_betrg = l_betrg + l_betrg1.
write :/ l_betrg.
endform.                    " PRINT_FORM

Similar Messages

  • Reading Payroll Results using PNPCE

    Hi All,
    As far as reading infotypes/master data is concerned, I am comfortable using "PNPCE" instead of logical database "PNP".
    Can any one tell me how can I read payroll results using "PNPCE". Since Get payroll event is not available in pnpce.

    Hi khalid,
    1. U want the remuneration (monthly salary )
    2. U won't get it DIRECTLY from any table.
    (Its stored in cluster format)
    3. Use this logic and FM.
    DATA: myseqnr LIKE hrpy_rgdir-seqnr.
    DATA : mypy TYPE payin_result.
    DATA : myrt LIKE TABLE OF pc207 WITH HEADER LINE.
    SELECT SINGLE seqnr FROM hrpy_rgdir
    INTO myseqnr
    WHERE pernr = mypernr
    AND fpper = '200409'
    AND srtza = 'A'.
    IF sy-subrc = 0.
    CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
    EXPORTING
    clusterid = 'IN'
    employeenumber = mypernr
    sequencenumber = myseqnr
    CHANGING
    payroll_result = mypy
    EXCEPTIONS
    illegal_isocode_or_clusterid = 1
    error_generating_import = 2
    import_mismatch_error = 3
    subpool_dir_full = 4
    no_read_authority = 5
    no_record_found = 6
    versions_do_not_match = 7
    error_reading_archive = 8
    error_reading_relid = 9
    OTHERS = 10.
    myrt[] = mypy-inter-rt.
    READ TABLE myrt WITH KEY lgart = '1899'.
    4. the internal table myrt
    will contain what u require.
    regards,
    amit m.

  • Looping payroll results using pnpce ldb

    hii experts,
    Can anybody tell me how can v loop payroll results using pnpce ldb..plz provide me the syntax...or any reference report
    program.

    Hi First Using Get peras event read the RGDIR results as below
    CALL FUNCTION 'CU_READ_RGDIR'
        EXPORTING
          persnr          = p_pernr
        IMPORTING
          molga           = p_molga
        TABLES
          in_rgdir        = p_rgdir
        EXCEPTIONS
          no_record_found = 1
          OTHERS          = 2.
    Get the Cluster ID based on the molga value of the employee using T5001 table
    Then Based on the RGDIR results loop retrive the payroll results below
        LOOP AT gt_rgdir INTO wa_rgdir WHERE fpbeg LE wa_dates-endda AND fpend GE wa_dates-endda
                            AND srtza EQ c_a
                            AND payty EQ c_space.
      CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
            EXPORTING
              clusterid                    = wa_t500l-relid
              employeenumber               = pernr-pernr
              sequencenumber               = wa_rgdir-seqnr
              read_only_international      = 'X'
            CHANGING
              payroll_result               = gt_result
            EXCEPTIONS
              illegal_isocode_or_clusterid = 1
              error_generating_import      = 2
              import_mismatch_error        = 3
              subpool_dir_full             = 4
              no_read_authority            = 5
              no_record_found              = 6
              versions_do_not_match        = 7
              error_reading_archive        = 8
              error_reading_relid          = 9
              OTHERS                       = 10.

  • Payroll results could not be imported/Error in Finance Posting of Payroll

    Hi friends,
    Please help me.
    I have created three wage types
    2001-Basic Pay
    2002-HRA
    2003-Conveyance
    When I generated remuneration statement all these three wage types where displayed along with EE EPF contribution and VPF contribution which I have assigned earlier in infotype.
    After that for posting to FI, I created three symbolic accounts
    (Basic, HRA and Conveyance together as 0001 symbolic account I(accounted posting to expense report)
    Employees contribution to PF ( i.e.EE EPF contribution and EE VPF contribution) to (PFEE) symbolic account II (accounted posting to balance sheet)
    Employers contribution to PF ( i.e Employer PF contribution and Employer pension contribution) to (PFER) symbolic account III (accounted posting to expense report)
    After this I have grouped employees as 3 for salaried employees, after this I have assigned the same to number 3 to PPMOD under three (I am not sure this is correct, please advise)
    Then with the help of an FI consultant, I assigned PFEE to balance sheet and 0001 and PFER to expense account.
    Now when I activated 'Execute Run' for finance posting of payroll of a personal number an error is shown 'Errors Occured! Check Error Log' “ payroll results could not be imported”.
    I doubt I missed some steps. Please help

    Dear Naveen and Stephen
    This is the message which I got
    <b><b>Payroll results could not be imported
    Message no. 3G112
    Diagnosis
    The payroll results for this employee could not be imported from the database.
    Procedure
    Check the consistency of the payroll results for this employee.</b></b>
    Please help
    Regards
    Santhosh.S

  • Help Required : Adding new Wagetype to IT 0402 Payroll Results

    Dear Experts,
    I am adding a new Wagetype to show in Payroll results. At the step of setting up payroll infotypes a workbench request is created. When I transport this request from my Development server to Quality server I get the following error
       "Table CI_P0402 could not be activated"
    Can anyone please guide me regarding this issue.
    Regards,
    Talha Aftab

    For anyone else facing the same issue : You have to make sure the data elements part of CI_P0402, like ZZTELXXXXX are transported as well. They were not automatically part of my transport, which is why it worked fine on my DEV server, but couldn't be activated when I transported to QAS (The data elements are created for each new wagetype when they are added to 0402, and it is set up)
    Regards,
    Talha Aftab

  • Urgent : Posting Payroll results from legacy system to SAP Fi /C0

    Hi Experts,
                A client requirment is such that they have to post payroll results to FI/Co
                They are not using SAP HR- Payroll module . They use their own payroll 
                 processing system . 
                 Please tell what would be the best way of doing so 
                  Help is urgently required
    Nidhi

    To be more specific, Pavani is referring to create a new inbound - custom program, which can create IDOCs in SAP system and transfer the data to FI - CO module.
    If your client has all the infrastructure for a new interface development, like XI system or IBM - Mercator system, Out bound interface for Third party payroll system, Interface - ABAP team, then it could be planned to develop the SAP inbound interface.
    Hope this helps.
    Narasimha

  • How to clear UNB table in the payroll result?

    Hi,
    We are getting the payroll error- The gross wages do not cover the negative offset that has been forwarded. Therefore, no gross up is permitted while running the Grossup.
    I see the below table "UNB table" in the last payroll result. "UNB - Unbalance table used for tax retrocalculation" .
    I think we are getting the above error because of this UNB table, can anyone help me to how to clear this table?
    When we run the regular payroll, no tax is being deducted.
    Please help
    Saurabh

    Hi Arti,
    Thanks for your reply!!..
    Seeing your reply, it gives me bit confidence to crack the existing problem, however, I'm still not clear with your answer... let me explain you the problem-
    1. Employee was given 350,000 though Taxable Bonus WT with regular pay check
    2. Later it came to know- out of the above amount, 75000 was Grossup amount
    3. So in next payroll run, they entered -75000/- in regular Taxable bonus WT and +75000 in Grossup WT and also they deleted one IT210 record of GA tax authority which was wrongly created; and ran the payroll
    4. Since then, in next payroll period- No tax is being deducted, so we are creating IT221 infotypes with Tax wagetype
    5. If we are running the Grossup wage, payroll error- The gross wages do not cover the negative offset that has been forwarded; therefore, no grossup is permitted.
    While running the regular payroll, overpayment Wagetype is being generated.
    Now, I saw this UNB table is created and the below wagetype are there in the UNB table-
    WT /5UT amount 0.00
    WT 5430 amount -75000
    WT 0200 amount 12500 ( Monthly salary)
    WT 4530 amount 350000
    Now I am thinking, if we are deducting tax through IT221,if we clear this UNB table, our problem might get resolved
    It will be a great help for me if you can tell-
    1. how to check, claims process is implemented or not?
    2. I have good HCM experiece but this claims process is very new to me- pls guide me how to do that
    Waiting for your reply, thanks in advance
    Saurabh Garg

  • Payroll results could not  be imported

    Hi,
    We are facing a problem while posting payroll results to FI/CO...
    Error is " Payroll results could not be imported "..
    Kindly help
    its real urgent
    hr_user

    Hai..
    Check the sub schema
    XPR0 & XLR0...
    Import previous result current period
    Import last payroll result
    Edited by: Ram Manohar on Mar 24, 2008 5:07 PM

  • Posting payroll results to FI : error F5 808

    Hi all,
    While posting payroll results to FI, we have the following error
    F5 808 Field Assign. is a required field for G/L account XXXX 1111111111
    XXXX is the company code
    1111111111 is the account number
    The field "Assignement" is set to required in table T004V(field status variants) in FI customizing and they can't change it to optional.
    is there a standard way to correct this? should we implement an exit user (definition SMOD_PCPO0001)?
    Thanks
    Karim

    Check the Posting Keys and Field Status Group through tcode OB41 and also check the below thread ...
    [where can i fill the "assign." when posting payroll to GL error f5808;
    Mohan

  • Error while posting payroll results to FI -IN PY

    Dear Consultants,
    When I am posting Payroll results to FI I am able to see the + amount and - amount is equal still it giving error and when I check PCP0 it says incorrect document generated. Please do needful.
    Error message: Error in document: HRPAY 0000000094 DEVCLNT200
    Error in document: HRPAY 0000000094 DEVCLNT200
    Message no. RW609
    Diagnosis
    Errors occurred when checking or posting the document
    Reference type = HRPAY
    Reference key = 0000000094
    Logical system = DEVCLNT200
    You can find the errors in the log.
    System Response
    The document cannot be posted.
    Procedure
    Remove the error in the document and create and post the document again.
    Second error message : Posting period 012 2012 is not open
    Message Text
    Posting period 012 2012 is not open
    Technical Data
    Message type__________
    E (Error)
    Message class_________
    F5 (Document Editing)
    Message number________
    201
    Message variable 1____
    012
    Message variable 2____
    2012
    Message variable 3____
    +
    Message variable 4____
    COSM
    Message Attributes
    Level of detail_______
    2 (Level of detail 2)
    Problem class_________
    Sort criterion________
    Number________________
      1
    Environment Information
    Item__________________
    000
    Please do needful, why this error is coming even though the +and - amount are equal.
    Regards,
    Naresh.KM

    Dear Siva,
    Sorry for delay in reply, as per my understanding I have done the assignment correctly, and the same arrears are coming in RT table as well as in payslip. When I checked the report RPDKON00 I have got a list of wage types assigned to GL account under Country grouping 40,
    A.Define wage type posting characteristics : I have copied arrears, carryforward wage types from their original wage types.
    Example : From Basic pay (which is using in infotype 0008)  I have copied Basic arrear wage type and basic carryforward wage type. and assigned the same in ZN42, ZN43, ZN44 and did the assignment.
    B. Define symbolic account : I have copied the symbolic account which is assigned to Basic wage type and copied the same and created new symbolic account and assigned to only basic arrear wage type which is coming in RT table.
    C .Assigned wage type to symbolic account : I have not assigned arrear wage type symbolic account to Original wge type in V_T53EL. Only Basic wage type symbolic account is mapped here.
    D Mapping symbolic account to G/L account : I have assigned the arrear wage type Symbolic account to the same GL which is assigned to original Basic wage type symbolic account.
    I have followed the same process for all the arrear wage types, and even the report RPDKON00 it is showing the same there is no error message.
    Apart from that I have created a New Symbolic account for /ZF5 and did all assignment, and assigned /ZF5 wage type symbolic account to /3F1 wage type symbolic account and GL mapping also same as /3F1.
    In Standard /552 arrear process there is no /ZF5 postings it will directly deduct the amount.
    Please suggest do I need to check any other area or how can I solve this error. kindly do needful.
    Regards,
    Naresh.KM 

  • Error while posting payroll results to FI  - Documents not getting created

    Hi all,
    While posting payroll results to FI for Dec 2011 a failure of our Production Server resulted in erroneous posting of payroll
    results. Posting run no: 1756 did not get posted at all though the run
    status shown was "document posted". The issue was resolved by resorting
    to manual posting of entries.
    Now we are unable to post payroll results for Jan 2012 for the same
    range of employee numbers for whom the manual posting was made for Dec
    2011. No posting documents are getting created.
    Kindly suggest how to resolve the issue.
    Regards,
    Sunil

    Hi All,
        I raised an OSS for the issue. SAP Support provided a solution for the problem. The solution involved cancelling a reversal which we had tried and failed followed by re posting the run no 1756. Our manual entries had to be reversed.The solution is given below.
        Please follow these steps:
    - Select the posting run 1756
    - Menu => Edit => Reversal => Reset after termination
    - After last step the status of the posting run should appear as
    'documents posted'
    - Go to transaction SM13
    - Select by user 8273 and date 02.01.2012
    - You should see an entry like this:
    400 8273 02.01.2012 15:26:57 @07\QEnqueues released@ Error
    - Select the entry and press the button 'Single test'
    - In case the system shows an error, please send the message back to us
    - In case the system shows no errors => press button 'Repeat update'
    - Then check in PCP0 and FI is the document has been correctly posted.
    Regards
    Sunil

  • Error while posting the payroll results to accounts

    Dear all,
    Im facing a issue while posting the payroll results to the accounts in T.code PC00_M99_CIPE,
    The error log says...
    Inconsistence in payroll results (tables V0/RT)
    Diagnosis:
    An inconsistency results has been found during the evaluation of the payroll results. No referenced entry has been found in table V0.
    Can anybody suggest me wat i hav to do...
    Thanks & regards
    Gopinath.Balakrishnan

    Hi
    Check whether the user is having the authorisation for the t.code PC_PAYRESULT or PC00_M40-PAYRESULT.
    Because some times HR user will run the payroll and FI user will do the postings. If FI user is doing the postings, in general he will not have the authorisation for HR T.codes, then system will give such kind of errors.
    If not check the paryoll results and control record.
    Thanks & Regards
    Bharathi

  • Delete every payroll results in the system

    Hi experts,
    There is a special Test system where External useres can login to the system, so we'd like to delete every paroll results in the system.
    My question is how can I do that * correctly & efficiently*?
    I know that there is a report for that:  "RPUDEL20"  but imagine a company with 14.000 employees. So using the logical databse, and deleteing the paroll results ony-by-one, will took more than a day
    My idea is to delete every record in the tables:
    HRPY_RGDIR
    HRPY_WPBP
    HRPY_GROUPING
    P01O_ZVB_RR
    This is definetelly the fastest way, but is a good solution?
    I mean what about the 0003 infotype (payroll status)  and other relations to the payroll results? What will happen if I delete the tables?
    There is no payroll testing in this system, we're using this system for  ESS testing, so the payroll results are not relevant, but all other masterdata (PA and PD infotypes) are relevant.
    I'm happy to hear any idea
    Bye
    N.

    Hi everyone,
    Thank you for the answers,  but I don't understand how can the LSMW help me. As I know the LSMW is a data migration tool. I don't want to import anything to the sap system, I just want to delete the existing payroll results. How does the LSMW help me in this?
    Thanks
    N.

  • Posting Payroll results to FI with special G/L account

    Hi,
    We need to post some payroll results to special G/L accounts. SAP documentation say it's not possible. How can we manage that? any solution or suggestion is welcome.
    Thanks
    K.

    Thanks for replying.
    I need this to be done for all employees.
    I need to post some wagetypes to vendor accounts. the issue is : SAP doesn't allow to use special G/L indicator with posting to vendor accounts, which is the requierement in my case.
    I'm wondering if there is another solution to make this possible.
    regards,
    K.

  • Function module for reading payroll results

    HI,
    I need a function module for reading payroll results RT table.
    Import parameters are personal number, payroll area, and payroll period.
    Export should be RT table.
    Regards,
    Wasim Ahmed

    Hai Wasim
    Check the following Code
    data: payroll_cluster like t500l-relid.
        call function 'PYXX_READ_PAYROLL_RESULT'
             exporting
                  clusterid                    = payroll_cluster
                  employeenumber               = pernr-pernr
                  sequencenumber               = payroll-evp-seqnr
                READ_ONLY_BUFFER             = ' '
                READ_ONLY_INTERNATIONAL      = ' '
                CHECK_READ_AUTHORITY         = 'X'
           IMPORTING
                VERSION_NUMBER_PAYVN         =
                VERSION_NUMBER_PCL2          =
             changing
                  payroll_result               = payroll_us
            exceptions
                 illegal_isocode_or_clusterid = 1
                 error_generating_import      = 2
                 import_mismatch_error        = 3
                 subpool_dir_full             = 4
                 no_read_authority            = 5
                 no_record_found              = 6
                 versions_do_not_match        = 7
                 others                       = 8
        if sy-subrc <> 0.
          if sy-subrc <> 0.
            write: / 'Fehler beim Laden des US Abrechnungsergebnisses'(003).
            write: /'zu Personalnummer'(008), pernr-pernr,
                    'bei Sequence-Number'(012),
                     payroll-evp-seqnr.
            write: /  'Fehlercode ='(004), sy-subrc.
          endif.
        endif.
    Thanks & regards
    Sreenivasulu P

Maybe you are looking for

  • How do I update an app that is no longer in the app store? The app is still on some users' phones.

    We want to remove ads and put a notice in an app for the users that still have the app on their phones. The app is no longer available in the app store.

  • Add Timestamp

    Hi,    In my scenario, I am sending XML file to mail using Receiver mail adapter. Now I want to add a timestamp to this file name. Can someone has any idea how to achieve this? Thanks bpr

  • Migrating from 1.x on NT

    How do I migrate from an earlier version on NT? <P> Migrating from a Calendar Server 1.0x Windows NT installation <P> NOTE: Because Calendar Server 1.0x used an internal or non-LDAP directory, migrating from this version requires steps to import the

  • How do i eliminate in downloaded forms "FORMTEXT" so i can print them

    How do I eliminate in downloaded forms "FORMTEXT" which is in areas that i would fill in manually by hand. When I print they have that in the space. Thanks

  • Re: Latest update failed

    Hi All, I am using HP Touch pad and I am facing installation problem. I have to install  application updates  as suggested by system but not able to install it. Although I have checked all the setting but again facing same problem and I have already