While updating actual DB table (using SAP LUW), IN UPDATE TASK is always Rollback changes made in actual table.
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.
Here is my UPDATE FUNCTION MODULE for updating the actual DB table:
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'.
Why is there a rollback of the updates?