CALL FUNCTION 'TRANSACTION_BEGIN' IMPORTING transaction_id = lv_transaction_id. * 更新日志表 MODIFY zfit0012_log FROM TABLE lt_zfit0012_log. MODIFY zfit0012 FROM TABLE lt_zfit0012. IF sy-subrc EQ 0. COMMIT WORK AND WAIT. * APPEND INITIAL LINE TO is_output-mt_fi012_erp_rsp-line_of_ret_msg ASSIGNING <lfs_msg>. * <lfs_msg>-msgty = 'S'. * <lfs_msg>-message = '传输成功!'. ELSE. ROLLBACK WORK. * APPEND INITIAL LINE TO is_output-mt_fi012_erp_rsp-line_of_ret_msg ASSIGNING <lfs_msg>. * <lfs_msg>-msgty = 'E'. * <lfs_msg>-message = '传输失败!'. ENDIF. * 结束更新事务 CALL FUNCTION 'TRANSACTION_END' EXPORTING transaction_id = lv_transaction_id.
CALL FUNCTION 'TRANSACTION_BEGIN'
IMPORTING
transaction_id = lv_transaction_id.
* 更新日志表
MODIFY zfit0012_log FROM TABLE lt_zfit0012_log.
MODIFY zfit0012 FROM TABLE lt_zfit0012.
IF sy-subrc EQ 0.
COMMIT WORK AND WAIT.
* APPEND INITIAL LINE TO is_output-mt_fi012_erp_rsp-line_of_ret_msg ASSIGNING <lfs_msg>.
* <lfs_msg>-msgty = 'S'.
* <lfs_msg>-message = '传输成功!'.
ELSE.
ROLLBACK WORK.
* APPEND INITIAL LINE TO is_output-mt_fi012_erp_rsp-line_of_ret_msg ASSIGNING <lfs_msg>.
* <lfs_msg>-msgty = 'E'.
* <lfs_msg>-message = '传输失败!'.
ENDIF.
* 结束更新事务
CALL FUNCTION 'TRANSACTION_END'
EXPORTING
transaction_id = lv_transaction_id.