Reversal of Payroll Posting of certain employee

Dear Consultant,
There is payment made to employee thru off cycle (0267) and posted to employee. After positng it is observed that there is some discrepancy in some employee (amount paid thru 0267).
Business requirement is to reverse the posting to only those employees and re-run again.
Can it is possible as while posting we have only one document and if we reverse the posting the whole documents (all employees) will be reversed.
Can anyone provide me the solution.
Regards,
Deepak

Hi,
Please let us know if this offcycle result for each employee have posted in sigle posting runs. If that is the case you can reverse the posting for each employees, using the transaction PCP0 and choosing the posted run number for that employee. In case the offcycle results are posted in a single posting run, you have to reverse that entire posting run, which will be for more than one employee.
Regards
Raviiiiiiiii

Similar Messages

  • Reversing payroll posting document

    Hi guys,
    I'm trying to reverse a payroll posting document and getting the following error:
    Message no. F5802: "Document 100058306 1000 2007 already contains cleared
    items - reversal not possible"
    How should i go about it? If it's referring to the clearing of employee vendor accounts, there are too many of those (all employee in the company basically) and i don't know how to reset all of them. Or if that approach should be taken at all or not.
    Any helpful suggestions will be rewarded.
    Thanks
    Zubair

    Hi,
    I have already seen these thread but did not find a solution to my problem.
    Can you please see the error message i have posted above and help out with that.
    Deletion of Payroll Results/Reversa;
    {For this user, apparently there as no problem in reversing the posting doc using transaction PCP0, I have used the same method but am getting the error as described above.}
    Reversing Payroll
    {Not my scenario}
    Re: Deletion of the Payroll results
    {Does not contain a solution as yet.}
    Thanks
    Zubair Naseer

  • Reversing Payroll Posting

    Dear Friends
    Assuming that an employee is resigning  on 25th May 2008, we did the full and final settlement for this employee.  Now the problem is he withdrawn the offer.  We have done the payroll posting last month for all the employee including this employee.
    Can I do the posting reversal for this employee.  Again there is an issue that we normally does the posting for the whole employees in one stretch.  So if i reverse the payroll posting for the whole employee, make the changes for this particular employee and again post to FI this month, what will be the implications on the FI Side.
    Experts please advise on how to proceed further.
    Thanks and regards
    Santhosh.S

    Hi
    Remove saperation action first,
    If the payment is received by the employee then dont do the reversal of posting, make corrections in the current period for payments and deductions for those which will be done at the time of F&F.
    Payroll takes care all the corrections while excuting for current period, and same implication will be taken at FI posting also.
    Good Luck
    Pavan

  • Payroll posting reversal

    Hi Gurus,
    My client is having the HR and FI is two different systems. We are using the standard ALE/idoc solution given by SAP to post the payroll results from the HR system to the FI one. Payroll posting seems to be working fine .
    My question how do we handle PY posting reversals? I have tried to reverse the posting in the HR system and I can see in PCP0 that the reversal has happened but how can I confirm if the reversal has happened in the FI system as well. Does a reversal also create an accounting document? If so where can I see this document?
    Regards
    Adithya

    Hi Adithya,
    Posted document No. is 50,
    see the over view and remove all other document types... select only 50. run
    then the posted documents will appear in the list.
    Select The document and Goto Edit.- Reversal Document.
    can be done....try once
    srinivas

  • Error-Payroll Posting

    Hi,
    I am not able to do the payroll posting all my, G/L's are well assigned to the Symbolics & SYMB's are assigned to the wage Types Hi,
    CAn anybody plz guide me about these SYM Acc's & their assignments.
    Whether it is correct or Work.Please guide.
    /3E1 Ee ESI contribution 1 - 5008 F EE ESI Contri
    /3E2 Er ESI contribution 1 + 5009 C ER ESI Contri 1
    /3E2 Er ESI contribution 2 - 5008 F EE ESI Contri
    /3F1 Ee PF contribution 1 - 5010 F EE PF Contri
    /3F2 Ee VPF contribution 1 - 5012 F EE VPF Contri
    /3F3 Er PF contribution 1 + 5011 C ER PF Contri
    /3F3 Er PF contribution 2 - 5010 F EE PF Contri
    /3F4 Er Pension contribution 1 + 5014 C ER Pension Contri
    /3F4 Er Pension contribution 2 - 5012 F EE VPF Contri
    /3F7 EDLI contri * 1,00,000 1 + 5022 C EDLI
    /3F8 EDLI adm chrgs * 1,00,000 1 + 5023 C EDLI Admin
    /3F9 PF adm chrgs * 1,00,000 1 + 5017 C ER PF Admin
    But after running payroll i am not able to run the posting as its not clearing the balance & when i check the Posting Error Log.
    Employee Gross Salary Per Month is 8200.Take home-7041,Dedeuction-799.
    00000007 0,00 6.451.734,00 INR
    32 01 2011 0,00 6.451.734,00 INR
    Expense account 0,00 6.453.070,00 INR
    Balance sheet account 0,00 1.336,00- INR
    SymAc 5009 - . ER ESI Contri 1 0,00 390,00 INR
    CCtr 0,00 390,00 INR
    Wage Type A /3E2 Er ESI contribution 0,00 390,00 INR
    SymAc 5011 - . ER PF Contri 0,00 147,00 INR
    CCtr 0,00 147,00 INR
    Wage Type A /3F3 Er PF contribution 0,00 147,00 INR
    SymAc 5014 - . ER Social Contri to be pa 0,00 333,00 INR
    CCtr 0,00 333,00 INR
    Wage Type A /3F4 Er Pension contribution 0,00 333,00 INR
    SymAc 5017 - . ER PF Social contribution 0,00 4.400.000,00 INR
    CCtr 0,00 4.400.000,00 INR
    Wage Type A /3F9 PF adm chrgs * 1,00,000 0,00 4.400.000,00 INR
    SymAc 5018 - . ER Pension Basis 0,00 4.000,00 INR
    CCtr 0,00 4.000,00 INR
    Wage Type A /3FC Pension Basis for Er cont 0,00 4.000,00 INR
    SymAc 5022 - . EDLI Life insurance to be 0,00 2.000.000,00 INR
    CCtr 0,00 2.000.000,00 INR
    SymAc 5023 - . ER ADMIN contribution acc 0,00 40.000,00 INR
    CCtr 0,00 40.000,00 INR
    Wage Type A /3F8 EDLI adm chrgs * 1,00,000 0,00 40.000,00 INR
    Balance sheet account 0,00 1.336,00- INR
    SymAc 5008 - . EE ESI Contri 0,00 534,00- INR
    Wage Type A /3E1 Ee ESI contribution 0,00 144,00- INR
    Wage Type A /3E2 Er ESI contribution 0,00 390,00- INR
    SymAc 5010 - . EE PF Contri 0,00 627,00- INR
    Wage Type A /3F1 Ee PF contribution 0,00 480,00- INR
    Wage Type A /3F3 Er PF contribution 0,00 147,00- INR
    SymAc 5015 - . EE PTax Contri 0,00 175,00- INR
    Wage Type A /3P1 Prof Tax - split period 0,00 175,00- INR

    Raj,
    you have to make small corrections in your symbolic a/c configuration and WT characteristics also.
    Wrong mapping below:
    /3F4 Er Pension contribution 1 + 5014 C ER Pension Contri
    /3F4 Er Pension contribution 2 - 5012 F EE VPF Contri
    /3F7 EDLI contri * 1,00,000 1 + 5022 C EDLI
    /3F8 EDLI adm chrgs * 1,00,000 1 + 5023 C EDLI Admin
    /3F9 PF adm chrgs * 1,00,000 1 + 5017 C ER PF Admin
    Correct mapping below:
    /3F4 Er Pension *contribution 1 -  5014 C ER Pension Contri*
    /3F4 Er Pension *contribution 2 + 5011 C ER PF Contri*
    /3F7 EDLI contri * 1,00,000 1 + 5022 C EDLI
    */3F7 EDLI contri * 1,00,000 1 - ???? F EDLI*
    /3F8 EDLI adm chrgs * 1,00,000 1 + 5023 C EDLI Admin
    */3F8 EDLI adm chrgs * 1,00,000 1 - ???? F EDLI Admin*
    /3F9 PF adm chrgs * 1,00,000 1 + 5017 C ER PF Admin
    */3F9 PF adm chrgs * 1,00,000 1 - ???? F ER PF Admin*
    Normally Pension contribution is a part of Er PF so it shud deduct from Er PF from GL where you have mapped with VPF, so you have a problem here and also pension a/cs both should in expence a/c rather one is B/S and another is expence.
    Check above steps properly as mentioned for the correction and rest all config mapping is correct which you did.
    I hope after doing above change your posting should run.
    lemme know if any more doubts.
    All the best.
    Regards,
    TATA

  • 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.

  • SAP HCM - Payroll Posting - Finding personnel number for a credit Memo

    Hi,
    We are currently trying to trace the personnel number associated with a vendor posting from HR-FI. A credit memo has gotten generated against the vendor (union dues vendo).
    The FBL1n transaction yields only a consolidated result.
    The document number on FB03 displays the line item but without pernr
    The PPOIX, PPDIX, PPDHD, PPDIT, REGUH, PAYR and the T51R... series have not yielded the pernr for the specific line item.
    The information we currently have:
    Run Id:
    Document Date:
    The amount on the credit memo:
    The posting document number:
    The transfer line number from HR to FI
    Line number on the posting document:
    The payroll area of the employee
    The wage types associated with the vendor
    Need your help on the following:
    1) Is there a different place that credit memo needs to be looked into? Have we missed out any table?
    2) How do I use the posting document line number, the transfer line number, the document number and run ID in PPDIX to track down the pernr?
    Thanks,
    Amit

    Hi Ted,
    Thanks for your response.
    One thing I missed out in my original post is that this is third party posting entry.
    I have the LINNUM and RUNID. But when I input those values in PPOIX, the search is not returning any results.
    This is a third party posting so my EVTYP=TP. Is PPOIX geared to return only PP values? Is there a way I can find the PP correspoding to these line items.
    I encountered a couple of problems when I ran through the flow.
    From credit memo (FI posting document BKPF), field 'AWKEY' is the reference document back to posting document on payroll site.
    I got the AWKEY
    Use BKPF-AWKEY and GL account  on FI line item you're interested in (BSEG-ALTKT) to get field 'DOCLIN' in table PPDIT (PPDIT-DOCNUM = BKPF-AWKEY, PPDIT-HKONT = BSEG-ALTKT) .
    When I looked at BSEG table, I noticed that ALTKT and HKONT are different.
    The HKONT has the same GL account as the GL account in BKPF. Itu2019s a/c payable outstanding checks.
    But ALTKT value has an account I couldnu2019t get in chart of accounts. Probably a clearing account? Also the original Accounting document line item has a vendor a/c which I believe is in turn linked with G/L account.
    So when I input DOCNUM, HKONT in PPDIT, my search is not returning any results. For that matter even with BSEG-HKONT that I described above, it is not returning any results. 
    Use PPDIT-DOCNUM, PPDIT-DOCLIN to get 'RUNID' , 'LINNUM' from PPDIX (PPDIX-EVTYP = 'PP', PPDIX-DOCNUM = PPDIT-DOCNUM, PPDIX-DOCLIN = PPDIT-DOCLIN).
    Since evtyp under consideration is TP, this is not returning results. If I take off the PP input, it does return Line Number and Run Id.
    Use PPDIX-RUNID, PPDIX-LINNUM to go get PERNR from PPOIX (PPOIX-RUNID = PPDIX-RUNID, PPOIX-POSTNUM = PPDIX-LINNUM).
    Does not return any results.
    Sincerely appreciate your help.
    Thanks,
    Amit

  • SAP HR Technical Accounts related to payroll posting.

    Hi experts,
    I have a doubt in Assign Technical Accounts related to payroll posting.
    Menu Path IMG -> Payroll SG -> Reporting for Posting Payroll Results to Accounting -> Activities in the AC System -> Assigning Accounts -> Assign Technical Accounts
    Account key    Account (GL)
    1001               1307090
    *1307090 Clearing Account.
    My doubts are
    u2022     If I am maintaining a GL account as clearing account, is it applicable for the entire wage types across company codes?(As this config is not based on Co code,but based on Chart of accounts)
    u2022     Where these account keys we will be assigned in HR side to wage types / no need to assign?
    Regards
    Thomas

    Hi,
    My issue is not solved yet.
    I have tried that option now documents are splitting and there is no error in document creation, but now its a different  issue  of amt in that GL acc.
    My scenario is we are creating a new company code.So group of employees I need to move from one company to another.
    But their previous month claim needs to be posted in the old cost centre.
    Means when I am running Jan payroll (period 1), December claims which is created in Jan should processed and two documents has to be created. u2013Its is done now.-No issues.
    But now the new GL code (not assigned to any symbolic account) which is assigned for splitting ,in  the technical account is not displaying in the posting document.
    Example:-IT0015 record with origin as 15.Dec.2010, but created in Jan..
    In my document it is taking as       
    GL related to wage type u201C/552 Stat.net post u201C- as debit in period 1 Jan document .
    and
    GL related to wage type   u201C9xxx- staff out patient claimu201D u2013as debit in period 13 Dec document .
    Now question is what is the relevance of the GL given in the technical accounts, as nothing is posted in to that account?
    Edited by: Thomas Padiyara on Dec 3, 2010 11:17 AM
    Edited by: Thomas Padiyara on Dec 4, 2010 3:53 AM

  • Diff between Payroll Posting & Payment Posting

    Hi Friends,
    Whats difference between Payment Posting & Payroll Posting
    regards
    Praveen P

    Thanks for the input.
    After running the payroll posting, do we need to run Payment Posting for all the employees.
    Which table will it update after payment posting.
    If we are not activated PRE DME and DME. do we still need to run payment posting.
    Praveen PP
    Edited by: Praveen P.P on Oct 20, 2010 6:54 AM

  • Reading payroll results for an employee from ABAP-HR?

    Hi,
       I dont know whether i must post this question in this category ? but i had a problem in reading of the payroll data for employees.
        I used the function of PYXX_READ_PAYROLL_RESULT and passed the PERNR(employee number), SEQNR, RELID(clusterid) for a given period of say PN-BEGDA AND PN-ENDDA. And i took the payroll structure of germany (its PAYDE_RESULT). program is showing the exceptions since between the selected periods i had many different country employees other than germany DE. how can i solve that problem ? if i use PAY99_RESULT then i cant read the National wage types? how to solve this problem?
        which function i must use so that i must get all the payroll data of the employees between the given period with inter/national payroll details and also which structure(like PAYDE_RESULT) i must use for holding the payroll data that is unique?
       please help me.
       ***Ratings are must for a possible answer.

    Hi KK,
    In this sample code...you will find the use of the method i meantioned.
    REPORT zgratuity_ipcl MESSAGE-ID zh.
    TABLES : pernr , pa0001, pa0008 , pa0000 , t569v.
    TYPE-POOLS: slis.
    CONSTANTS:
    gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
    INFOTYPES: 0008 ,0001,0002,0000.
    DATA : period(6),
           pay_period(6),
           c_period(6).
    DATA: number LIKE pc261-seqnr.
    DATA : refdt LIKE p0000-begda.
    DATA: ason_yr LIKE p0347-scryy,
          ason_mon LIKE p0347-scrmm.
    DATA : BEGIN OF it_0000 OCCURS 100,
           pernr LIKE pa0000-pernr,
           stat2 LIKE pa0000-stat2,
           massn LIKE pa0000-massn,
           begda LIKE pa0000-begda,
           endda LIKE pa0000-endda,
           END OF it_0000.
    DATA : g_molga LIKE t512t-molga.
    DATA: BEGIN OF package,
            lga LIKE p0008-lga01,
            bet LIKE p0008-bet01,
          END OF package.
    DATA : BEGIN OF rgdir OCCURS 0.
            INCLUDE STRUCTURE pc261.
    DATA : END OF rgdir.
    DATA : BEGIN OF rx-key OCCURS 0.
            INCLUDE STRUCTURE pc200.
    DATA : END OF rx-key.
    DATA : BEGIN OF crt OCCURS 0.         "result table
            INCLUDE STRUCTURE pc208.
    DATA : END OF crt.
    DATA : b_date LIKE sy-datum,
           e_date LIKE sy-datum.
    DATA : darate LIKE t539j-gwcht.
    DATA : gamt TYPE p.
    DATA : BEGIN OF it_0001 OCCURS 100,
           pernr LIKE pa0000-pernr,
           ename LIKE pa0001-ename,
           bukrs LIKE pa0001-bukrs,
           persk LIKE pa0001-persk,
           persg LIKE pa0001-persg,
           werks LIKE pa0001-werks,
           END OF it_0001.
    **start of mod by tejas on 31.05.06
    DATA : BEGIN OF it_final_sup OCCURS 100,
           pernr LIKE pa0001-pernr,  "PL No
           ename LIKE pa0001-ename,  "NAME
           persg LIKE pa0001-persg,  "EMP GROUP
           persk LIKE pa0001-persk,  "ESG
           zzpla LIKE pa0001-zzpla,  "PLANT/BUSINESS
           orgeh LIKE pa0001-orgeh,  "ORG UNIT
           orgtx LIKE t527x-orgtx,   "ORG UNIT TEXT
           gbdat LIKE pa0002-gbdat,  "DOB
           termn LIKE pa0019-termn,  "DOJ
           zzrtdt LIKE pa0002-zzrtdt,"DOR
           sepdt LIKE pa0000-begda,
           no_years TYPE i,          "SERVICE YEARS
           stat2 LIKE pa0000-stat2,  "STATUS
           s_text(15),               "STATUS TEXT
           basic LIKE pa0008-bet01,  "BASIC
           da LIKE pa0008-bet01,     "DA
           total LIKE pa0008-bet01,  "TOTAL
           crt LIKE pc207-betrg,     "GRTUITY
           massn LIKE pa0000-massn,
           begda LIKE pa0000-begda,
           ason(6) ,
          dates LIKE pa0002-zzrtdt,
           END OF it_final_sup.
    DATA : BEGIN OF it_final_nonsup OCCURS 100,
           pernr LIKE pa0001-pernr,  "PL No
           ename LIKE pa0001-ename,  "NAME
           persg LIKE pa0001-persg,  "EMP GROUP
           persk LIKE pa0001-persk,  "ESG
           zzpla LIKE pa0001-zzpla,  "PLANT/BUSINESS
           orgeh LIKE pa0001-orgeh,  "ORG UNIT
           orgtx LIKE t527x-orgtx,   "ORG UNIT TEXT
           gbdat LIKE pa0002-gbdat,  "DOB
           termn LIKE pa0019-termn,  "DOJ
           zzrtdt LIKE pa0002-zzrtdt,"DOR
           sepdt LIKE pa0000-begda,
           no_years TYPE i,          "SERVICE YEARS
           stat2 LIKE pa0000-stat2,  "STATUS
           s_text(15),               "STATUS TEXT
           basic LIKE pa0008-bet01,  "BASIC
           da LIKE pa0008-bet01,     "DA
           total LIKE pa0008-bet01,  "TOTAL
           crt LIKE pc207-betrg,     "GRTUITY
           massn LIKE pa0000-massn,
           begda LIKE pa0000-begda,
           ason(6) ,
          dates LIKE pa0002-zzrtdt,
           END OF it_final_nonsup.
    DATA : BEGIN OF it_final OCCURS 100,
           pernr LIKE pa0001-pernr,  "PL No
           ename LIKE pa0001-ename,  "NAME
           persg LIKE pa0001-persg,  "EMP GROUP
           persk LIKE pa0001-persk,  "ESG
           zzpla LIKE pa0001-zzpla,  "PLANT/BUSINESS
           orgeh LIKE pa0001-orgeh,  "ORG UNIT
           orgtx LIKE t527x-orgtx,   "ORG UNIT TEXT
           gbdat LIKE pa0002-gbdat,  "DOB
           termn LIKE pa0019-termn,  "DOJ
           zzrtdt LIKE pa0002-zzrtdt,"DOR
           sepdt LIKE pa0000-begda,
           no_years TYPE i,          "SERVICE YEARS
           stat2 LIKE pa0000-stat2,  "STATUS
           s_text(15),               "STATUS TEXT
           basic LIKE pa0008-bet01,  "BASIC
           da LIKE pa0008-bet01,     "DA
           total LIKE pa0008-bet01,  "TOTAL
           crt LIKE pc207-betrg,     "GRTUITY
           massn LIKE pa0000-massn,
           begda LIKE pa0000-begda,
           ason(6) ,
          dates LIKE pa0002-zzrtdt,
           END OF it_final.
    **end of mod by tejas on 31.05.06
    DATA : f_pabrj LIKE t549s-pabrj,
           f_pabrp LIKE t549s-pabrp.
    DECLARATIONS FOR ALV DISPLAY
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
          gs_layout   TYPE slis_layout_alv ,
          gs_print    TYPE slis_print_alv,
          gt_filter   TYPE slis_t_filter_alv,
          gt_sp_group TYPE slis_t_sp_group_alv,
          gt_alv_graphics TYPE dtc_t_tc,
          gt_excluding  TYPE slis_t_extab ,
          gt_events   TYPE slis_t_event,
          gt_print TYPE slis_print_alv.
    DATA: gt_list_top_of_page TYPE slis_t_listheader.
    DATA: g_boxnam TYPE slis_fieldname VALUE  'BOX',
          p_f2code LIKE sy-ucomm       VALUE  '&ETA',
          p_lignam TYPE slis_fieldname VALUE  'LIGHTS',
          g_save(1) TYPE c VALUE 'X',
          g_default(1) TYPE c VALUE 'X',
          g_exit(1) TYPE c,
          gx_variant LIKE disvariant,
          g_variant LIKE disvariant,
          g_repid LIKE sy-repid.
    DATA : result TYPE pay99_result.
    DATA : crt_header TYPE LINE OF hrpay99_crt.
    INITIALIZATION.
      SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
      SELECT-OPTIONS : sstat2 FOR pa0000-stat2.
      SELECTION-SCREEN: END OF BLOCK b2.
    *SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    *SELECTION-SCREEN : SKIP.
    *PARAMETERS : P_STAT2 LIKE PA0000-STAT2.
    *SELECTION-SCREEN : SKIP.
    *SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'PNPABKRS-LOW'.
          screen-required = 1.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    AT SELECTION-SCREEN." on pnppabrj.
      IF pnptimr9 = 'X'.
        CONCATENATE  pnpdispj pnpdispp INTO period.
        CONCATENATE  pnpdispp pnpdispj INTO  pay_period.
      ELSE.
        CONCATENATE  pnppabrj pnppabrp INTO period.
        CONCATENATE  pnppabrp pnppabrj INTO  pay_period.
      ENDIF.
      IF period < '200505'.
        MESSAGE e001 WITH
        'Gratuity report is for period after month Auguest 2005' .
        STOP.
      ENDIF.
      SELECT SINGLE * FROM t569v
      WHERE abkrs = pnpxabkr.
      CONCATENATE t569v-pabrj t569v-pabrp INTO c_period.
      IF period > c_period.
        MESSAGE e001 WITH 'Payroll for this period is not yet processed' .
        STOP.
      ENDIF.
    CONCATENATE  pnppabrj pnppabrp INTO period.
    CONCATENATE  pnppabrp pnppabrj INTO  pay_period.
    IF period =< '200505'.
       MESSAGE e001 WITH 'Program is not valid for this period' pnppabrj
    *pnppabrp.
    ENDIF.
    START-OF-SELECTION.
    GET pernr.
      PERFORM  fill_data.
    END-OF-SELECTION.
      PERFORM final_data.
      PERFORM display_data.
    *&      Form  FILL_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM fill_data.
      SORT p0000 BY pernr.
      SORT p0001 BY pernr.
      SORT p0002 BY pernr.
      SORT p0008 BY pernr.
    start mod made by kinjal for payroll dates
      IF pnptimr9 = 'X'.
        CALL FUNCTION 'HR_GB_PERIOD_DATES'
             EXPORTING
                 abkrs            = pnpxabkr
            PERMO            =
                  pabrj            = pnpdispj
                  pabrp            = pnpdispp
            IMPORTING
                  begda            = b_date
                  endda            = e_date .
       EXCEPTIONS
            PERIOD_NOT_FOUND = 1
            OTHERS           = 2
      ELSE.
        CALL FUNCTION 'HR_GB_PERIOD_DATES'
            EXPORTING
                abkrs            = pnpxabkr
            PERMO            =
                 pabrj            = pnppabrj
                 pabrp            = pnppabrp
           IMPORTING
                 begda            = b_date
                 endda            = e_date
       EXCEPTIONS
            PERIOD_NOT_FOUND = 1
            OTHERS           = 2
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    CONCATENATE  pnppabrj pnppabrp '01' INTO b_date.
    CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
          EXPORTING
               iv_date             = b_date
         IMPORTING
            EV_MONTH_BEGIN_DATE =
              ev_month_end_date   = e_date.
    end of modification
    *DATA FETCHING FOR SUPERVISOR EMPLOYEES
      LOOP AT p0001 WHERE begda <= e_date AND
                          endda >= e_date AND
                              persg = 'R' OR
                              persg = 'P'
                            AND
                              ( persk >= '11' AND
                                persk <= '17'
                              OR
                              ( persk >= 'IA' AND
                                persk <= 'IJ'
        MOVE-CORRESPONDING p0001 TO it_final_sup.
        READ TABLE p0002 WITH KEY pernr = p0001-pernr BINARY SEARCH.
        IF sy-subrc = 0.
          MOVE-CORRESPONDING p0002 TO it_final_sup.
        ENDIF.
      LOOP AT p0000 WHERE pernr = p0001-pernr AND begda <= e_date AND endda
                    >= e_date AND stat2 IN sstat2.
          SELECT SINGLE orgtx INTO it_final_sup-orgtx FROM t527x
          WHERE sprsl = 'EN'
          AND   orgeh = p0001-orgeh.
          SELECT SINGLE text1 INTO it_final_sup-s_text FROM t529u
          WHERE sprsl = 'EN'
          AND statn = '2'
          AND   statv = p0000-stat2.
          MOVE-CORRESPONDING p0000 TO it_final_sup.
          IF p0000-massn = 'A6'.
            MOVE p0000-begda TO it_final_sup-zzrtdt.
          ELSE.
            it_final_sup-zzrtdt = '          '.
          ENDIF.
        ENDLOOP.
        IF sy-subrc <> 0.
          CONTINUE.
        ENDIF.
        SELECT SINGLE termn INTO it_final_sup-termn FROM pa0019
        WHERE pernr = p0001-pernr
        AND  tmart = '06'.
        IF sy-subrc = 0.
          CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
               EXPORTING
                    date1                   = sy-datum
                    date2                   = it_final_sup-termn
                   output_format           = '05'
              IMPORTING
                   years                   = ason_yr
                   months                  = ason_mon
            DAYS                    =
              EXCEPTIONS
                   invalid_dates_specified = 1
                   OTHERS                  = 2
          IF ason_mon > 6.
            ason_yr = ason_yr + 1.
          ENDIF.
          MOVE ason_yr TO it_final_sup-no_years.
        ENDIF.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        LOOP AT p0008 WHERE begda <= e_date AND endda >= e_date AND pernr =
                            p0001-pernr.
         DO 20 TIMES VARYING  package-lga FROM p0008-lga01 NEXT p0008-lga02
                      VARYING package-bet FROM p0008-bet01 NEXT p0008-bet02.
            CASE package-lga.
              WHEN '0010'.
                it_final_sup-basic = package-bet + it_final_sup-basic.
              WHEN '0I10'.
                it_final_sup-da = package-bet + it_final_sup-da.
            ENDCASE.
          ENDDO.
          it_final_sup-total = it_final_sup-basic + it_final_sup-da.
        ENDLOOP.
       BREAK-POINT.
    start mod made by kinjal
        it_final_sup-zzrtdt = it_final_sup-zzrtdt - 1.
        CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
             EXPORTING
                  get_begda       = it_final_sup-zzrtdt
            GET_ENDDA       =
                 get_permo        = '67'
             IMPORTING
                 get_pabrj       = f_pabrj
                 get_pabrp       = f_pabrp
       TABLES
            GET_PERIODS     =
            EXCEPTIONS
                 no_period_found = 1
                 no_valid_permo  = 2
                 OTHERS          = 3
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF it_final_sup-stat2 <> '3'.
         CONCATENATE  it_final-dates+4(2) INTO period.
          CONCATENATE f_pabrj f_pabrp INTO period.
          it_final_sup-ason = period.
        ENDIF.
    end of mod
        rx-key-pernr = p0001-pernr.
        CALL FUNCTION 'CU_READ_RGDIR'
             EXPORTING
                  persnr          = p0001-pernr
             IMPORTING
                  molga           = g_molga
             TABLES
                  in_rgdir        = rgdir
             EXCEPTIONS
                  no_record_found = 1
                  OTHERS          = 2.
        LOOP AT rgdir  WHERE fpper = period AND inper = period.
        ENDLOOP.
      With this Seq. number as a key for cluster Key
    we can read the RT table from the cluster/..
    IF 2
        IF sy-subrc EQ 0.
          rx-key-seqno = rgdir-seqnr.
          IMPORT crt FROM DATABASE pcl2(in) ID rx-key.
          IF NOT crt[] IS INITIAL.
            PERFORM resultstab.
          ENDIF.
          APPEND it_final_sup.
          CLEAR it_final_sup.
        ENDIF.
    LOOP AT rgdir WHERE
             inper = period AND
             srtza = 'A'.
       rx-key-seqno = rgdir-seqnr.
       number = rgdir-seqnr.
       CLEAR rt.
       REFRESH rt.
    Importing Result table cluster
       IMPORT rt FROM DATABASE pcl2(in) ID rx-key.
       IF NOT rt[] IS INITIAL.
         PERFORM resultstab.
       ENDIF.
    ENDLOOP.
       APPEND it_final.
       CLEAR IT_FINAL.
      ENDLOOP.
    RP-PROVIDE-FROM-LAST P0008 SPACE B_DATE E_DATE.
    BREAK-POINT.
       DO 10 TIMES varying  PACKAGE-LGA from p0008-lga01 next p0008-lga02
                   varying package-bet from p0008-bet01 next p0008-bet02.
         compute itab-gross = itab-gross + package-bet.
         IF sy-index = 10.
           itab-pernr = p0008-pernr.
           append itab.
         endif.
       enddo.
    *DATA FETCHING FOR NON SUPERVISOR EMPLOYEES
      LOOP AT p0001 WHERE begda <= e_date AND
                          endda >= e_date AND
                              persg = 'R' OR
                              persg = 'P'
                            AND
                              persk >= 'IL' AND
                              persk <= 'IV'
        MOVE-CORRESPONDING p0001 TO it_final_nonsup.
        READ TABLE p0002 WITH KEY pernr = p0001-pernr BINARY SEARCH.
        IF sy-subrc = 0.
          MOVE-CORRESPONDING p0002 TO it_final_nonsup.
        ENDIF.
      LOOP AT p0000 WHERE pernr = p0001-pernr AND begda <= e_date AND endda
                    >= e_date AND stat2 IN sstat2.
          SELECT SINGLE orgtx INTO it_final_nonsup-orgtx FROM t527x
          WHERE sprsl = 'EN'
          AND   orgeh = p0001-orgeh.
          SELECT SINGLE text1 INTO it_final_nonsup-s_text FROM t529u
          WHERE sprsl = 'EN'
          AND statn = '2'
          AND   statv = p0000-stat2.
          MOVE-CORRESPONDING p0000 TO it_final_nonsup.
          IF p0000-massn = 'A6'.
            MOVE p0000-begda TO it_final_nonsup-sepdt.
            MOVE p0000-begda TO refdt.
          ELSE.
           MOVE it_final_nonsup-zzrtdt TO refdt.
            MOVE e_date TO refdt.
          ENDIF.
        ENDLOOP.
        IF sy-subrc <> 0.
          CONTINUE.
        ENDIF.
        SELECT SINGLE termn INTO it_final_nonsup-termn FROM pa0019
        WHERE pernr = p0001-pernr
        AND  tmart = '06'.
        IF sy-subrc = 0.
          CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
               EXPORTING
                    date1                   = refdt
                    date2                   = it_final_nonsup-termn
                   output_format           = '05'
              IMPORTING
                   years                   = ason_yr
                   months                  = ason_mon
            DAYS                    =
              EXCEPTIONS
                   invalid_dates_specified = 1
                   OTHERS                  = 2
          IF ason_mon > 6.
            ason_yr = ason_yr + 1.
          ENDIF.
          MOVE ason_yr TO it_final_nonsup-no_years.
        ENDIF.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        LOOP AT p0008 WHERE begda <= refdt AND endda >= refdt AND
       LOOP AT p0008 WHERE begda <= e_date AND endda >= e_date AND
                            pernr = p0001-pernr.
         DO 20 TIMES VARYING  package-lga FROM p0008-lga01 NEXT p0008-lga02
                      VARYING package-bet FROM p0008-bet01 NEXT p0008-bet02.
            CASE package-lga.
              WHEN '0010'.
                it_final_nonsup-basic = package-bet.
            ENDCASE.
          ENDDO.
        ENDLOOP.
        IF it_final_nonsup-massn = 'A6'.
          SELECT SINGLE gwcht FROM t539j
          INTO darate
          WHERE molga = '40'
          AND bwlga = '0I10'
          AND begda <= it_final_nonsup-begda
          AND endda >= it_final_nonsup-begda.
        ELSE.
          SELECT SINGLE gwcht FROM t539j
          INTO darate
          WHERE molga = '40'
          AND bwlga = '0I10'
          AND begda <= e_date
          AND endda >= e_date.
        ENDIF.
        it_final_nonsup-da = ( it_final_nonsup-basic * darate ) / 100.
        it_final_nonsup-total = it_final_nonsup-basic + it_final_nonsup-da.
        gamt = 0.
        gamt = ( it_final_nonsup-total * 15 * it_final_nonsup-no_years )
                / 26.
        IF gamt >= 350000.
          gamt = 350000.
        ENDIF.
        MOVE gamt TO it_final_nonsup-crt.
        CLEAR gamt.
        CLEAR refdt.
        APPEND it_final_nonsup.
        CLEAR it_final_nonsup.
    LOOP AT rgdir WHERE
             inper = period AND
             srtza = 'A'.
       rx-key-seqno = rgdir-seqnr.
       number = rgdir-seqnr.
       CLEAR rt.
       REFRESH rt.
    Importing Result table cluster
       IMPORT rt FROM DATABASE pcl2(in) ID rx-key.
       IF NOT rt[] IS INITIAL.
         PERFORM resultstab.
       ENDIF.
    ENDLOOP.
       APPEND it_final.
       CLEAR IT_FINAL.
      ENDLOOP.
    ENDFORM.                    " FILL_DATA
    " GET_GRATUITY
    *&      Form  RESULTSTAB
          text
    -->  p1        text
    <--  p2        text
    FORM resultstab.
      LOOP AT crt WHERE lgart = '9GRA' AND cumty = 'U'.
        it_final_sup-crt = abs( crt-betrg ).
      ENDLOOP.
    ENDFORM.                    " RESULTSTAB
    *&      Form  DISPLAY_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM display_data.
      IF it_final[] IS INITIAL.
        MESSAGE i001 WITH 'No data found'.
        STOP.
      ENDIF.
      g_repid = sy-repid.
      PERFORM e01_fieldcat_init  USING gt_fieldcat[].
      PERFORM eventtab_build CHANGING gt_events.
      PERFORM e04_comment_build USING gt_list_top_of_page[].
      PERFORM display_report.
    ENDFORM.                    " DISPLAY_DATA
    *&      Form  E01_FIELDCAT_INIT
          text
         -->P_GT_FIELDCAT[]  text
    FORM e01_fieldcat_init USING   e01_lt_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: ls_fieldcat TYPE slis_fieldcat_alv.
      gs_layout-group_change_edit = 'X'.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'PERNR'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Pers No'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'ENAME'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Name'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'PERSK'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'ESG Cd'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'ZZPLA'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Plant/Business'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'ORGTX'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Org.Unit'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'GBDAT'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Dt.Of Birth'.
      ls_fieldcat-datatype = 'DATS'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'TERMN'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Dt.Of Joining'.
      ls_fieldcat-datatype = 'DATS'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'ZZRTDT'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Superannuation Dt'.
      ls_fieldcat-datatype = 'DATS'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'SEPDT'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Dt.Of Seperation'.
      ls_fieldcat-datatype = 'DATS'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'NO_YEARS'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Service Years'.
      ls_fieldcat-datatype = 'CHAR'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'S_TEXT'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Status'.
      ls_fieldcat-datatype = 'CHAR'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'BASIC'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Basic'.
      ls_fieldcat-datatype = 'CHAR'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'DA'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'DA'.
      ls_fieldcat-datatype = 'CHAR'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'TOTAL'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Total'.
      ls_fieldcat-datatype = 'CHAR'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname    = 'CRT'.
      ls_fieldcat-tabname    = 'IT_FINAL'.
      ls_fieldcat-seltext_l    = 'Gratuity'.
      ls_fieldcat-datatype = 'CHAR'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
    ENDFORM.                    " E01_FIELDCAT_INIT
    *&      Form  EVENTTAB_BUILD
          text
         <--P_GT_EVENTS  text
    FORM eventtab_build CHANGING lt_events TYPE slis_t_event.
      CONSTANTS:
      gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 0
           IMPORTING
                et_events   = lt_events.
      READ TABLE lt_events WITH KEY name = slis_ev_top_of_page
      INTO ls_event.
      IF sy-subrc = 0.
        MOVE gc_formname_top_of_page TO ls_event-form.
        APPEND ls_event TO lt_events.
      ENDIF.
    ENDFORM.                    " EVENTTAB_BUILD
    *&      Form  E04_COMMENT_BUILD
          text
         -->P_GT_LIST_TOP_OF_PAGE[]  text
    FORM e04_comment_build USING   e04_lt_top_of_page TYPE slis_t_listheader
      DATA: ls_line TYPE slis_listheader.
      DATA : v_text(100) TYPE c,
             v_text1(100) TYPE c,
             date1(10),
             date2(10).
            v_pernrlines TYPE i,
            v_pernrchar(5).
    DESCRIBE TABLE it_pernr LINES v_pernrlines.
    MOVE v_pernrlines TO v_pernrchar.
      CONCATENATE b_date6(2) '.' b_date4(2) '.' b_date+0(4) INTO date1.
      CONCATENATE e_date6(2) '.' e_date4(2) '.' e_date+0(4) INTO date2.
      CONCATENATE 'Gratuity Information for ' date1 'to' date2
      INTO v_text SEPARATED BY space.
      CLEAR ls_line.
      ls_line-typ  = 'H'.
      ls_line-info = v_text.
      APPEND ls_line TO e04_lt_top_of_page.
    CLEAR ls_line.
    ls_line-typ  = 'H'.
    ls_line-info = v_text1.
    APPEND ls_line TO e04_lt_top_of_page.
    ENDFORM.                    " E04_COMMENT_BUILD
    *&      Form  DISPLAY_REPORT
          text
    -->  p1        text
    <--  p2        text
    FORM display_report.
      gs_layout-colwidth_optimize = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
               i_background_id         = 'ALV_BACKGROUND'
                i_callback_program      = g_repid
               i_callback_user_command = 'USER_COMMAND'
               i_structure_name        = 'IT_FINAL'
                is_layout               = gs_layout
                it_fieldcat             = gt_fieldcat
               it_special_groups       = gt_sp_group[]
               it_sort                 = gt_sort[]
               it_filter               = gt_filter[]
               i_save                  = g_save
               is_variant              = g_variant
                it_events               = gt_events
               is_print                = gs_print
               it_alv_graphics         = gt_alv_graphics[]
               it_excluding            = gt_excluding
           TABLES
                t_outtab                = it_final.
    ENDFORM.                    " DISPLAY_REPORT
          FORM top_of_page                                              *
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
               i_logo             = 'ENJOYSAP_LOGO'
                it_list_commentary = gt_list_top_of_page.
    ENDFORM   .                    "TOP_OF_PAGE
    FORM user_command USING g_ucomm TYPE sy-ucomm
                            g_field TYPE slis_selfield.
      CASE g_ucomm.
        WHEN '&IC1'.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    *&      Form  FINAL_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM final_data.
      LOOP AT it_final_sup.
        MOVE-CORRESPONDING it_final_sup TO it_final.
        APPEND it_final.
        CLEAR it_final.
      ENDLOOP.
      LOOP AT it_final_nonsup.
        MOVE-CORRESPONDING it_final_nonsup TO it_final.
        APPEND it_final.
        CLEAR it_final.
      ENDLOOP.
      SORT it_final BY pernr.
    ENDFORM.                    " FINAL_DATA
    <b>Reward if useful,</b>
    Regards,
    Tejas

  • Perform Payroll Posting using Internal Order

    Hi All,
    I would like to know what configuration that must be done to ensure that during payroll posting budget checking is performed using internal order.
    I already searched in all available resources but found nothing. I read SAP Note 648594 but I still do not understand how the integration is built. Now we use cost center as cost object instead of internal order, and in the new requirement user wants to perform payroll posting to cost center and also perform budget checking via internal order.
    For your information, I tried to maintained IT0027 and entered internal order with percentage 100% but when I posted the payroll result, expenses of the employee was posted to internal order instead of cost center.
    Thank you,
    Regards,
    MAL

    You may either enter in IT27, or against the position or org unit in PPOME.
    If you entered an internal order as 100%, then the posting will of course post to the internal order.
    regards

  • How to generate Payroll Posting

    Hi All
      I’m facing problem in generating payroll posting IDoc to send to FI System. Payroll was run for all employees in a payroll Area. I released the document, but still the payroll posting IDoc is not generated when we look using WE02.
    Hope I have done all the ALE configuration setting which we did for other message Type (E.g. Cost Center, GL Account..Etc) such as defining Logical Name, RFC Connectivity, port, Partner Profile and Distributed the message type between two systems
    Please help me what are the remaining steps to complete, or which program do I need to execute in background to generate payroll posting IDoc
    We are using <b>“HRPAYP”</b> message type for payroll posting.
    Please guide me..
    ..Babu.K

    Babu,
    Payroll posting is run by folloiwng menu in SAP
    SAP Menu->Human Resources->Payroll->India->Subsequent activities->Per Payroll Period->Posting to accounting
               Or
    Transaction code: PC00_M99_CIPE
    You don’t have to give employee number here, give document date.
    First run in Simulation(select type of document creation as 'S'), the simulation mode run ensures that the posting document created does not have any errors. These errors can be viewd in the log, log should have the node Doc. creation as 'Error Free', then only you're all set to go with live posting. Live posting(select type of document creation as 'P') can be run only after the Payroll is in Exit mode.
    After the live posting is over, you need to release the document , this you can do by clicking on 'Document Overview' push button, then select the document and click on the second button from left to release.After the release you need to post the document, by clicking on the second button from left again. Hope this helps.
    Regards
    Ramakrishna Ramadurgam

  • Payroll posting

    Hello Gurus,
    Please help me in understanding FI-CO postings relavant to payroll.
    Suppose an employee worked 8 hours on particular activity in a network and confirms it through CATS. So the activity gets posted with equivalent cost. Parallely, the employee gets salary for a day to work too. This salary is posted to a GL account u2013named  Salary in SAP, which is perhaps an expense account. With reference to this posting, there will be posting to CO too.
    The question is if I will see two postings in CO, one coming from FI to CO and another because of confirmation i.e double costing.
    May be my understanding is wrong somewhere but would be glad to know as where am I thinking wrongly.
    Cheers
    Sunny

    Thanks Virender,
    I need some more clarification. It would be great if you could reply.
    All personal numbers are assigned a cost centre too. Lets say pernr 2000 is assigned cost centre X in PA30 transaction.He is paid Rs 50000 per month for working 100 hours.
    He makes activity confirmation in PS for 80 hours with a work centre (with cost centre assigned Y and activity tyoe 123).
    With respect to confirmation, cost centre Y/123 will get credited and PS activity will get debited and it will be totally Co posting and no FI posting.
    With respect to payroll posting, 50000 will get debited to salary account and employees account will get credited. CO posting pertaining to it may for example to a cost centre.So what this cost centre going to be? X or Y or something else.Is there any reconcilation needed between X and Y or some other cost centre?
    I hope my question is clear now.
    Thanks in advance
    Sunny

  • Posting Error when Employee Transferred from 1 Company Code to another

    Dear All,
    I am working on 2 company codes and I am facing a problem in Payroll posting to finance when employees of 1 company code are transferred to the other company code if there is Retro Accounting for the employee.
    For Eg. 1 employee is transferred from Company Code 1000 to Company Code 2000 in the month of September. But the employee has taken 3 days of unpaid leave in August and the same was not updated in the system in August before the payroll of August. So in september when the payroll is processed, retro accouting happens and the amount for 3 days is deducted in september.
    But when I am making a posting to finance it is giving me Error in posting as "Posting balance is not cleared (Period 08 / 2011 P)".
    I have activated the PPMOD Feature and have done all the necessary configurations.
    Thanks in Advance.
    Regards,
    Vijay

    Dear Vijay...
    Basically its better to rehire the employee in other company code rather than to transfer from one company code to another. because every company code has its own financial structure and error is cuming due to this.
    Now u have to check few things...
    1. Ask the Costing (CO) team to open the entries in last period 08/2011 and then check the posting.
    2. If error will not resolve then check the wagetype permisibility for Personnel Areas and Employee Groups.
    3. If error is still there, then ask the finanacial team to change the profit centers of those cost center which are related to that particular employees.
    I hope ur issue will be resolved within these three solutions.
    Regards,

  • Error on Payroll Posting

    Hi,
    Initially I have not maintained IT0009 for one PRNR and same I tried to post this result in payroll posting. As per the standard this was rejected.
    For the correction I have maintained IT0009 and same I have tried to post this result, still I am getting the error. But I can able to post next month payroll but not this period.
    Could you please share the process to correct the posting for that particular month.

    Chandra:
    Initially your saying
    I tried to post this result in payroll posting. As per the standard this was rejected.
    and now your saying
    It was for the period of Jan 2011, so posting was happen and document also sent to FI.
    posting already happened.
    Could please focus wat exactly problem your facing, So you mean w/o posting of Jan month payroll results for this employee, you posted feb postings or wat?
    Could you pls clarify, exact problem what your facing and Wat exactly you want.???
    Regards,
    TATA
    Edited by: Prashantkumar Tata on Aug 16, 2011 9:18 AM

Maybe you are looking for

  • Saving for Web

    I was wondering if there was a way to configure Photoshop so that when I create slices and "save to web" the HTML code that generates already includes my domain/directory instead of just starting at "images/x.jpg." This would save me loads of time si

  • Check performance data on IE status bar

    Hi, experts. I'm trying to check the performance data of WDJ by using paramter, "sap.session.ssr.showInfo=true". I can see some data flow over the status bar of IE. But it went so quickly, I can't analyze the result. I know using WD console to check

  • Gurus, please reply me!

    Hi, I just know there's a special promotion of Solaris 8(Intel) for Education, and the price is only $29. I'm a student and qualified for that. But I'm wondering if it's the same version as the usual one($45)! Thanks a lot!

  • Cant find audio driver for 3412TU

    please help me..i cant find right audio for 3412TU... plus i'm having prob with audio..even i plug mic n headphone,stil can hear sound...when i'm in mute, still can hear sound too..help me pls...thanx...

  • CS5 Image Blurry on Placement Resize

    I've searvhed through and can't seem to get the fix.  When I place an image (jpg) into my Indesign doc it looks sharp.  However, when I resize the image (smaller) it looses its clarity.  The image looks great in Photoshop.  I've been stuck on this fo