UK Payroll Issue for terminated emp.

HI Experts.
Im facing a problem with payroll process. I did termination action for an employee.  He was paid in September but I made him a leaver from 31.08.08 so that the system will reverse automatically the entry for September.  When running the payroll, its giving the error message below, that an employee is getting a negative taxable pay due to the reversal.
It is showing following error in log.
5  PIT   GGDN      NOAB      Interpret NI retro changes                                 
                    5  Processing           U                                                                               
U  Termination in operation ERROR                                               
                           20090751                                                                               
GGDN*/121< 0       ERROR     #NEXTR A   *   "NEGATI VE TAXABLE  PAY, INAC T  
                           Basic entry in IT :                                                          
       Processing at End of Selection
Regards.
Sam

Is this issue in the live production system? Person left in August, but you only became aware of it in November?I am not too sure what can be done in this case, Schema GRET works for us only if retro is restricted to one period i.e if you are running November payroll, it should only retro for October.
If you facing this issue in test system try running October payroll using schema GRET. I will think about this some more in the meantime.

Similar Messages

  • W2 process & Final Check for Terminated employee (Payroll)

    -- how to create a Final Check for Terminated Employee ?
    --- How are W2 processed?
    thanks

    Hi Arun,
    You need to delimit IT0588 sty 0001... . till 19.2.2014.... (i.e separation date)
    e.g
    Joining date 1.1.2010
    Termination date :- 19.2.2014...
    Delimit the info type with period as 1.1.2010 to 19.2.2014...
    Hope this should solve your issue...
    Regards,
    Veeram

  • Two payroll run for employee in same month

    Hello Experts,
    Iam having one issue.Client requirement is,if a employee get transferred to other location in mid of the month,in that case his payroll should run say 15 days for previous location & 15 days for new location.Client says since ESI will be location wise so ,two payroll calcultion for a single month & cumulated result will be amount paid to Employee.Also when transferred employee should get new ESI esi code location wise but PF code will be same.
    is that possible in system?
    Please suggest some inputs.
    Thanks in advance

    Thanks sadhar,
    It means that...nothing new config to be done..it will happen automatically.Please explain a bit.
    Regards

  • Issue for Form 16 and tax Computation on Salary to Employees

    Dear All
    Can Anybody suggest a way out for the following -
    We have to issue form 16 as per Indian income tax laws to employees. is there any method for computation of tax on salary or any development is required for the same. As per the Indian income Tax law a computation sheet is to be issued to an emmployee wherein his actaul salary earned ( say for two months) plus his estimated salary for remaining 10 months is to be given and employee in turn returns back the form duly signed in. how this computation sheet works in SAP ?
    Pl guide.
    Regards
    Rakesh Choudhary

    Hi Rakesh,
    this computation happens inside INTAX payroll function for India Payroll. ya its true that there is no standard SAP report to do this. But u can all the annual computation wage type in the RT (/4** wage types).
    If u want a seperate report to this then u can go for some Z development. But u dnt need to write the whole computation logic inside that. Instead of this u can use /4** wage types for the same.
    Regards,
    Praveen
    Edited by: Praveen Kr Tiwari on Apr 11, 2009 3:30 PM

  • UK Payroll Issue :Gross Wage Type /101 missing from RT

    Hi,
    We are facing an issue for some of the employees wherein Gross wage
    type /101 is not being generated when payroll is run .In place of /101 , /A01 wage type
    is getting created.
    This issue is being faced by employees whose claims were entered in
    March ( Payroll Period 12 2008) to be paid in April ( Payroll Period 01
    2009)
    If anybody knows ,please let me know why its happening like that .
    Thanks in advance.
    Anupama

    Hi Surya,
    Folowing is the log for employee not getting claims.
    /101 Total gross                                                       633.52
    /105 Working net                                                       475.08
    /111 EE's Pensio                                                       633.52
    /121 Taxable pay                                                       617.38
    /124 Pre-tax ded                                                        35.94-
    /131 NIable pay                                                        633.52
    /132 Regular NIa                                                       633.52
    /141 Arrestable                                                        493.78
    /211 Salary relv                                                       633.52
    /212 Salary relv                                                       653.32
    /302 Employer NI                                                        25.64
    /501 Tax paid                                                          123.60
    /550 Statutory n                                                       475.08
    /552 Retro. net                                                         18.70
    /559 Bank transf              01                                       493.80
    /560 Amount paid                                                       493.80
    /5A4 Sal.AWE bas                                                        19.80
    /5C2 Retro arstb                                                        18.70
    /5T2 Retro.taxbl                                                        18.70
    /5T4 Retro.preta                                                         1.10-
    /700 WT plus ER                                                        659.16
    /840 Diff.curr.f01                                   1.77
    /851 Total hours                                   103.18
    /P20 Tax-free pe                                                        34.84
    /V03 Net Pay fro                  V 03                                   0.02
    /V41 ME: arrest.                                                         0.02
    /VNS ME: NI paid                             25.64   2.00              653.34
    /VT3 ME:Taxable                                                          0.02
    /VT4 ME:Tax Paid
    9001 Local Gover                                                        34.84
    9101 Local Gover          0002    O 02                                 126.07
    9201 LG Tax Free                                                        34.84
    9N39 Cost dist.o          0002                                          25.64
    9NZ3 Cost dist o          0002    O 02                                  25.64
    9P01 Cost dist.o                                                       126.07
    3 /001 Main Hourly01                       62,173.06
    3 /002 WTD under 501                       71,026.95
    3 /003 WTD over 5y01                       72,617.95
    3 /004 Schools Spe01                       71,250.13
    3 /005 Valuation b01                            6.25
    3 /010 Daily Rate 01                       204361.29
    3 /011 Daily Rate 01                       204361.29
    3 /012 Daily Rate 01                       204361.29
    3 /013 Daily Rate 01                       204361.29
    3 /250 Salary summ                                                       633.52
    3 /251 Basic Annua01                                                   7,602.24
    3 /252 Total Annua01                                                   7,602.24
    3 1000 Basic Pay (01                                                     633.52
    Following is the log for employee getting claims
    /105 Working net                                                     2,761.26
    /111 EE's Pensio                                                     3,166.86
    /121 Taxable pay                                                     2,028.22
    /131 NIable pay                                                      3,166.86
    /133 Irregular N                                                     3,166.86
    /141 Arrestable                                                      1,622.62
    /211 Salary relv                                                     3,166.86
    /212 Salary relv                                                     2,028.22
    /501 Tax paid                                                          405.60
    /550 Statutory n                                                     2,761.26
    /551 Stat.net re                                                     3,166.86-
    /552 Retro. net                                                      2,028.22
    /553 Recalc.diff                                                     3,166.86-
    /5A1 Sal.AWE bas                                     1.00
    /5A3 Sal.AWE bas                                                     3,166.86-
    /5A4 Sal.AWE bas                                                     2,028.22
    /5C1 Arstble ern                                                     3,166.86-
    /5C2 Retro arstb                                                     2,028.22
    /5T1 Txbl.pay re                                                     3,166.86-
    /5T2 Retro.taxbl                                                     2,028.22
    /700 WT plus ER                                                      3,166.86
    /840 Diff.curr.f01                                   2.80
    /851 Total hours                                   162.80
    /A01 Total gross                                                     3,166.86
    /V01 Net Pay on                                                      1,622.62
    3 /001 Main Hourly01                       190940.93
    3 /002 WTD under 501                       218132.27
    3 /001 Main Hourly01                       190940.93
    3 /002 WTD under 501                       218132.27
    3 /003 WTD over 5y01                       223018.42
    3 /004 Schools Spe01                       218817.70
    3 /005 Valuation b01                           19.19
    3 /010 Daily Rate 01                       990267.74
    3 /011 Daily Rate 01                       990267.74
    3 /012 Daily Rate 01                       990267.74
    3 /013 Daily Rate 01                       990267.74
    3 /250 Salary summ                                                     3,069.83
    3 /251 Basic Annua01                                                  36,837.96
    3 /252 Total Annua01                                                  36,837.96
    3 1270 Notional Ba01                                                   3,069.83
    3 3715 Claim WTD >01                       223018.42 142.00            3,166.86
    I have also got this info.
    Retroaction and End of Year 
    Purpose
    If you need to use retroaction over end of year, for example when overtime entered in period 12 is to be paid in period 1, or backdated pay increases applied in the new tax year are to start in the previous tax year, you can do this without this changing any statutory balances in the previous tax year.
    Process Flow
    If you make any changes over end of year that trigger retroaction, this will not affect the statutory balances in the previous tax year.
    However, a change that affects total gross, for example, will be recorded and summed into a wage type called /A01 (Total Gross). The /A01 value will feed a wage type called /Z01 (Total Gross), which will be passed across to the new tax year, ensuring that any retro differences will only affect statutory cumulatives in the new tax year, but will not compromise period 12 statutory cumulatives that may already have been used for end of year reporting.
    The following wage types were introduced to enable retroaction over end of year:
    u2022     /A01
    u2022     /A12
    u2022     /AMP
    u2022     /AP0
    u2022     /AP1
    u2022     /ASP
    u2022     /Z01
    u2022     /Z12
    u2022     /ZMP
    u2022     /ZP0
    u2022     /ZP1
    u2022     /ZSP
    Thanks and Regards,
    Anupama

  • Payroll issue regarding the Claims - /561 and /563

    Hi Payroll Experts,
    I have a payroll issue regarding the Claims - /561 and /563 (October PY Run)
    When i m runnning the Current month Payroll(October PY Run), Total Earning - total deductions are not matching with Net Pay. later i came to know that the system creates the WT /561 and deducts from the Net Pay.
    But as per the Employee Payment Details , there is no recovery required from the employee for the past one year. But even then the system creates the WT /561. and deducts the same from NET Pay.
    The followng are the WT details
    IN - Period
    OCT 2011
         /101 Total gross amount     118,897.00
         /110 Net payments/deductions     76,070.00-
         /550 Statutory net pay     95343
         /551 Stat.net recalc.diff.     37,692.00-
         /552 Stat.net subs.adjustment      37,692.00-
         /559 Bank transfer                                                   34,317.00
         /560 Net pay     37,218.00
         /563 Claim from previous month     5,609.00
    FOR Period
    Sept- Oct
         /101 Total gross amount     49,213.00
         /110 Net payments/deductions      31,721.00-
         /550 Statutory net pay     41,529.00
         /551 Stat.net recalc.diff.     14,591.00
         /552 Stat.net subs.adjustment     23,101.00-
         /553 Recalc.diff.to last payr.     37,692.00
         /559 Bank transfer                                                   14,591.00
         /560 Net pay     14,591.00
         /561 Claim     5,609.00
    I request  some body to  throw siome light on the same.

    Hi Experts,
    Thanks for everyone for replying to my query ,
    I have a doubt that If you check the WTs /551 and /552  in the IN PRD, the negative sign is coming for both the WTs
    Is it correct?
    And also, Assume that there may be a master data changes like Bank details and other deduction Wts happened in the month of Aug and now i m going to run the payroll for the month of Nov,
    some of the employees having differences in the Net Pay, Eventhough the employee is having sufficient balances.
    So how do i handle this issue
    IS ther any way to solve this differences?
    Please Let me know how to solve this issue.
    Thanks

  • Payroll Issues in Net payment

    Dear Experts,
    Business Scenario
    The employee is on leave for 2 months (paid leave)in that 2 months loan should not deduct. 3rd month he came back and the laon amount should be deduct .
    So,In Master Data for IT45 maintained record for those 2months in "Condition" amount=0 and for the next month onwards maintained regular installment payment which he has to pay.
    When I am running payroll for the 3rd month am getting Loan Type Error as below
    Error with a loan wage type
    A loan wage type in table RT should be deducted, however the
    however the remaining net amount was too small
    Wage type /LRP
    Please lower the loan repayment in infotype 0045
    Choose an amount that can be deducted
    while running simulation for 4th Month their is no Error in Payroll Log But for the 3rd Month "NET PAYMENT" is showing as Zero in Payslip and not showing in RT table also
    Note: This Net Payment issue for the 3rd Month is not only  to the above scenario Employee it is not showing for ALL EMPLOYEES.
    Kindly help me in resolving this issue as this is Very Very High, your immediate response is highly Appreciable
    Regards,
    Rao.

    Dear....
    Please check that u press the calendar button to regenerate the last payment date and also check that repayment plan in IT0045
    another thing check IT0078, what will be shown there????.
    After that run one by one payroll for the months you have no deduction of loan and check is there any loan deduction or not.
    What you have to do for skipping loan payment is copy the current loan and make the repayment amount zero, i hope u did the same but in the last split u have to recalculate the payment date.

  • Data pump issue for oracle 10G in window2003

    Hi Experts,
    I try to run data pump in oracle 10G in window 2003 server.
    I got a error as
    D:\>cd D:\oracle\product\10.2.0\SALE\BIN
    D:\oracle\product\10.2.0\SALE\BIN>expdp system/xxxxl@sale full=Y directory=du
    mpdir dumpfile=expdp_sale_20090302.dmp logfile=exp_sale_20090302.log
    Export: Release 10.2.0.4.0 - Production on Tuesday, 03 March, 2009 8:05:50
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Produc
    tion
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-31626: job does not exist
    ORA-31650: timeout waiting for master process response
    However, I can run exp codes and works well.
    What is wrong for my data pump?
    Thanks
    JIM

    Hi Anand,
    I did not see any error log at that time. Actually, it did not work any more. I will test it again based on your emial after exp done.
    Based on new testing, I got below errors as
    ORA-39014: One or more workers have prematurely exited.
    ORA-39029: worker 1 with process name "DW01" prematurely terminated
    ORA-31671: Worker process DW01 had an unhandled exception.
    ORA-04030: out of process memory when trying to allocate 4108 bytes (PLS non-lib hp,pdzgM60_Make)
    ORA-06512: at "SYS.KUPC$QUEUE_INT", line 277
    ORA-06512: at "SYS.KUPW$WORKER", line 1366
    ORA-04030: out of process memory when trying to allocate 65036 bytes (callheap,KQL tmpbuf)
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.KUPC$_WORKERERROR"
    ORA-06512: at "SYS.KUPW$WORKER", line 13360
    ORA-06512: at "SYS.KUPW$WORKER", line 15039
    ORA-06512: at "SYS.KUPW$WORKER", line 6372
    ORA-39125: Worker unexpected fatal error in KUPW$WORKER.DISPATCH_WORK_ITEMS while calling DBMS_METADATA.FETCH_XML_CLOB [PROCOBJ:"SALE"."SQLSCRIPT_2478179"]
    ORA-06512: at "SYS.KUPW$WORKER", line 7078
    ORA-04030: out of process memory when trying to allocate 4108 bytes (PLS non-lib hp,pdzgM60_Make)
    ORA-06500: PL/SQL: storage error
    ORA-04030: out of process memory when trying to allocate 16396 bytes (koh-kghu sessi,pmucpcon: tds)
    ORA-04030: out of process memory when trying to allocate 16396 bytes (koh-kghu sessi,pmucalm coll)
    Job "SYSTEM"."SYS_EXPORT_FULL_01" stopped due to fatal error at 14:41:36
    ORA-39014: One or more workers have prematurely exited.
    the trace file as
    *** 2009-03-03 14:20:41.500
    *** ACTION NAME:() 2009-03-03 14:20:41.328
    *** MODULE NAME:(oradim.exe) 2009-03-03 14:20:41.328
    *** SERVICE NAME:() 2009-03-03 14:20:41.328
    *** SESSION ID:(159.1) 2009-03-03 14:20:41.328
    Successfully allocated 7 recovery slaves
    Using 157 overflow buffers per recovery slave
    Thread 1 checkpoint: logseq 12911, block 2, scn 7355467494724
    cache-low rba: logseq 12911, block 251154
    on-disk rba: logseq 12912, block 221351, scn 7355467496281
    start recovery at logseq 12911, block 251154, scn 0
    ----- Redo read statistics for thread 1 -----
    Read rate (ASYNC): 185319Kb in 1.73s => 104.61 Mb/sec
    Total physical reads: 189333Kb
    Longest record: 5Kb, moves: 0/448987 (0%)
    Change moves: 1378/5737 (24%), moved: 0Mb
    Longest LWN: 1032Kb, moves: 45/269 (16%), moved: 41Mb
    Last redo scn: 0x06b0.9406fb58 (7355467496280)
    ----- Recovery Hash Table Statistics ---------
    Hash table buckets = 32768
    Longest hash chain = 3
    Average hash chain = 35384/25746 = 1.4
    Max compares per lookup = 3
    Avg compares per lookup = 847056/876618 = 1.0
    *** 2009-03-03 14:20:46.062
    KCRA: start recovery claims for 35384 data blocks
    *** 2009-03-03 14:21:02.171
    KCRA: blocks processed = 35384/35384, claimed = 35384, eliminated = 0
    *** 2009-03-03 14:21:02.531
    Recovery of Online Redo Log: Thread 1 Group 2 Seq 12911 Reading mem 0
    *** 2009-03-03 14:21:04.718
    Recovery of Online Redo Log: Thread 1 Group 1 Seq 12912 Reading mem 0
    *** 2009-03-03 14:21:16.296
    ----- Recovery Hash Table Statistics ---------
    Hash table buckets = 32768
    Longest hash chain = 3
    Average hash chain = 35384/25746 = 1.4
    Max compares per lookup = 3
    Avg compares per lookup = 849220/841000 = 1.0
    *** 2009-03-03 14:21:28.468
    tkcrrsarc: (WARN) Failed to find ARCH for message (message:0x1)
    tkcrrpa: (WARN) Failed initial attempt to send ARCH message (message:0x1)
    *** 2009-03-03 14:26:25.781
    kwqmnich: current time:: 14: 26: 25
    kwqmnich: instance no 0 check_only flag 1
    kwqmnich: initialized job cache structure
    ktsmgtur(): TUR was not tuned for 360 secs
    Windows Server 2003 Version V5.2 Service Pack 2
    CPU : 8 - type 586, 4 Physical Cores
    Process Affinity : 0x00000000
    Memory (Avail/Total): Ph:7447M/8185M, Ph+PgF:6833M/9984M, VA:385M/3071M
    Instance name: vmsdbsea
    Redo thread mounted by this instance: 0 <none>
    Oracle process number: 0
    Windows thread id: 2460, image: ORACLE.EXE (SHAD)
    Dynamic strand is set to TRUE
    Running with 2 shared and 18 private strand(s). Zero-copy redo is FALSE
    *** 2009-03-03 08:06:51.921
    *** ACTION NAME:() 2009-03-03 08:06:51.905
    *** MODULE NAME:(expdp.exe) 2009-03-03 08:06:51.905
    *** SERVICE NAME:(xxxxxxxxxx) 2009-03-03 08:06:51.905
    *** SESSION ID:(118.53238) 2009-03-03 08:06:51.905
    SHDW: Failure to establish initial communication with MCP
    SHDW: Deleting Data Pump job infrastructure
    is it a system memory issue for data pump? my exp works well
    How to fix this issue?
    JIM
    Edited by: user589812 on Mar 3, 2009 5:07 PM
    Edited by: user589812 on Mar 3, 2009 5:22 PM

  • 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

  • Conflict checking issues for package

    Trying to install SMCsubv144 on a server in the global zone. I get the following:
    root@xxxxxxx(pts/3):/tmp# pkgadd -d ./subversion-1.4.4-sol10-sparc-local
    The following packages are available:
    1 SMCsubv144 subversion
    (sparc) 1.4.4
    Select package(s) you wish to process (or 'all' to process
    all packages). (default: all) [?,??,q]:
    ## Verifying package <SMCsubv144> dependencies in zone <xxxxxx1>
    ## Verifying package <SMCsubv144> dependencies in zone <xxxxxx2>
    ## Verifying package <SMCsubv144> dependencies in zone <xxxxxx3>
    ## Verifying package <SMCsubv144> dependencies in zone <xxxxxx4>
    ## Verifying package <SMCsubv144> dependencies in zone <xxxxxx5>
    ## Verifying package <SMCsubv144> dependencies in zone <xxxxxx6>
    Conflict checking issues for package <SMCsubv144> on zones <xxxxxx1, xxxxxx2, xxxxxx3, xxxxxx4, xxxxxx5, xxxxxx6>.
    Do you want to continue with the installation of <SMCsubv144> [y,n,?] n
    Installation of <SMCsubv144> was terminated due to user request.
    When I choose y to continue, I get into a loop of the following questions:
    Do you want to continue with the installation of <SMCsubv144> [y,n,?] y
    attribute change for /usr/local/bin <package> on SMCsubv144 <zone>
    Do you want to continue with the installation of <SMCsubv144> [y,n,?] y
    attribute change for /usr/local/doc <package> on SMCsubv144 <zone>
    Do you want to continue with the installation of <SMCsubv144> [y,n,?] y
    attribute change for /usr/local/include <package> on SMCsubv144
    <zone>
    Do you want to continue with the installation of <SMCsubv144> [y,n,?] y
    attribute change for /usr/local/lib <package> on SMCsubv144 <zone>
    Do you want to continue with the installation of <SMCsubv144> [y,n,?] y
    attribute change for /usr/local/man <package> on SMCsubv144 <zone>
    Do you want to continue with the installation of <SMCsubv144> [y,n,?] y
    attribute change for /usr/local/man/man1 <package> on SMCsubv144
    <zone>
    Do you want to continue with the installation of <SMCsubv144> [y,n,?] y
    attribute change for /usr/local/man/man5 <package> on SMCsubv144
    <zone>
    Do you want to continue with the installation of <SMCsubv144> [y,n,?] y
    attribute change for /usr/local/man/man8 <package> on SMCsubv144
    <zone>
    and that goes on and on until I answer n. And never specifies which zone it's talking about...just <zone>.
    I've successfully installed the same pkg on a non-zoned server. Also tried SMCsubv143 and got the same error. So the pkg is ok, it appears a problem with the zones and/or /usr/local.
    Thanks for any info.
    mk

    You could also try using an admin file that should answer those questions for you
    I usually use something like:
    mail=
    instance=unique
    partial=ask
    runlevel=ask
    idepend=nocheck
    rdepend=ask
    space=ask
    setuid=nocheck
    conflict=nocheck
    action=nocheck
    basedir=default

  • I have number range issue for fi posting.

    hi gurus,
    i have number range issue for fi posting (fb01,fb50).
    problem in updating table glpca due to duplication of record.
    INSERT GLPCA FROM TABLE T_GLPCA .
    With Regards,
    Shakthi Raj N.

    error msg  after generating document no and it is not getting updated in data base
    error msg
    "Express document "Update was terminated" received from author "ecciabap""
    Client.......   750
    User.....   ECCIABAP
    Transaction..   FB01
    Update key...   C83B07DE4DADF13CB4950017A4AB8015
    Generated....   02.03.2009, 20:37:23
    Completed....   02.03.2009, 20:37:23
    Error Info...   00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC

  • Issues installing Terminal CAL retail licenses

    Hi all
    Installed Server 2012 R2 RDS and all of a sudden the RDS couldn't contact the RD Licensing Manager so after a bit of digging it was suggested I start off from scratch as the server isn't in production at the moment.
    I did this but forgot to De-Activate the 10 User CAL's I have already activated before I removed the role, now after re adding the role I cannot activate the 10 User CAL's as they are already activated.
    I recognise this is my own stupidity but is there anything I can do?  tried calling the clearing house however they just transferred me to support.
    I found this thread http://social.technet.microsoft.com/Forums/windowsserver/en-US/3a649fd0-f000-4c26-b034-24355a2123aa/issues-installing-terminal-cal-retail-licenses?forum=winserverTS
    Should I try the Clearing house again?
    Any help appreciated
    Cheers
    Cheers Chris

    Hi Chris,
    No, I am not an MS employee.
    Do you have the original licensing paperwork for your RDS CAL purchase?  That is the most important thing.
    Paid support is not going to be able to help if you wiped out the original licensing database.
    If you have the original licensing paperwork for your purchased RDS CALs then there is no reason you should not be able to have the Clearinghouse help you re-install the RDS CALs fresh.
    When speaking to them you do not want to ask any support-related questions.  You simply let them know that you installed and activated your RDS CALs, your server had a crash, and the data was lost.  Further explain that as a result you reinstalled
    your server from scratch, you need to reinstall your RDS CALs, and you have proper documentation/paperwork/emails for your purchased RDS CALs.  You do not know your old licensing server id because the server crashed/had an issue and the data
    was lost.
    They should be able to search for your old licensing server id based on the information (Company name, email, etc.) you entered in RD Licensing during activation if they feel they need it.  Even if they are unable to find your old licensing server id
    that is not an excuse to prevent you from reinstalling your purchased RDS CALs.
    If you have proper documentation of your RDS CAL purchase then ask (politely) to speak to a supervisor if needed if they refuse to help you reactivate them.  The key thing is you are only asking for their assistance reactivating the licenses that you
    can prove you purchased.  If you do not have any proof of ownership then then there is not much they can do.
    -TP

  • Net Leave not prorated for Terminated employees in View Accrual Screen

    Hi,
    We are using R12 HRMS. In the View Accrual screen, The Net Leave entitlement is considering only the leaves accrued as of the last full month payroll, and not prorating the leaves accrued in the current month for Terminated employees. Can you please suggest the required setups to rectify this.
    Thanks.

    Dear Gaurav,
    I have this code for termination cases; but it is not working. can you please check where it is going wrong.
    IF EMPLOYEE TERMED IN THE MIDDLE OF MONTH. NEED TO COMPUTE TILL LWD.
    if (EMP_TERM_DATE <= PAY_EARNED_END_DATE and EMP_TERM_DATE >= PAY_EARNED_START_DATE) then
    l_tot_elig_days = days_between(EMP_TERM_DATE,PAY_EARNED_START_DATE)+1
    l_term_days = Round((2.5/l_tot_days) * l_tot_elig_days,2)
         if to_char(PTO_DATE_EARNED_START_DATE,'MM') = '01' then
         l_total_leave = Round(LEAVE_ACCRUAL_PLAN_BALANCE_ASG_ITD + l_term_days,2)
         else
         l_total_leave = Round(Total_Accrued_PTO + LEAVE_ACCRUAL_PLAN_BALANCE_ASG_ITD + l_term_days,2)
         message9 = 'No of Leaves in Termination Month ' + to_text(l_term_days)
    else
    /* When New Year Begins – JAN Month*/
              /* if LEAVE_ACCRUAL_PLAN_BALANCE_ASG_YTD <=0 then
                   (Total_Accrued_PTO = 2.5
                   l_total_leave = LEAVE_ACCRUAL_PLAN_BALANCE_ASG_ITD + 2.5*/
    if to_char(PTO_DATE_EARNED_START_DATE,'MM') = '01' then
    l_total_leave = Total_Accrued_PTO
    Total_Accrued_PTO = Round(l_total_leave - LEAVE_ACCRUAL_PLAN_BALANCE_ASG_ITD,2)
    Message10 = ' In Loop for JAN '
    else
    ( message10 = ' In Loop for rest of months '
         if (Total_Accrued_PTO > 0) OR (LEAVE_ACCRUAL_PLAN_BALANCE_ASG_ITD > 0) then
         (l_total_leave = Round(Total_Accrued_PTO + LEAVE_ACCRUAL_PLAN_BALANCE_ASG_ITD - l_encash_days,2)
    else
         if (Total_Accrued_PTO < 0)then
         (l_total_leave = Round(LEAVE_ACCRUAL_PLAN_BALANCE_ASG_ITD,2)
    Message11 = ' In loop for negative accrual ')
    Message12= 'Total Leave accrued ' + to_text(l_total_leave)

  • PTRGP doesn't have payroll cluster for 08-2008.

    Dear All,
    While we are generating the PC00_M40_PTX report for West Bengal, it's showing as 'PTGRP doesn't have payroll cluster for 08-2008'. Where as for other states it's coming properly. Can anyone solve the issue and through some light on it.
    Thanks&Regards
    Swarup K
    098853 85572

    Hi issue got resolved. This report will be generated quaterly but not monthly. 
    Thanks & Regards
    Satya K

  • Reg Self Service Personalization for Termination transaction

    Hi All,
    I am new to self service personalization. User wants to personalize the self servie pages.
    User Requirement: our client has diffetent self service transactions like
    Payroll Name and Subgroup Change
    Termination
    Location Only Changes
    People Group Only Changes etc.
    Whenever user is selecting Termination as transaction, and continued to the next step, calendar shows up to select the date for termination. Here I need to personalize such that user should select last day of the employee as termination date rather than following day.
    Eg: Employee last date is 01-oct-2009, prersently some users are taking 02-oct-2009 as termination date assuming that 01-oct-2009 is the last working day. For payroll process, 01-oct-2009 needs to be last day of the employee and he needs to terminate same date for processing.
    Please advise me.

    You can't do this through personalization. You need to extend the page controller to restrict it.
    Thanks
    --Anil                                                                                                                                                                                                                                       

Maybe you are looking for

  • Thoughts on Android 4.3 update

    Since there are so many different kinds of problems being reported after the last two Android updates I am wondering if the problem lays with a conflict between the two updates. 4.2.2 supplemental security update was only released a couple of weeks b

  • How do I share my Pictures and Music Files between Users?

    Hi all, Basically my question is exactly that. I am a new to mac user, and have got a new mac air. Whilst in the store setting up our new mac the people in the shop told us that we could only have 1 icloud account per user, and therefore my wife and

  • Acrobat connect pro Vs msn messenger

    Hi, I am making business plan an online digital teaching school. I wanted to center my virtual classroom tools around acrobat connect pro. Someone i hired for advises just told me that msn messenger can do most of what acrobat connect does (pertainin

  • Connecting Audigy2 ZS Plat Pro to dvd pla

    I have the Audigy 2 ZS Plat. Pro sound system for my computer and just recently bought a Samsung Blue Ray dvd player (BD-P200) Is it possible to connect my new DVD player to my computer surround sound system? Or do i need a Decoder ?

  • And "My Duke Stars" is now unusable

    Before it just showed you what threads had earned you stars in the last month. Now it shows you all threads that have ever earned you stars... only not in date sequence. Want to know recent threads that you got stars for? Using your browser to search