|| 您当前的位置:首页 > SAP HR资源网

HR-PAYROLL TEST PROGERAM

来源:  作者:  (查看评论)

TABLES:pernr,
       t512t.   "wage type
NODES: peras.
INFOTYPES:0001.
DATA: directory TYPE TABLE OF pc261.
DATA: payroll TYPE payin_result.
DATA: rt_line TYPE LINE OF hrpay99_rt.
DATA: country LIKE t001p-molga,
      number LIKE pc261-seqnr.
*---------------------------------------------------------------------*
*                  GER Peras                                          *
*---------------------------------------------------------------------*
GET peras.
  rp_provide_from_last p0001 space pn-begda pn-endda.
  IF p0001-werks = '0063'.
    CALL FUNCTION 'CU_READ_RGDIR'
      EXPORTING
        persnr          = p0001-pernr
      IMPORTING
        molga           = country
      TABLES
        in_rgdir        = directory
      EXCEPTIONS
        no_record_found = 1
        OTHERS          = 2.
    IF sy-subrc = 0.
      CALL FUNCTION 'CD_READ_LAST'
        EXPORTING
          begin_date      = pn-begda
          end_date        = pn-endda
        IMPORTING
          out_seqnr       = number
        TABLES
          rgdir           = directory
        EXCEPTIONS
          no_record_found = 1
          OTHERS          = 2.

      IF sy-subrc = 0.
        CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
          EXPORTING
            clusterid                    = 'IN'
            employeenumber               = p0001-pernr
            sequencenumber               = number
          CHANGING
            payroll_result               = payroll
          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.

        IF sy-subrc = 0.
          WRITE: / 'Employee No',
           20 'Wage type',
           35 'Amount'.

          LOOP AT payroll-inter-rt INTO rt_line WHERE
            lgart = '/101'.
            WRITE: / p0001-pernr,
                    20 rt_line-lgart,
                    35 rt_line-betrg.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.
  ENDIF.

考试辅导
最近更新内容
Google广告