查询工资核算结果

查询工资核算结果

事务代码:PC_PAYRESULT

查询工资核算结果_第1张图片
查询工资核算结果_第2张图片
查询工资核算结果_第3张图片

BAPI

   DATA:lv_relid TYPE relid_pcl,
         lv_molga TYPE molga,
         lt_rgdir TYPE TABLE OF pc260,
         lt_pc261 TYPE TABLE OF pc261.
     "获取序列号
    CALL FUNCTION 'CD_READ_RGDIR'
      EXPORTING
        persnr          = pernr
      TABLES
        in_rgdir        = lt_rgdir
      EXCEPTIONS
        no_record_found = 1
        OTHERS          = 2.

    CALL FUNCTION 'PYXX_GET_RELID_FROM_PERNR'
      EXPORTING
        employee                    = pernr
      IMPORTING
        relid                       = lv_relid
        molga                       = lv_molga
      EXCEPTIONS
        error_reading_infotype_0001 = 1
        error_reading_molga         = 2
        error_reading_relid         = 3
        OTHERS                      = 4.

    MOVE-CORRESPONDING lt_rgdir TO lt_pc261.
    "获取工资记录
    CALL FUNCTION 'PYXX_READ_RGDIR_PAYRESULTS'
      EXPORTING
        clusterid              = lv_relid
        employeenumber         = pernr
      TABLES
        rgdir                  = lt_pc261
        imported_periods       = result
      EXCEPTIONS
        import_error           = 1
        not_authorized_for_all = 2
        OTHERS                 = 3.

你可能感兴趣的:(HR,SAP)