Payroll code

Hi
Can you send me simple payroll code using
GET PAYROLL event.
i know the function module method.
thanks&regards,
Quavi

Hi,
   you can also use classes to read payroll without using GET Payroll event !!!
check out ( OSS note # 699276 )
The logical database GET PAYROLL has now been replaced with the class CL_HRPAY99_PRR_4_REPORTING. "PRR" is "Payroll Result Reader". It is succeeded by CL_HRPAY99_PRR_4_PNP_REPS and CL_HRPAY99_PRR_4_PNPCE_REPS, for use in programs with the logical database PNP or PNPCE (multiple payroll).
These two classes are further succeeded by three classes that allow free period selection, individual day selection, or settlement run selection. Only these may be instantiated to read payroll results. They are:
CL_HRPAY99_PRR_4_PNP_TISPAN
CL_HRPAY99_PRR_4_PNP_SNGDAY
CL_HRPAY99_PRR_4_PNP_PAYPER
CL_HRPAY99_PRR_4_PNPCE_TISPAN
CL_HRPAY99_PRR_4_PNPCE_SNGDAY
CL_HRPAY99_PRR_4_PNPCE_PAYPER
To simplify the class instantiation, the method GET_INSTANCE is available as an alternative. If you have multiple payroll, use CL_HRPAY99_PRR_4_PNPCE_REPS->GET_INSTANCE; otherwise use CL_HRPAY99_PRR_4_PNP_REPS->GET_INSTANCE; a suitable point for this call is the event START-OF-SELECTION.
These new classes allow simple access to the payroll results, are CE-compatible, are expandable (class succession) and can take into account a variety of selection criteria.
The structure H99_PAYROLL_RESULT_READER contains all selection criteria that you may need in your programs, with altered texts and documentation. You can use these in the selection screens in your reports, for example.
Prerequisites
Child classes of the classes CL_HR_PAY_RESULT and, if you have multiple payroll, also CL_HR_PAY_RESULT_PERSON, must be available for your country version. These daughter classes are called CL_HR_PAY_RESULT_** where ** is the ISO code indicator for your country. The German version is called CL_HR_PAY_RESULT_DE, for example; the American version is called CL_HR_PAY_RESULT_US and the American version for multiple payroll is called CL_HR_PAY_RESULT_PERSON_US.
Examples of use
If you have multiple payroll:
data go_prr type ref to CL_HRPAY99_PRR_4_PNPCE_REPS.
data gt_person_pr type H99_HR_PAY_RESULT_PERSON_TAB.
data gt_peras_pr type H99_HR_PAY_RESULT_TAB.
field-symbols <person_pr> type ref to CL_HR_PAY_RESULT_PERSON.
field-symbols <peras_pr> type ref to CL_HR_PAY_RESULT.
data go_person_pr type ref to CL_HR_PAY_RESULT_PERSON_**.
data go_peras_pr type ref to CL_HR_PAY_RESULT_**.
START-OF-SELECTION.
call method CL_HRPAY99_PRR_4_PNPCE_REPS=>GET_INSTANCE
exporting (...)
importing ex_prr = go_prr
exceptions INVALID_ENTRIES = 4.
GET PERSON.
call method go_prr->GET_P_P_PAYR_RESULTS_ALLIN1
exporting im_person = person
importing EX_PERSON_PAYROLL_RESULTS = gt_person_pr
EX_PERAS_PAYROLL_RESULTS = gt_peras_pr
exceptions (...).
The person results are now in table gt_person_pr
and the contract results in table gt_peras_pr
loop at gt_person_pr assigning <person_pr>.
go_person_pr ?= <person_pr>.
Here do what you have to do with each result
endloop.
loop at gt_peras_pr assigning <peras_pr>.
go_peras_pr ?= <peras_pr>.
Here do what you have to do with each result
endloop.
If you do not have multiple payroll:
data go_prr type ref to CL_HRPAY99_PRR_4_PNP_REPS.
data gt_pernr_pr type H99_HR_PAY_RESULT_TAB.
data go_pernr_pr type ref to CL_HR_PAY_RESULT_**.
field-symbols <pernr_pr> type ref to CL_HR_PAY_RESULT.
START-OF-SELECTION.
call method CL_HRPAY99_PRR_4_PNP_REPS=>GET_INSTANCE
exporting (...)
importing ex_prr = go_prr
exceptions INVALID_ENTRIES = 4.
GET PERNR.
call method go_prr->GET_PERNR_PAYR_RESULTS_ALLIN1
exporting im_pernr = pernr-pernr
importing EX_PERNR_PAYROLL_RESULTS = gt_pernr_pr
exceptions (...).
The results are now in table gt_pernr_pr
loop at gt_pernr_pr assigning <pernr_pr>.
go_pernr_pr ?= <pernr_pr>.
Here do what you have to do with each result
endloop.
<b>Reward points</b>
Regards

Similar Messages

  • GET PAYROLL Error

    Hi!
    I have a question regarding GET PAYROLL. I have a program that works and gathers data using the HR logical database (PNP), GET PERNR and GET PAYROLL codes in DEV. However, when it was transported to QAS for testing, it only goes as far as GET PERNR then goes to GET PAYROLL but doesn't do the checking. I have placed debug points in all the lines so that each step can be accounted for but the program in QAS does not pass GET PAYROLL. I have checked the profiles for the usernames I used in both DEV and QAS and they both have the same items in them.
    A snippet of the code I used:
    GET pernr.
      READ TABLE itrgdir INTO watrgdir WITH KEY pernr = pernr-pernr.
        IF sy-subrc NE 0.
          REJECT.
        ENDIF.
    GET payroll.
      IF p_offpr = 'X'.
        CHECK payroll-evp-ipend = p_offpd.
        CHECK payroll-evp-srtza = 'A'.
        CHECK payroll-evp-payty = 'A'.
      ELSE.
        CHECK payroll-evp-srtza = 'A'.
      ENDIF.
    I want to ask for the possible reasons why this would happen. Thank you.

    Check selection screen attribute, should be 900. Did you use GET pernr LATE? Maybe there is unsufficient test data in your Q system.
    Check this little thing:
    report  zpayrollevent.
    tables: pernr, pyorgscreen, pytimescreen.
    nodes: payroll type pay99_result.
    data: g_result_counter type i.
    start-of-selection.
    get pernr.
    write: / 'Currently working on:', pernr-pernr.
    get pernr late.
    write: / 'Found', g_result_counter,
    'results for #', pernr-pernr.
    uline.
    get payroll.
    g_result_counter = g_result_counter + 1.
    write: / 'Seq No. = ', payroll-evp-seqnr,
    'In period =', payroll-inter-versc-inper,
    'For period =', payroll-inter-versc-fpper,
    'Pay date =', payroll-inter-versc-paydt.
    If this will not show any payroll results, there are no payroll results available.

  • Package choice List

    I have created a package choice list as given in the timecard documentation.
    Added a new field called payroll code.
    In my Layout i can see the label payroll code and also the field,but no data which i returned by the function is not visible...
    Thanks

    BEGIN HXC_LAYOUT_COMPONENTS "Custom Field - Payroll Code"
              OWNER = "ORACLE"
              SEQUENCE = "105"
              COMPONENT_DEFINITION = "PACKAGE_CHOICE_LIST"
              RENDER_TYPE = "WEB"
              PARENT_COMPONENT =
              "Projects Timecard Layout - Header Field Table Layout Component"
              LAST_UPDATE_DATE = "2004/05/23"
              BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Custom Field - Payroll Code"
              OWNER = "ORACLE"
              QUALIFIER_ATTRIBUTE_CATEGORY = "PACKAGE_CHOICE_LIST"
              QUALIFIER_ATTRIBUTE1 = "XX_OTL_TEST_PKG.test"
              QUALIFIER ATTRIBUTE2 = "@RESOURCE_IDENTIFIER_ID"
              QUALIFIER_ATTRIBUTE6 = "Y"
              QUALIFIER_ATTRIBUTE20 = "N"
              QUALIFIER_ATTRIBUTE21 = "Y"
              QUALIFIER_ATTRIBUTE22 = "L"
              QUALIFIER_ATTRIBUTE30 = "Y"
              LAST_UPDATE_DATE = "2004/05/23"
              END HXC_LAYOUT_COMP_QUALIFIERS

  • UK Payroll new tax code 1000L

    Hello Friends:  
    In UK Payroll new tax code 1000L for year 2014-April 06th.  I have updated in Constant table V_T511K effective April 06th 2014 but this code is not going to Ceridian interface(PU12).  I would like to know where we need to apply this new tax code?.  Is there any OSS Notes?. Any help is appreciated. Thanks in Advance

    Hello
    Please note that the tax calculation for UK payroll is done based on the tax code as maintained in IT0065 ,.
    Also please note the following :-
    Code 0T u2013 This code is used cumulatively with no pay adjustment and all pay is taxed according to the relevant rate dependent on the level of earnings
    Code BR  - This code means that all the employeesu2019 pay is liable to basic rate tax and there is no pay adjustment allowed
    Tables T5G01 and T5G02 are then used by payroll for tax calculation.
    Hope this helps
    Kind Regards
    Ramana

  • UK Payroll tax code 1000L

    Hello Friends:  
    In UK Payroll new tax code 1000L I have updated in Constant table V_T511K effective April 06th 2014 but this code is not going to Ceridian interface(PU12).   Any help is appreciated. Thanks in Advance

    What exactly is your problem. UK tax is on a cumulative basis, and typically there are slabs with different rates,  so it is difficult too work out a percentage for each wagetype.

  • Error while executing the payroll through transaction code PC00_M40_CALC

    Dear Sir/ Madam,
    While executing the payroll through the transaction code PC00_M40_CALC , i am getting the error as mentioned below :
    "Division by zero not performed "
    Calculation rule X0133****5            RTE = ISDIVP DIVID ARR ZERO=A   ADD
    I am not able to resolve this error. So request to guide me on this.
    Thanks & regards,
    vijaya.s.c.
    Moderator message: wrong forum, please have a look in the (I guess) ERP HCM forums.
    Edited by: Thomas Zloch on Jan 24, 2012

    Hi,
    Maintain have you changed any x013 rule?
    If not, just maintain attendance/time events then process the payroll.

  • Payroll Posting to multiple Company Codes in FI and CO possible?

    Dear experts,
    I need your help on the following challenging issue with respect to payroll posting to accounting.
    Is it possible for a payroll that runs in one company code for all employees, to post to FI and CO for multiple CoCds?
    Example:
    WT 1234 exists in HR CoCd 1000 (assume an amount of u20AC 100 in the payroll results)
    G/L ABC exists in FI CoCd 1000
    G/L DEF exists in FI CoCd 2000
    CCtr xyz exists in CO CoCd 1000 (which is the employee's master cost centre)
    CCtr uvw exists in CO CoCd 2000
    The wage type should be mapped as follows:
    + 100 to G/L ABC and CCtr xyz (this is no problem, is realized with standard mapping)
    - 100 to G/L DEF and CCtr uvw
    The challenge is in the fact that the credit amount should go to another company code than the debit amount.
    How can I realize this?
    Thanks in advance for your feedback!
    Jeroen

    This is from SAP documentation:
    Cross-company code transactions are characterized by the fact that payables are assigned to a company code other than the one in which the corresponding expenses arose. This results in receivables and payables between company codes.
    If you want to post these receivables and payables to company code clearing accounts, you must make the settings in several steps, as outlined in the following.
    Note that in the case of separate HR/AC systems, posting to company code clearing accounts can only be implemented if the AC system is in Release 4.5A or higher.
    For more information on cross-company code transactions and business considerations, refer to the SAP Library under Payroll -> country -> Subsequent Activities -> Posting to Accounting -> Special Business Requirements for Posting -> Cross-Company Code Transactions.
    Settings for Posting to Company Code Clearing Accounts
    1. In the step Define Symbolic Accounts, you must assign an account determination type to each symbolic account in Human Resources. For specific postings to balance sheet accounts, the account assign types FL and FO are used. From a technical viewpoint, these account assignments are defined as follows:
    Wage types that are assigned to a symbolic account with account assignment type FL are posted in accordance with the information from the last period in the WPBP table (Work Center Basic Pay) for the current original result.
    Wage types that are assigned to a symbolic account with account assignment type FO are only used for posting in the evaluation of a current original result.
    2. In the step Define Posting Characteristics of Wage Types, you must assign the symbolic accounts with the account assignment types FL and FO to the corresponding wage types:
    You assign the symbolic accounts with account assignment type FL to wage types that, in the case of retroactive accounting, contain the difference between old and new payment amounts. In countries that use the principle of origin, this usually involves wage types /551 Recalculation difference and /552 Subsequent clearing from previous month.
    You assign symbolic accounts with the account assignment type FO to wage types that contain payments to employees and whose amounts do not change in the case of retroactive accounting. This usually involves wage types /557 Cash payment, /558 Payment of balance, /559 Transfer and other, country-specific wage types.
    3. In the step Create Posting Variants, you must set the Post to company-code clearing account indicator for the variants that you use. Otherwise, payables and receivables between company codes are not posted to company code clearing accounts, and remain as the balance on the document split account for the company codes affected.

  • Limitting payroll t-code access

    Hi expert,
    I have a problem for restricting authorization for user for payroll t-code.
    Apparently, some user is only allowed to ru offcycle payroll. So for example, for t-code "PC00_M34_CALC", user should only be able to run offcycle payroll so on the field declaring payroll type, they should only be able to enter 'A' -> offycle payroll.
    I couldn't find a way to solve this through authorization object, so far my only found option is to manipulate the transaction selection screen.
    I tried to use transaction SHD0 to manipulate the screen for the t-code, but apparently, transaction variant for t-code "PC00_M34_CALC" can not be made. Therefore I tried to play with variant by:
    1. making the payroll type field is not inputable and automatically set 'A'
    2. Protect the variant so it couldn't be changed by people except me
    3.and then save the variant as customer variant "CUS" so that it could be transported.
    After that I created a new T-code let's say Z'' where the default variant "CUS" is used for the t-code.
    Problem arises as user has access to variant, they could create another variant, save it and then use it to open all access. Is there any way to limit either:
    1. User has no access to variant creation
    2. T-code couldn't be run except by a certain variant
    Is there a way to solve my problem?
    I'm open to any other possible solution to solve this problem.
    Thanks in advance

    Use authorization object S_PROGRAM.
    For the field P_ACTION do not include 'VARIANT'

  • Limiting payroll t-code access

    Hi expert,
    I have a problem for restricting authorization for user for payroll t-code.
    Apparently, some user is only allowed to run offcycle payroll. So for example, for t-code "PC00_M34_CALC", user should only be able to run offcycle payroll so on the field declaring payroll type, they should only be able to enter 'A' -> offycle payroll.
    I couldn't find a way to solve this through authorization object, so far my only found option is to manipulate the transaction selection screen.
    I tried to use transaction SHD0 to manipulate the screen for the t-code, but apparently, transaction variant for t-code "PC00_M34_CALC" can not be made. Therefore I tried to play with variant by:
    1. making the payroll type field is not inputable and automatically set 'A'
    2. Protect the variant so it couldn't be changed by people except me
    3.and then save the variant as customer variant "CUS" so that it could be transported.
    After that I created a new T-code let's say Z'' where the default variant "CUS" is used for the t-code.
    Problem arises as user has access to variant, they could create another variant, save it and then use it to open all access. Is there any way to limit either:
    1. User has no access to variant creation
    2. T-code couldn't be run except by a certain variant
    Is there a way to solve my problem?
    I'm open to any other possible solution to solve this problem.
    Thanks in advance

    Did  u checked the authorisation for this user as per the roles assigned to him in Tcode PFCG
    http://saphruser.com/category/sap-hr-security/
    Goto tcode
    PFCG
    1.Create a Role and click the Third Tab Authorizations once you create the role
    click the change icon.
    2.EDIT->Insert Authorization->selection criteria
    search for human resources and add..
    3.in the tree navigate to HR master Data -->authorization Level as R
    M (read with entry helps)
    R (read),
    S (write locked record; unlock if the last person to change the record is not the current user),
    E (write locked record),
    D (change lock indicator),
    W (write data records)
    (all operations).
    Note:Use /nAuth to change the menu tree for authorization in left hand side .
    If you have IDES copy the profile HR940_RESTRICTED to Z profile and modify accordingly.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/97/27973b3ea3eb0fe10000000a114084/frameset.htm
    Edited by: Sikindar on Apr 12, 2009 4:13 PM

  • How to see for what company codes we run payroll for ?

    Hi gurus
    I have a question, generally our users run payrolls by payroll areas, but i want to see for what company codes we run payrolls, is there any report or table to see that ? i checked it in T001 using sm30, where i could see all the company codes (but this didn't answer my question) in this table there are some company codes for which we dont run payroll . so is there any way to see exactly for what company codes we run payrolls ? or should it be seen in financial side ??
    please advise
    regards
    sangitha

    Probably you can use Adhoc query to fetch company codes from IT0001 using a given Payroll area.
    Does this make sense?
    Regards
    Chandra

  • Related to payroll and company code

    Dear Guru's
    I want to know the Company code of a PERNR in the PAYROLL
    means from where can I get the Company code of a PERNR
    means from which structure ..
    Thanks in Advance '
    Regards,
    PAVAN.

    Hi Pavan,
    Pl refer to my regarding payroll on the ABAP forum.
    Regards,
    Suresh Datti

  • Payroll Log, correction code, correction indicators

    Hi Gurus Please help me with the below question thanks for your valuable time?<br />
    What is a Payroll Log ?
    What is a correction indicator which is assigned to infotype 0003?
    What is a payroll correction run code '" w "?
    Thanks for your valuable time for reading the question and replying to it, please explain with examples...
    Warm Regards,
    Zulfikarlos
    A simple search in the forum will helps you to find out the answers
    Edited

    Hi Zulfikarlos,
    Payroll Log: It shows the entry and output of wagetypes in pcr's. Here you can see how the wage type has been evaluated, calculated etc. It also shows whether there is any error in payroll run for the employee. Normally when payroll is run for large number of employees you shall not display payroll log as it can cause runtime error. But even you do not choose payroll log when you run payroll payroll log will be displayed for employees who have error in payroll.
    About correction run code and correction indicator in SAP help i says:
    "The system sets the Payroll correction indicator if an employee is rejected by the payroll program because of errors in his or her master or time data. The personnel numbers of employees rejected by the payroll program are written to matchcode W on the basis of the Payroll correction indicator. If you want to delete the rejected employee from matchcode W, you can do so by deactivating the Payroll correction indicator ."
    http://help.sap.com/saphelp_40b/helpdata/en/48/35c7f74abf11d18a0f0000e816ae6e/content.htm

  • Configuring Cost Code along with Payroll elements in Timekeeper time entry

    Hi,
    I am trying to configure cost code as a separate entry along with payroll elements in timekeeper time entry screen.
    Can any one help me in completing the task.
    Regards
    BK

    I have configured the time keeper time entry scree of my own.

  • Payroll Areas/ Personnel Areas / Company Codes

    Hello Experts,
    I would like to know how to link a Payroll Area to a Personnel Area (Or a Company Code) as I have created the Payroll Areas, and the Companies, but still I can't link them to each other (Or is it linked to Employee Groups)
    I really have no idea about that !!
    Thanks in advance

    Hi ,
    Check the ABKRS feature
    T CODE - PE03
    Feature - ABKRS
    Here u can maintain the bydefault Payroll Area as per the Company Code , Employee Group , Employee Subgroup , Country Grouping , Transaction Class for Data Retention
    Regards,
    Mahesh

  • Payroll Run TDS Business Place/Sec Code Updattion  In FI Doc TDS Line Item

    Hi Experts
    Can any one please guide me how the tds section code will be picked up in payroll run for posting a FI document.  Why because if business place / section code is not updated in FI Document Line Item Level system will not pick those line items in Tcode : J1INCHLN Execution.
    How we have to go about this. 
    Please suggest me on this.
    Thanks
    Kiran

    Hi,
    Based on the Wage type.
    Good Luck
    Om
    Reward it ,if helpful.

Maybe you are looking for

  • Airport utility 6.1 no longer detects time capsule

    After updating to the latest airport utility version 6.1, by time capsule (2nd gen) and my airport express (1st gen) are no longer found in the interface.  The following message is displayed in the utility bottom section "No configured Airport base s

  • How do i rearrange photos in an album on an ipad

    Can anyone tell me how to rearrange the photos in an album i have on my ipad?  is there a way to drag them to a new spot/order?

  • Can't  print more than once with my epson epl-5800L  and airport express

    I recently bought an airport express (b/g) in order to use it with my epson usb printer epson epl-5800L. I'm running mac os X leopard 10.5.7 on my macbook pro (2.4 ghz). The printer is plugged into the airport express (firmware 6.3). My problem is th

  • Java.io.NotSerializableException  exception in session beans

    Hey experts, I have written the following code to call a session bean method from a portal application.                Object obj1 = context.lookup("applications/knet");                UserInfoHome userInfoHome =                                    (U

  • Won't start in Install Disk, Safe Boot or AppleJack

    Machine works fine except that when I insert Install Disk in effort to use First Aid (by holding C down) it doesn't recognize the disk. Also, won't Safe Boot (starting with Shift held down), zap PRAM or AppleJack. Just ignores instructions, opens nor