我是靠谱客的博主 大方皮皮虾,最近开发中收集的这篇文章主要介绍SAP ABAP员工薪酬数据读取,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

 LOOP AT LT_PERNR INTO LW_PERNR.

    CLEAR lt_rgdir.

    lv_pernr = LW_PERNR-objid.
*  获取工资记录
    CALL FUNCTION 'CD_READ_RGDIR'
      EXPORTING
        persnr          = lv_pernr
      TABLES
        in_rgdir        = lt_rgdir
      EXCEPTIONS
        no_record_found = 1
        OTHERS          = 2.

    IF lt_rgdir[] IS INITIAL.
      CONTINUE.
    ENDIF.

    LOOP AT lt_rgdir INTO ls_rgdir WHERE fpbeg >= L_BEGDA
                                   AND   fpend <= L_ENDDA
                                   AND   srtza  = 'A'.
      CLEAR LW_DATA.

*    读取工资簇ID
      CALL FUNCTION 'PYXX_GET_RELID_FROM_PERNR'
        EXPORTING
          employee                    = lv_pernr
        IMPORTING
          relid                       = lv_relid
          molga                       = lv_molga
        EXCEPTIONS
          error_reading_infotype_0001 = 1
          error_reading_molga         = 2
          error_reading_relid         = 3
          OTHERS                      = 4.

*     读取工资记录
      CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
        EXPORTING
          clusterid                    = lv_relid
          employeenumber               = lv_pernr
          sequencenumber               = ls_rgdir-seqnr
        CHANGING
          payroll_result               = ls_payroll_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 ls_payroll_result-inter-rt INTO ls_rt .

        IF ls_rt-lgart = '/550'. "实发工资
          LW_DATA-ZSFGZ = ls_rt-betrg.
        ENDIF.

        IF ls_rt-lgart = '/101'. "应发工资
          LW_DATA-ZYFGZ = ls_rt-betrg.
        ENDIF.

        CLEAR ls_rt.
      ENDLOOP.

      IF LW_DATA IS  INITIAL.
        CONTINUE.
      ENDIF.

      LW_DATA-pernr = LW_PERNR-objid.
      LW_DATA-ZYEAR = ls_rgdir-fpbeg+0(4).


      COLLECT LW_DATA INTO LT_DATA.

      CLEAR ls_rgdir.
    ENDLOOP.

  ENDLOOP.

 

最后

以上就是大方皮皮虾为你收集整理的SAP ABAP员工薪酬数据读取的全部内容,希望文章能够帮你解决SAP ABAP员工薪酬数据读取所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(35)

评论列表共有 0 条评论

立即
投稿
返回
顶部