1\定义传入参数:ZHRS_PAYR_CALC_RES
2、定义传出参数:ZHRS_PAYR_RESULT_RES
工资明细表结构
日志信息统计结构
3、源代码开始
FUNCTION Z_DHR_PAYR_RT_SEARCH.
*"----------------------------------------------------------------------
*"*"本地接口:
*" IMPORTING
*" REFERENCE(IS_INPUT) TYPE ZHRS_PAYR_CALC_RES
*" EXPORTING
*" REFERENCE(ES_OUTPUT) TYPE ZHRS_PAYR_RESULT_RES
*" TABLES
*" ET_MSG STRUCTURE BAPIRET2 OPTIONAL
*"----------------------------------------------------------------------
FIELD-SYMBOLS:
<LFS_PAYRESULT> TYPE ANY,
<LFS_RT> TYPE HRPAY99_RT,
<LFS_WPBP> TYPE HRPAY99_WPBP.
DATA:
LT_STATI TYPE TABLE OF ZHRS_PAYR_STATI, " 工资核算统计信息ZHRS_PAYR_STATI
LT_PAYROLL TYPE ZHRS_PERS_PAYROLL_T_RES, "月度薪资报表ZHRS_PERS_PAYROLL_T_RES
LT_MSG TYPE ZHRS_PAYR_PERS_MSG_T, "工资核算人员错误日志表结构ZHRS_PAYR_PERS_MSG_T
LT_RGDIR TYPE TABLE OF PC261,
LT_PERS TYPE TABLE OF ZHRS_PERSON,
LS_PAYROLL TYPE ZHRS_PERS_PAYROLL_RES,
LS_RGDIR TYPE PC261,
LS_RT TYPE PC207,
LS_WPBP TYPE PC205,
LS_INPUT TYPE ZHRS_PAYR_AREA_REQ.
DATA:
LV_RELID TYPE RELID_PCL,
LV_MOLGA TYPE MOLGA,
LV_TYPE TYPE T52RELID-TYPENAME,
LV_TYPE_1 TYPE T52RELID-TYPENAME,
LV_TYPENAME TYPE T52RELID-TYPENAME,
LV_TADIR TYPE TADIR-OBJ_NAME.
DATA:
REF_PAYRESULT TYPE REF TO DATA.
"\\传入参数转换
IF IS_INPUT IS NOT INITIAL.
"核算范围
IF IS_INPUT-ABKRS IS INITIAL.
"//错误处理
PERFORM FRM_FILL_MSG TABLES ET_MSG USING 'ZHR' '001' 'E' TEXT-M02 '' '' ''.
RETURN.
ENDIF.