在更新实际DB表(使用SAP )时,IN UPDATE任务总是在实际表中进行回滚更改。
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.下面是用于更新实际DB表的更新功能模块:
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'.为什么会有更新的回滚?
发布于 2019-05-02 20:18:08
https://stackoverflow.com/questions/47466883
复制相似问题