*&---------------------------------------------------------------------*
*& Report ZHRPA038
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZHRPA038.
TABLES:PERNR.
INFOTYPES:0000,0001,0002.
INFOTYPES:0008.
TYPES:BEGIN OF TY_RESULT,
CHANGE_TYPE TYPE C LENGTH 30, "异动类型
DTEXT TYPE UTEXT, "变动范围 Add by xpf 20160506
SITE_YN TYPE C LENGTH 6, "SITE是否变更 Add by cx 20160106
GO_OR_NOT TYPE C LENGTH 6, "是否需要改签合同
BEGDA TYPE PA0001-BEGDA, "生效日期
SAP_NUMBER TYPE PA0001-PERNR, "SAP编号
NUMBER TYPE C LENGTH 20, "工号 “根据SAP编号从IT0002取出调动后原工号
ENAME TYPE PA0001-ENAME, "姓名
FIRST_NAME TYPE C LENGTH 10, "姓拼音
LAST_NAME TYPE C LENGTH 30, "名拼音
NEW_SITE TYPE C LENGTH 40, "现SITE Add by cx 20160106 (根据调动后人事范围对应调动后SITE)
NEW_HETONG TYPE C LENGTH 40, "现劳动合同
NEW_OBJID_1 TYPE C LENGTH 40, "现一级部门
NEW_OBJID_2 TYPE C LENGTH 40, "现二级部门
NEW_OBJID_3 TYPE C LENGTH 40, "现三级部门
NEW_OBJID_4 TYPE C LENGTH 40, "现四级部门
NEW_OBJID_5 TYPE C LENGTH 40, "现部门编码
NEW_PLANS TYPE C LENGTH 80, "现职位
ZZ_BZ TYPE C LENGTH 40, "备注 Add by cx 20160106 (P0008-ZZ_BZ)
ZZ_ORI_NO TYPE C LENGTH 40, "原工号 Add by cx 20160106 (P0002-ZZ_ORI_NO)
OLD_SITE TYPE C LENGTH 40, "原SITE Add by cx 20160106 (Site划分配置表:Z02_T_DEPTSITE)[???]
OLD_HETONG TYPE C LENGTH 40, "原劳动合同公司
OLD_OBJID_1 TYPE C LENGTH 40, "原一级部门
OLD_OBJID_2 TYPE C LENGTH 40, "原二级部门
OLD_OBJID_3 TYPE C LENGTH 40, "原三级部门
OLD_OBJID_4 TYPE C LENGTH 40, "原四级部门
OLD_PLANS TYPE C LENGTH 80, "原职位
END OF TY_RESULT.
DATA:G_O1 TYPE HRP1000-SHORT,
G_O2 TYPE HRP1000-SHORT,
G_O3 TYPE HRP1000-SHORT,
G_O4 TYPE HRP1000-SHORT.
DATA:GT_RESULT TYPE STANDARD TABLE OF TY_RESULT,
GW_RESULT TYPE TY_RESULT.
DATA:GT_T530T TYPE STANDARD TABLE OF T530T,
GW_T530T TYPE T530T,
GT_T588T TYPE STANDARD TABLE OF T588T, "Add by xpf 20160506
GW_T588T TYPE T588T, "Add by xpf 20160506
GT_T500P TYPE STANDARD TABLE OF T500P,
GW_T500P TYPE T500P.
DATA:G_DAT LIKE SY-DATUM.
DATA:GW_P0001 TYPE P0001.
DATA:GDF_PATH TYPE STRING, "add by shikai.liao
GDF_FILENAME TYPE STRING,
GDF_FULLPATH TYPE STRING.
INITIALIZATION.
AT SELECTION-SCREEN OUTPUT.
START-OF-SELECTION.
SELECT *
FROM T500P
INTO CORRESPONDING FIELDS OF TABLE GT_T500P.
IF SY-LANGU =