2 Replies Latest reply: Apr 12, 2008 9:20 PM by Sriram Ponna RSS

sample hr reports

moazam hai
Currently Being Moderated

hi to all experts,

 

im learning ABAP-HR i need  sample hr reports(especially payroll reports) for practice

  • Re: sample hr reports
    Kodandarami Reddy Suravaram
    Currently Being Moderated

    Hi,

    *.......................................................................
    *: Report:  ZPAYROLL_RESULTS                                           :
    *:                                                                     :
    *: Author:  www.SAPdev.co.uk                                           :
    *:                                                                     :
    *: Description: Demonstrate retrieving payroll results data, please    :
    *:              note program does not produce any meaningful output    :
    *               is simply a demonstration of how to access the data    :
    *:.....................................................................:
    REPORT  ZPAYROLL_RESULTS.
    
    NODES: pernr.
    INFOTYPES: 0000, 0001, 2001.
    
    TABLES: t554s, pcl1, pcl2.
    
    INCLUDE rpclst00.
    INCLUDE rpc2rx09.                      "Payroll results datadefns-Intl.
    INCLUDE rpc2rxx0.                      "Payroll results datadefns-Intl.
    INCLUDE rpc2rgg0.                      "Payroll results datadefns-GB
    INCLUDE rpcfdcg0.                      "Payroll results datadefns-GB
    INCLUDE rpcdatg0.
    INCLUDE rpc2cd00.                      "Cluster Directory defns.
    INCLUDE rpc2ps00.                      "Cluster: Generierte Schematas
    INCLUDE rpc2pt00.
    INCLUDE rpcfdc10.
    INCLUDE rpcfdc00.
    INCLUDE rpppxd00.
    INCLUDE rpppxd10.
    INCLUDE rpcfvp09.
    INCLUDE rpcfvpg0.
    INCLUDE rpppxm00.
    
    TYPES: BEGIN OF t_salrate,
        seqnr    TYPE pc261-seqnr,
        begda    TYPE p2001-begda,
        endda    TYPE p2001-endda,
        split(2) TYPE c,
        val      TYPE p DECIMALS 2,
       END OF t_salrate.
    DATA: it_salrate TYPE STANDARD TABLE OF t_salrate INITIAL SIZE 0,
          wa_salrate TYPE t_salrate.
    
    
    *Selection screen
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: so_awart FOR p2001-awart.
    SELECTION-SCREEN END OF BLOCK block1.
    
    ************************************************************************
    *START-OF-SELECTION.
    START-OF-SELECTION.
    
    GET pernr.
    
    * get payroll results data
      rp-init-buffer.
      CLEAR rgdir. REFRESH rgdir.
      CLEAR rt. REFRESH rt.
      CLEAR: rx-key.
    
    * set key to current pernr
      MOVE pernr-pernr(8) TO cd-key-pernr.
    
    * retrieves payroll results for specific pernr(personnel number)
      rp-imp-c2-cd.
    
      IF rp-imp-cd-subrc = 0.                                "rgdir success
        rx-key-pernr = pernr-pernr.
        SORT rgdir BY seqnr ASCENDING.
        CLEAR rgdir.
      ENDIF.
    
      SORT rgdir BY fpbeg fpend ASCENDING seqnr DESCENDING.
    * RGDIR the table where all payroll results periods are stored
      LOOP AT rgdir WHERE  abkrs IN pnpabkrs        "pay area
                      AND  srtza EQ 'A'
                      AND  void  NE 'V'.
    
        IF sy-subrc NE 0.
    *     set key to specific payroll results period(current RGDIR loop pass)
          UNPACK rgdir-seqnr   TO   rx-key-seqno.
    
    *     Retrieves data for specific payroll results period (current RGDIR
    *     loop pass)
          rp-imp-c2-rg.
    
    *     Loop at wpbp data for specific payroll results period
          LOOP AT wpbp.
            wa_salrate-seqnr = rgdir-seqnr.
            wa_salrate-begda = wpbp-begda.
            wa_salrate-endda = wpbp-endda.
            wa_salrate-split = wpbp-apznr.
    *       loop at rt data for specific payroll results period
            LOOP AT rt WHERE lgart EQ '/010' AND             "wage type
                             apznr EQ wpbp-apznr.            "payroll split
              wa_salrate-val = ( rt-betpe * ( wpbp-adivi / wpbp-kdivi ) ).
              APPEND wa_salrate TO it_salrate.
            ENDLOOP.
          ENDLOOP.
    
    *     Process BT table
          LOOP AT BT.
          ENDLOOP.
    
    *     Process NIPAY table
          LOOP AT NIPAY.
          ENDLOOP.
    
    *     etc................
        ENDIF.
      ENDLOOP.

     

    reward if helpful

    raam

  • Re: sample hr reports
    Sriram Ponna
    Currently Being Moderated

Actions