在更新实际数据库表(使用 SAP LUW)时,IN UPDATE TASK 始终是回滚在实际表中所做的更改。
APPEND ls_emp TO lt_up_emp.
call function 'ZFM_UPDATE_EMPLOYEE' in update task
tables
lt_update = lt_up_emp.
COMMIT WORK.
if sy-subrc <> 0.
ROLLBACK WORK.
endif.
这是我用于更新实际数据库表的 UPDATE FUNCTION MODULE:
IF sy-subrc = 0.
""--- insert the data.
IF lt_insert[] IS NOT INITIAL.
INSERT ztadept FROM TABLE lt_insert.
IF sy-subrc <> 0.
RAISE not_inserted.
ENDIF.
ENDIF.
"-- delete....
IF lt_delete[] IS NOT INITIAL.
DELETE ztadept FROM TABLE lt_delete.
IF sy-subrc <> 0.
RAISE not_deleted.
ENDIF.
ENDIF.
"--Update.........
IF lt_update[] IS NOT INITIAL.
UPDATE ztadept FROM TABLE lt_update.
IF sy-subrc <> 0.
RAISE not_updated.
ENDIF.
ENDIF.
ENDIF.
CALL FUNCTION 'DEQUEUE_EZDEPT_LOC'.
为什么会有更新回滚?