5、NFTY, :WA_HR01-ZUPDATE, :WA_HR01-OPERA, :WA_HR01-ZDATA FROM z00hrjzlch01 WHERE SAP_GET = '' ENDEXEC. **处理人事数据 IF IT_HR01[] IS NOT INITIAL. LOOP AT IT_HR01 INTO WA_HR01. EXEC SQL.
6、 UPDATE z00hrjzlch01 SET SAP_GET = 'X' WHERE MANDT = :WA_HR01-MANDT AND ZID = :WA_HR01-ZID ENDEXEC. IF SY-SUBRC = 0.*********更新ERP数据库表 EXEC SQL. COMMIT ENDEXEC. MODIFY Z0
7、0HRJZLCH01 FROM WA_HR01. COMMIT WORK. ENDIF. ENDLOOP. ENDIF.**关闭连接 EXEC SQL. DISCONNECT :CNS_YGJK ENDEXEC.**获取异常 CATCH CX_SY_NATIVE_SQL_ERROR INTO CL_EXEC_REF. EXIT. CATCH CX_SQL_EXCEPTION INTO CL_SQLERR_REF.