Report for payroll results

Hi all,
I want the report where i have the fields as employee Id, employee name, bank account number and amount transferred to the bank for a particular month.
If I try from Infoset Query, I can take the first three fields from the respective Infotypes. But I am unable to find the amount transferred to the bank (/559 Wage type value) in any infotype. Nor I am able to fill the 042 or 043 IT from report RPABRI00.
How to get the report?
Please revert
Regards
Deepti

Hi,
Check this thread .
Payroll reports.
If you want RT data,you cannot do it through Query.You can do it through customized program.
Check standard Reports as well
Eg.S_AHR_61016101 - Remuneration Statements
S_AHR_61016102 - Payroll Accounts
S_PH9_46000156 - Bank Details
S_AHR_61016170 - Payments and Deductions
You cand this reports in Info system under your country payroll.
Manoj.

Similar Messages

  • Standard report for Payroll Results wth Pay Scale Groups

    Dear Experts
    Is there any standard report to view payroll results, Pay Scale Group wise.
    In CWTR and ANN, i cdnt find Pay Scale Group of an employee.
    Thanks in advance
    ...Sadhu

    Can we enhance CWTR report ? is it possible ?
    any guidance ?
    Thanks in advance
    ...Sadhu

  • Can we use ad hoc query to get a temporary report of payroll result?

    Hi,All
    can we use ad hoc query to get a temporary report of payroll result?or we have to get a report of payroll result by customizing and ABAP?
    and how can I customizing a report on the basis of standard SAP report for payroll?

    Hi
    As of my Knowledge You cannot get the payroll report through Adhoc query you have to go for ABAP Devlopment
    Thanks
    Mahantesh

  • Could not read administrative data for payroll result

    Hi Experts,
    I am trying to extract data from ECC6.0 for datasource 0HR_PP_REC_51 and getting error:
    "Personnel No. 00100062 : Could not read administrative data for payroll result    HR_BIW_PP"     
    Can any body tell me the relevant solution for that.
    Thanks in advance!
    Sapna

    Hi Sapna,
    Please can you tell me how to fix this error, I have the same problem now.
    Thanks in advance.

  • Inbound IDOC for Payroll results

    Hi,
    does anybody know the import IDOC for payroll results?
    Anybody?
    Or other method to import payroll results?
    Thanks,
    Juzio
    Edited by: Juzio Kowlaski on Nov 16, 2010 9:43 AM

    I found it.

  • Generate XML file for payroll result

    Hi,
    I tried to generate XML file for chinese payroll result by t-code: pu12, but i can not find the interface format for china payroll(here is format for other country vesion like international, france...). How can i generate xml file for chinese payroll result. DO i need to create a format type? Is there any other way? thank you in advance.

    Coming back to my question is it really possible to generate bigger XML on 9i.
    Sure. But not in one go.
    I would use SQL/XML functions instead and paginate the result set so that each CLOB chunk doesn't exceed 4GB (or less). Each chunk could then be appended to a file using UTL_FILE.
    Alternatively, as Oracle 9i supports parallel pipelined functions, you could also imagine doing the job in parallel using automatic data partitioning on an input ref cursor.
    That would require some postprocessing steps to rebuild the entire file from the different chunks though.
    See : Pipelined and Parallel Table Functions

  • No C1 for payroll results

    We are implementing a new company code and in testing the payroll results we are not getting the C1 table with the new company code.  We are getting the C1 table with our existing company codes.
    Any thoughts?
    Thanks,
    Mark

    Mark,
    Have you done the mapping of new company code with cost center .
    - Praveen

  • Report for Inspection Results

    Hi experts,
    Is there any standard TCODE which can list out all the inspection results by material?
    Any activation required?
    Regards,
    Daniel

    Hi,
    QGP1 is too discrete because I need to input the characteristics one by one.
    MCXB have no results displayed.
    MCXD have no results displayed.
    I need SAP provide a list of inspection lots, plus defect informaiton within a time period (like by month).
    Regards,
    Daniel

  • Is there any standard report for employee Personal information.

    hi
    is there any standard report for employee Personal information regarding
    Persoanal No.
    Name of employee.
    Designation.
    Department.
    Joining Date.
    Birthdate.
    Basic Salary.
    DA.
    HRA.
    Thanks

    Hi,
    Refer to
    Tcode S_AHR_61016369 - Employee List
    And for payroll result refer to Function module "HRCM_PAYROLL_RESULTS_GET"
    Hope that helps.
    Regards
    Mr Kapadia
    ***Assigning points is the way to say thanks in SDN.***

  • Extractor for payroll reads data from cluster PCL2?

    Hello all,
    This is the line from help.sap in payroll extractor.
    "The extractor for payroll results reads data from payroll cluster PCL2, not from standard tables."
    Can someone explain to me what do we have to understand from that, and where in R/3 do we have to go and check for data.
    Thanks in advance.

    Anytime some of last information does not upload in delta to BW from payroll because payroll has a process to close it had to be executed (or something like that (sorry, i haven't enough funcional HR knoledge), it happened to me anytime).
    But, surely the user that you are using for extraction has no enought rights or authorizations.
    Look at these notes
    397208 **** very important!!!
    672514
    964569
    329961
    585682

  • Urgent :Posting Payroll results from Legacy system to FI/co

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

    hai nidhi,
    Inform ABAP team to develop the programme for payroll results,and post the entry to FI through T.code F-02.
    govind.

  • CM2012 Single report for deployments (packages, apps & TS)

    With the introduction of the new Application Model deployments in ConfigMgr 2012 is there anyway to report on deployments regardless is its a package, TS or App deployments in terms of status and laststatus time.
    Hi All,
    **Re-posting in correct forum :-) **
    I've been looking through the current reports and I haven't found a way to report on what we need.
    Our requirement is to be able to report on the count and status of the deployments per Client that have executed in a given timeframe (say the previous 30 days\1 month)
    What we are trying to achieve is a single report for the results of all deployments (apps, packages, TS) per client within a certain timeframe.
    When it was simply advertisements in ConfigMgr 2007 this could be achieved using the Last Status times within the ClientAdvertisementStatus view in combination with the views Advertisement, AdvertisementStatusInformation and CurrentAdvertisementAssignments.
    There is some decent reporting on deployments – particularly the DeploymentSummary view, which contains combined information on Apps, Packages and TS but what seems to be missing is the last or latest status time to indicate when
    the status occurred (or when the app deployment executed). I’ve been looking through the other views but haven’t yet found a last status time so we can report within a given timeframe.
    Anyone else looked at creating this or something similar yet?
    Thanks

    Yes, I know this is an old post, but I’m trying to clean them up. Did you solve this problem, if so what was the solution?
    It is unclear to me, do you look at the built-in report and try to modify them? Which built-in report give you the best results?
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Custom report on payroll and time evaluation results

    Hello Experts,
    My client would like to have a custom report on payroll and time evaluation results , can you please provide me with 2 options of achieving them.
    Thanks,
    Regi

    Hi,
    The time clusters are found using reports RPCLST*(B2, B1, PC etc) via SE38. You can find the time clusters under the time menu in the menu tree.
    PCL1 - Database for HR work area
    PCL2 - Accounting Results (time, travel expense and payroll);
    The database table PCL2 contains the following data areas:
    B2 time accounting results
    CD cluster directory of the CD manager
    PS generated schemas
    PT texts for generated schemas
    RX payroll accounting results/international
    Rn payroll accounting results/country-specific ( n = HR country indicator )
    ZL personal work schedule
    Tto retrieve payroll results accesse SAP transaction PC_PAYRESULT for all countries.
    Finally u can get the results for time PT_CLSTB2 , for Payroll PC_PAYRESULT. With this t.codes u can get the require results for ur custom report.
    Regards,
    Devi.

  • 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

  • Report not showing terminated empoyees payroll results

    Hi there,
    I have coded a report that shows customized payroll data for a group of employees, delimited by two dates. The user found a problem when an employee is terminated on a given month but his termination is processed the next month (vacations, etc). Say the employee quits October 27, the payroll is run on November 10 and the report is run for November 1 - November 30: I wont see his payroll results because the employee does not belong to a particular organizational unit in november.
    This is my main code:
    START-OF-SELECTION.
    GET pernr.
      sapid = pernr-pernr.
    * CREATE AND POPULATE PAYROLL OBJECT                         RRV100807
      CREATE OBJECT pay.
      CALL METHOD pay->read_result IMPORTING list = mylist.
    * ELIMINATE OLD RECORDS                                      RRV100807
      LOOP AT mylist INTO wa_mylist WHERE SRTZA <> 'A'.
        DELETE TABLE mylist FROM wa_mylist.
      ENDLOOP.
    * PROCESS PAYROLL FOR THE DESIRED ENTRIES                    RRV100807
      CALL METHOD pay->write_result EXPORTING list = mylist.
    GET payroll.
      LOOP AT payroll-inter-wpbp INTO wa_wpbp WHERE orgeh IN PNPOBJID.
    *   PROCESS PERIOD DATA
        itab_rt = payroll-inter-rt.
        PERFORM get_wt_amounts.
        EXIT.
      ENDLOOP.
    GET pernr LATE.
    * IF THERE ARE PAYROLL RESULTS
      IF wa_result-otsal <> 0
         OR wa_result-regsal <> 0
         OR wa_result-teller <> 0
         OR wa_result-other <> 0.
    *   PROCESS EMPLOYEE
        PERFORM get_data.
      ENDIF.
    Basically, the GET PERNR (get personnel record) is never executed because the employee does not belong to the org unit. Is there any way to gather employee records in one interval and payroll results in another? I assume they both use PNBEGDA and PNENDDA at this point.
    What I want is to retrieve payroll information based on the screen dates (BEGDA and ENDDA) and the employee data based on the payroll periods that were run during those dates.

    Instead of using the standard selection screen field for choosing org units, you could create a custom selection screen field for the org unit.  So the org unit would not affect the initial GET PERNR selection.  Then in your code (after the GET PERNR) you could check for the org unit, with an additional condition to check the employee's previous org unit if he is terminated.  There is also more than one way to get payroll results.  We often use this in our reports:
    FORM get_payroll_results.
      CLEAR results_present.
        CALL FUNCTION 'CU_READ_RGDIR'
          EXPORTING
            persnr          = pernr-pernr
          TABLES
            in_rgdir        = rgdir
          EXCEPTIONS
            no_record_found = 1
            OTHERS          = 2.
        IF sy-subrc EQ 0.
    Get cumulative monthly results
        Store only active payroll results.
          DELETE rgdir WHERE srtza NE 'A'.                "Active
        Delete all the payroll results not from the requested year
          DELETE rgdir WHERE paydt0(4) NE p_mdate0(4). "Reporting Year
        Delete any payroll results after the requested balance date
          DELETE rgdir WHERE paydt > p_mdate.
        Delete voided payroll data.
          DELETE rgdir WHERE voidr NE space.              "Voided
        Sort so the first record is the last for the requested year.
          SORT rgdir BY paydt DESCENDING fpend DESCENDING.
          LOOP AT rgdir INTO ws_rgdir
            WHERE paydt > beg_date.
            seqnr = ws_rgdir-seqnr.
            CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
              EXPORTING
                clusterid                    = 'RU'
                employeenumber               = pernr-pernr
                sequencenumber               = seqnr
              CHANGING
                payroll_result               = result
              EXCEPTIONS
                illegal_isocode_or_clusterid = 1
                error_generating_import      = 2
                import_mismatch_error        = 3
                subpool_dir_full             = 4
                no_read_authority            = 5
                no_record_found              = 6
                versions_do_not_match        = 7
                error_reading_archive        = 8
                error_reading_relid          = 9
                OTHERS                       = 10.
            LOOP AT result-inter-rt INTO wa_rt
              WHERE lgart = wa_wagetype.
                  ADD ws_betrg TO ws_total.
             ENDLOOP.
          ENDLOOP.
        ENDIF.
    This allows you to specify by date, wagetype, pay period, etc. which payroll results you wnat to include.  I hope this helps.
    - April King

Maybe you are looking for

  • [CS3] How to add multiple panels in a single FR

    Fellow Developers, I have tried every other way to try adding a 2nd panel definition to a single fr - no luck. Here is what I did. //================================================================================ // PanelList definition. //=========

  • I would like to know how to put a karaoke video on Final Cut Pro and then put my voice (singing) over it?

    I had bad experience with YouTube tutorials because it's hard to find the right tutorial video that applies to my enquiries, and I have to wait until the right time till the YouTuber gets to the point, and then I have to go back to find the exact spo

  • SINGLETRANSACTION=1 / WEBGUI=1 parameters & CAT2 service

    Hello!! I have the following configuration: ~WEBGUI     =1 ~RECORD=1 ~SINGLETRANSACTION=1 ~TRANSACTION=CAT2 ~NOHEADEROKCODE=1 ~WEBGUI_THEME=sl ~THEME=sl ~WEBGUI_ICON_TOOLBAR=2 ~WEBGUI_SIMPLE_TOOLBAR=40 It's ok, but I have a BIG problem with the ~SING

  • Htmleditorkit memory leak

    We are using the HtmlEditorKit class to parse documents in a Java program using Java version 1.4.1_02. While the class seems to work correctly, we eventually run out of memory when processing large numbers of documents. The problem seems to worsen wh

  • Error in Output--please ignore, not urgent

    Hi friends, I wrote a bdc to update the value in an outbound delivery thru VL02N transaction. Everything is going fine n unexpectedly at some point i'm getting an error in output. Error is coming only sometimes not every time we execute the program.