1、根据某个的人员号获取其所有薪资区间(项)。
DATA:lt_rgdir TYPE STANDARD TABLE OF pc260 WITH DEFAULT KEY,
CALL FUNCTION 'CD_READ_RGDIR'
EXPORTING
persnr = p0001-pernr “人员号
TABLES
in_rgdir = lt_rgdir ”结果表
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
2、*获取期间的薪资
LOOP AT LT_RGDIR INTO LS_RGDIR.
CLEAR: LV_RELID, LV_MOLGA.
CALL FUNCTION 'PYXX_GET_RELID_FROM_PERNR'
EXPORTING
EMPLOYEE = P0001-PERNR
IMPORTING
RELID = LV_RELID
MOLGA = LV_MOLGA
EXCEPTIONS
ERROR_READING_INFOTYPE_0001 = 1
ERROR_READING_MOLGA = 2
ERROR_READING_RELID = 3
OTHERS = 4.
3、*读取薪资结果数据
CLEAR LS_RESULT .
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
CLUSTERID = LV_RELID
EMPLOYEENUMBER = P0001-PERNR
SEQUENCENUMBER = LS_RGDIR-SEQNR
CHANGING
PAYROLL_RESULT = LS_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.
3、查工资表项视图
V_512W_T 在se11下可以查看这个视图 如下图:
3、待续