Skip to Content
author's profile photo Former Member
Former Member

sample hr reports

hi to all experts,

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 12, 2008 at 07:45 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 12, 2008 at 07:18 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2014 at 06:27 PM

    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.
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2014 at 07:05 AM

    Hi,

    For any queries with explanation, kindly refer the document below. It had helped me a lot during my initial stages. Hope it does the same to you.

    http://saphrcompendium.files.wordpress.com/2011/10/hr350_new.pdf

    Warm Regards and Wishing u Luck,

    Vinod M S

    SAP HR-ABAP

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.