Writing PCRs....

Dear Vivek Sir,
Can you give some hints or tips how to analyze the requirement before writing a PCR. How to select the functions and operations.
Basically an idea about how to start with. I know to read a PCR analyze a schema.
Need your inputs to start writing PCR.
Thanks,
Prathibha

Thank you very much Vivek Sir. This was really helpfull. I will follow the same.
Thanks Again
Prathibha

Similar Messages

  • Need support - Writing PCR (To find missing clock-in and clock-out)

    Hi Gurus,
    I need support on writing PCR on below scenario.
    Scenario:
    Need to determin missing clock-in and clock-out punches and generates LOP for the same.
    Regards,
    Raji

    Hi,
    In this case you need to build logic like the follow.
    Assumptions: mulitiple time pairs are there.
    First check employee present or not, then check data coming through time events or not then check first pair after that take HRS value as start time of first pair if yes store day balances in ABCD. in case of No check Last pair take end time store in as day balance BCDE. after that based on day balance values genearte wagetypes in another PCR.
    Note: in same PCR you can store wage type aslo.

  • SAP 700  or writing PCR's and SCHEMAS.

    What is SAP 700 ?
    Actually we want to learn on writing PCR's and SCHEMAS.
    Could any body please guide on this topic .
    Thanks  in advance...

    I have a word document on PCRs & Schemas & its not copyrighted.. you can drop me an email for that.. the id is on my business card..
    SAP 700? well haven't heard of it.. going by the naming convention, I guess ERP 2006 would be SAP ECC 7.0 as of now we have only ERP2005 ie SAP ECC 6.0 available for unrestricted shipment.. or are you refrerring to WAS700 the erstwhile BASIS.. then its part of ERP2005.
    I would check service.sap.com for the Solution details..
    ~Suresh

  • Help on understanding and writing PCRs

    dear members
    though i have some knowledge on india payroll, i do not know anything on writing a PCR (Personnel Calculation Rule). could you be kind enough to guide me and help me understand and write a PCR.
    shall be thankful for a prompt response.

    Check these  -
    http://help.sap.com/saphelp_47x200/helpdata/en/4f/d51fb2575e11d189270000e8322f96/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/4f/d51e68575e11d189270000e8322f96/frameset.htm
    Regards,
    Amit

  • How to carry forward leaves to the next year with out writing PCR

    Hi All,
    Could you please tell me the process steps for quota carry forward from previous year to the next year with out writing a PCR
    Regards
    Sita

    Hi
    Leave balance carry forward

  • Help required in writing PCR's

    Hi All,
    Update on this is highly appreciable and points will be rewarded.
    Thanks & Regards,
    surya
    Hi All,
    To calculate OT as per the Client requirement two PCR's needs to be wriiten.
    1. OT should not be paid if it is less than 30 mins.
    2. OT should be calculated as follows:
    (basic2/26/8no. of hours).
    Your help in this regard is highly appreciable.
    Thanks & Regards,
    Surya
    Edited by: Surya Prakash Kanuru on Sep 15, 2008 9:55 AM

    Hi,
          No need to write to 2  PCR ,with one pcr itself it can be calculated . Here maintain  overtime hrs in 15 infotype ,such that overtime hrs will be  stored in a wage type say 9ovt . 
    Pcr can be build in this way
    90vt
    num = 90vt(where overtime hrs will be transfered to num)
    num?0.5
    < ( if the hrs is 30 mins )
    your logic
    = (30 mins )
    logic calc
    >  (30 min)
    amt = 1001 (basic wage type)
    amt = 1001 div 2
    some calc
    div ana (for dividing with the no of hrs and passing the overtime value to the amt)
    addwt *
    Hope it helps u
    Regards,
    Prince Elvis

  • I want to learn writing PCRs & Schemas

    I am new to SAP HCM and learning the configuration steps on IDES 6.0. I am at present learning Time Management sub module. I want to learn how to write new PCRs and also modify PCRs and schemas. I have, sort of, understood the definitions of schemas, PCRs, functions, operations etc. But it stops here. I am unable to proceed further.
    Can any of you suggest how to go further. Any good link/book on this topic?
    Please help me.
    Regards
    Gopal

    Hi,
    Goto to T-code pe02 .
    In that you have documentation.
    T-code pe04 also has the same where u will get the functions and operations with clear explanation and Examples.
    the following link might helpful to you
    http://www.sdn.sap.com/irj/scn/advancedsearch?query=pcr#sdn_content_category_value_wiki
    All the BEST.
    KRC

  • Issue with PCR to restrict absence quota

    Hi Experts.
    i have a requirement where the absence quota should never be over 24 at any particular time.
    for this absence 24 leaves per annum with 2 leaves accumulate monthly.
    we are using -ve time mgt and written a PCR to restrict absence to 24 by using Time type
    VARSTLDYPP
    N
    Y
    HRS=FR55C
    HRS?24
    <
    HRS-24
    HRS*-1
    HRS?2
    HRS=2
    ADDDBXXXX
    <
    ADDDBXXXX
    now the issue is when i run the simulation of time evaluation it is generating 2 leaves per year instead of
    2 per month. can anybody help me solve the issue
    Thanks & Regards
    ramayya

    I need a PCR for the below scenario.  I created two types to store day balance and max entitlement to 25 days.   We are not processing payroll from SAP.   Any help writing PCR  with details would be appreciated.
    Schema we are copying TM04
    Time types - storing  daily balance one for below 60 days &  one for after 60 days planned working time.
    Vacation per calendar year 25 days not based on seniority.
    Scenario:
    2.       Prorated entitlement for employees who will work fewer than 60 work days for company in a given year are calculated as follows:
    a.     1/12 of annual vacation for every 21 days s/he performs work
    b.    For these purposes (60 days worked rule) the following is also considered as work performance: Planned working time from IT0007 and public holidays. 
    c.     e.g. if hired on Nov 11, 2011, there < 60 wd remaining. They get 1/12 (25/12 = 2.1d) for every 21 work days remaining - in this case 2 periods of 21 wd, since RIM days and holidays are included as work days, for a total of 4.5 days (round up to half-day).
    3.       Prorated entitlement for employees who will work 60 or more work days for RIM in a given year are calculated as follows:
    a.     1/12th of annual entitlement for every calendar month of completed work
    b.    E.g. If George is hired on July 15 2011, he gets 10.5 days of vacation entitlement.
    c.     The number of full months George will have worked by the end of the calendar year is five u2013 Aug to Dec incl. George gets no entitlement from the 16 days from July 15 to July 31st.
    5 / 12 * 25 days = 10.4 days, rounded up to 10.5 days.
    Thanks,
    Mani.
    Edited by: saphrtime on Apr 21, 2011 5:19 PM
    Edited by: saphrtime on Apr 21, 2011 5:21 PM

  • Schemas and PCRs

    hi, experts.
    i need help in learning schemas and writing PCRs. please suggest me any book or send me any document that will help.
    regards,
    madhu

    hai..
    How to read rules and Schemas
    1.Structure of relationship in Rules and Schemas:
    a)Schemas consist of Functions and Sub-schemas
    b)Some functions have the rules attached to it as one of its parameter
    c)Rules consist of a set of operations to perform some actions
    d)Operations and Functions are the executable components
    As per the diagram Set of Operations make a Rule which in turn attached to some functions and those functions embedded in Schemas or Sub-schemas (Inside the main schemas) to decide the flow of the payroll program.
    Structure of a Schema:
    Func:
    This column is used to give a function name.
    Par1, Par2, Par3, Par4:
    1. Function has maximum four parameters.
    2. The function can have zero to four parameters as per the definition of the function.
    3. Pressing F4 we can get the list of all the values which can be used as parameters.
    4. For some functions in the first parameter is the name of the rule created.
    5. These parameter values are predefined the function is being created.
    D:
    1. This column is used to comment and uncomment a function.
    2. If (*) is being put then the line is commented and will not be executed in Payroll processing.
    3. If nothing is given then the line would be executable.
    Desc
    1. In this column description for the function is being used.
    Functions:
    Functions are used for;
    • Performing some payroll computations (E.g. INEPF function calculates the PF amount of an employee during payroll run)
    • Calling rules (E.g. P0045 function calls a rule INLN to compute the loan details of a personnel number).
    • Getting data from Infotypes (E.g. P0581 will get the data from Infotype-581 for payroll processing).
    • For some decisions. (E.g. IF & ENDIF function is used to execute as per the true and false decisions) etc.
    Rules:
    Rules are used for holding a set of operations for a particular requirement to be accomplished.
    Attributes:
    1. Program Class.
    a. There are two program classes to be assigned to the rule while creating.
    i. Payroll (C).
    ii. Time (T).
    2. Country Grouping.
    a. For Payroll program class the country grouping should be mentioned. (E.g. 40 for India).
    b. For Time management rule the country grouping should be (*).
    3. Employee Sub-grouping.
    a. All the wagetypes have an attribute of employee sub-grouping.
    b. It varies client to client.
    c. Value 3 means EE sub-grouping is 3.
    d. Value * means all EE Sun-groupings.
    4. Wagetypes.
    a. The wagetype in the internal table which is meant to be processed by the rule.
    b. If a value for Wagetype is being given then the particular wagetype is being queried for processing.
    c. If **** has been given then all the wagetypes present in the particular internal table will be processed.
    Structure of the Rule.
    Frequently Used Internal Tables in PY Processing:
    The Payroll driver uses lots of internal tables used for storing data temporarily in the program for processing. Some of the important internal tables are:
    The structure of internal tables:
    EE Sub-grouping:
    1. The Wagetype is assigned to a particular Employee sub-group.
    2. 3 is a particular employee subgroup for basic pay wagetype.
    3. * value means for all EE sub-grouping.
    Wagetype Code:
    1. The Wagetype code number is the number assigned to a particular pay component.
    Wagetype Description:
    1. The description for the wagetype code.
    NUM:
    1. If there is a split for the wagetypes then this NUM field will make them different.
    2. If A person’s basic salary is changed in the mid of the month then the wagetype will be split in two amounts with NUM = 01 and NUM = 02.
    RTE:
    1. The RTE column stores a value for;
    a. Rate of interest.
    b. Number of leave days.
    c. Projection factor. Etc.
    2. E.g. In the above diagram /401 wagetype has RTE value 10 which is the projection factor used for different calculations.
    AMT:
    1. This column possesses the amount of the particular wagetype.
    Use of the internal tables:
    1. The internal tables are being used for calculations on the NUM, RTE & AMT fields.
    2. These internal tables are being read by the rules row by row.
    3. The Calculation rule would be only processed for those wagetypes which are specified in the rule’s source code.
    4. The row in the internal table containing the wagetype which has been defined in rule attributes will be placed in the header of the internal table for processing.
    5. The processing would be as per the operations used in the rule.
    Some important Operations & Functions:
    • The editor for Operations and Functions is PE04.
    • While the payroll driver encounters a function and operation it would call a subroutine written in the payroll driver.
    • The subroutine name for the operation will be OP****, Where **** will be the name of the operation.
    • For E.g. for Operation AMT the subroutine name would be OPAMT.
    • The code written for the function will be found as a subroutine in payroll driver as FU****, where **** will be the name of the function.
    • For E.g. for function INEPF the subroutine name would be FUINEPF.
    Operations:
    AMT:
    1. This Operation would fetch the Amount of the wagetype queried in the rule, in the Variable AMT for processing.
    2. The Syntax of the Operation is ZZZOVVVV.
    3. ZZZ -> AMT.
    4. O -> Operand.
    5. VVV -> Value or Variable.
    6. For E.g. (AMT= 1000) will fetch the Amount of Wagetype 1000 into AMT.
    7. Pressing F1 on the AMT Operation will provide the documentation.
    RTE:
    1. This Operation would fetch the Rate of the wagetype queried in the rule, in the Variable RTE for processing.
    2. The Syntax of the Operation is ZZZOVVVV.
    3. ZZZ -> RTE.
    4. O -> Operand.
    5. VVV -> Value or Variable.
    6. For E.g. (RTE= /401) will fetch the Rate of Wagetype /401 into RTE.
    7. Pressing F1 on the RTE Operation will provide the documentation.
    NUM:
    1. This Operation would fetch the Split indicator of the wagetype queried in the rule, in the Variable NUM for processing.
    2. The Syntax of the Operation is ZZZOVVVV.
    3. ZZZ -> NUM.
    4. O -> Operand.
    5. VVV -> Value or Variable.
    6. For E.g. (NUM= 1000) will fetch the Split indicator of Wagetype 1000 into NUM.
    7. Pressing F1 on the NUM Operation will provide the documentation.
    ADDWT:
    1. This Operation will append one more row in the internal table (Processed by the rule).
    2. After calculating an amount from a particular wagetype the amount can be assigned to another wagetype and append to the internal table.
    3. For E.g. ADDWT 2050 will add the NUM, RTE, AMT calculated to the NUM, RTE & AMT of the wagetype 2050.
    4. If the Wagetype 2050 is not there before in the internal table then NUM, RTE & AMT would be 0.
    5. If any value of these three variables are present before then they will be added to the calculated ones.
    Functions:
    PIT:
    1. This function will read the internal table IT (Input table).
    2. The function will hold a rule as first parameter.
    PRT:
    1. This function will read the internal table RT (Results table).
    2. The function will hold a rule as first parameter.
    PDT:
    1. This function will read the internal table IT (Input table).
    2. The function will hold a rule as first parameter.
    PORT:
    1. This function will read the internal table ORT (Old results table).
    2. The function will hold a rule as first parameter.
    P0014:
    1. This function will read the Infotype 0014 for processing.
    2. The function will hold a rule as first parameter.

  • PCR for Social Security: Errro: 'Stop: No Rule in key'

    Dear Gurus,
    hop u'll be fine and enjoying good health.  I have following requirement:
    I want to calculate Social Security Contribution for all employees having Gross pay Less than or Equal to 10,000/- @ 6%.
    I am writing PCR first time, which is copied from an existing PCR.
    ZSSM Personnal Calculation Rule ZSSM
        3
          6004 Social security Contrib
            AMT=  0001 Set
            AMT+  0002 Addition
            AMT+  0003 Addition
            AMT+  0004 Addition
            AMT+  1001 Addition
            ROUNDGK100 Round AMT to next
            AMT?ZPESI  Comparison
              <
                AMT*ZMESI  Multiplication
                AMT/100    Division
                RTE=TKSOLL Set
                RTE-TKAU** Subtraction
                ROUNDGK100 Round AMT to next
                ADDWT *    OT   Output table
              =
                AMT/TKDIVI Division
                RTE=TKSOLL Set
                RTE=TKAU** Set
                MULTI ARA  Multipl.amt/no/rate
                AMT=ZPESI  Set
                ROUNDGK100 Round AMT to next
                ADDWT *    OT   Output table
    Kindly guide me where is I am going wrong.
    best regards,

    Hi,
    You don´t have to worry. The idea of the forum is to give help on what you know no matter you are an expert or not.
    Being ZPESI a constant from t511k it must have a K before. For example AMT?KZPESI.
    Being ZMESI a constant from t511p it must have an I before. For example NUM=IZMESI
    And as Remi say you should check the parameters use in the schema to call the PCR.
    Hope this helps.
    Kind Regards,
    Edoardo

  • PCR Operation

    Dear Experts,
    I am new to PCRs,
    I am want to to subtract values in one wage type with other. what operation i should use?
    How can i do this?
    Please help me.
    Charle.

    Hi Charle,
    Wagetypes in PCR have 3 place holders for value RATE, NUMBER, AND AMOUNT, used in PCRs as RTE, NUM, and AMT.
    Assume you have wagetype XXXX and YYYY. If you want to deduct the amount held in XXXX by the amount held in YYYY, then write a PCR for wage type XXXX and add the following:
    AMT- YYYY
    ADDWT *
    where XXXX is the wage type and the line ADDWT * will add the values back into the IT table (Assuming you are dealing with the IT table, otherwise ADDWTE* will add it to the RT table).
    Here is a link that helped me alot when i was started writing PCRs.
    http://saphrexpert.blogspot.com/2008/09/schemas-and-personnel-calculation-rules.html
    Chirag.

  • Rounding in a PCR

    Hi Gurus,
    I want to capture overtime times after 8 hours,in TM00 schema and want to round the OT hours as
    if an employee work 8hrs 29mins it should show as 0 OT
    if an employee work 8hrs 35mins it should show as 30 mins OT
    if an employee work 8hrs 40mins it should show as 45mins OT
    if an employee work 8hrs 50mins it should show as 45 minsOT
    it should round to nearest 15 mins.......and want to include all the conditions in writing PCR
    i have identified PCR TO40 to round overtime hours in TM00 schema or should i write my own PCR...
    please help me out...........?????????
    Akhil

    Hi Akhil,
    You have seen the PCR TO40 if u see here it will round the time with the constant TMRND which is 0.25 in T511k.You can insert a small rule in time for the total attendance hrs and check it and use operation ROUND S
    The number field of the time pair irounded, and the start time adjuste accordingly.And then ROUNDnn where nn is the minutes u can set in your case it will be 15.
    Thanks
    Swati

  • PCR for years of service calculation in time management

    Hi all,
    i need to write a PCR for calculating the years of service from a date type in time management.
    HRS=FYAD01 gives me the full years but i need the exact fraction.
    suppose years of service is 5 years 6 months i should get 5.5 years in HRS?
    can anyone please help me?

    Hi semvladigo,
    I have problem..I am very new to writing PCRs for time management.
    Could you refer some articles or to some pages where the PCR s have been explained.
    I  am in need to write a PCR for calculating the Leave Quotas.
    Conditions:
    The employee should have spent 1825 days in the organization, from his DOJ.For the excess day that he has worked,He would be recieving a leave quota of 2.3 days per a time evaluation period.(Monthly)
    Would you please guide me in writing a PCR for this & where do this PCr to be inserted in the Schema Exactly.
    Have a nice day !
    Best Regards,
    UV SAP

  • Value not coming to PBEG

    Dear All,
    I'm writing PCR for late coming.
    But when i cal HRS = PBEG i'm not getting value in PBEG.
    Still when i check in in types i'm getting the in time and same should be read in PBEG.
    Can anyone tell why this is happening.
    Thanks
    Eswar

    Hello Eswar,
    I hope you are calling the PCR using the function PTIP. Can you run the schema in debug mode and see what's happening under the new PCR. Check the input / processing and output of the rule.
    If you have already done this, reply back with the details of rule and I would be glad to help you out.
    Best Regards,
    Sunny

  • Country specific to 99

    Dear Experts,
    Kindly let me know the possibilities to use some country version for other countries for which SAP localization not released
    Since there is no SAP country specific version for Oman, is it possible to  call Saudi specific schema and country specific feature  from Other country versions (99)
    Please provide your suggestions
    Regards,
    R.Rajesh

    Hi Rajesh,
    i thing your talking about payroll.. If you don't have country specific payroll for Oman then you have to go for the international payroll. For this you need to use 99 as the country grouping ( molga). And use the international payroll schema X000.
    you need to incorporate all your statutory deduction or payments via  writing PCR. you should not copy the feature or schema for other country version because all this schema and feature will read the value from it's own specific country group tables. For an example if you copy the schema for Saudi, it will read the saudi country group payroll related tables.
    But if you still wanted to make a copy , then you copy and make it to customer feature or schema and ask your ABAP er to change the structure of schema or feature to read the value according to your country group 99.
    Regards,
    Dinesh.

Maybe you are looking for