目录
- 1、新增:RH_INSERT_INFTY / RH_INSERT_INFTY_EXP
- 2、修改:RH_UPDATE_INFTY / RH_UPDATE_INFTY_EXP
- 3、读取信息类型:RH_READ_INFTY
- 4、定界:RH_CUT_INFTY
- 5、删除:RH_DELETE_INFTY
1、新增:RH_INSERT_INFTY / RH_INSERT_INFTY_EXP
说明:这两个函数的用法差不多
代码举例:
data:ls_p9509 type p9509.
data:lt_pt9509 type table of hrt9509,ls_pt9509 type hrt9509.
data: lt_wplog type standard table of wplog,ls_wplog type wplog.loop at it_data into ls_data group by ( objid = ls_data-objid zhr_bzlx = ls_data-zhr_bzlx ) .
*****HRP9509 表赋值ls_p9509-plvar = '01'.ls_p9509-otype = 'O'.ls_p9509-objid = ls_data-objid. "组织编码ls_p9509-infty = '9509'.ls_p9509-istat = '1'.ls_p9509-subty = ls_data-zhr_bzlx.ls_p9509-begda = iv_bzks . "ls_data-zhr_bzks. "系统当前日期ls_p9509-endda = '99991231'.ls_p9509-zhr_bznd = ls_data-zhr_bznd."年度编制下达的编制开始和编制结束日期由前端传入,Excel中没有这两个字段了ls_p9509-zhr_bzks = iv_bzks. "ls_data-zhr_bzks.ls_p9509-zhr_bzjs = iv_bzjs. "ls_data-zhr_bzjs.ls_p9509-zhr_gkfs = ls_data-zhr_gkfs.ls_p9509-guid_p9509 = lv_guid.ls_p9509-zxgr_p9509 = iv_user.ls_p9509-zstm_p9509 = sy-datum && sy-uzeit.clear:ls_wplog.call method cl_hr_pnnnn_type_cast=>pnnnn_to_wplogexportingpnnnn = ls_p9509importingwplog = ls_wplog.loop at group ls_data assigning <fs_data>.move-corresponding <fs_data> to ls_item.ls_item-guid = lv_guid.ls_pt9509-tabseqnr = ls_pt9509-tabseqnr + 1.ls_pt9509-zhr_bzgwbm = <fs_data>-zgwbm.ls_pt9509-zhr_bzgwmc = <fs_data>-zgwbm_t.ls_pt9509-zhr_bzlx = <fs_data>-zhr_bzlx.ls_pt9509-zhr_bzsl = <fs_data>-zhr_bzsl.ls_pt9509-guid_p95092 = lv_guid.ls_pt9509-zxgr_p95092 = iv_user.ls_pt9509-zstm_p95092 = sy-datum && sy-uzeit.append ls_pt9509 to lt_pt9509.append ls_item to lt_item.clear:ls_pt9509,ls_item.endloop.append ls_wplog to lt_wplog.call function 'RH_INSERT_INFTY_EXP'exportingfcode = 'INSE' vtask = 'B' "'B'代表通过缓存更新 'D'代表直接更新 'S' 代表异步更新order_flg = ''commit_flg = '' " 空 表示立即提交 X表示不立即提交authy = ''tablesinnnn = lt_wplogtnnnn = lt_pt9509exceptionsno_authorization = 1error_during_insert = 2corr_exit = 3begda_greater_endda = 4