记账程序注意凭证记账与更新自建表同时提交
** 完成后先不提交 或者 回滚,记录下消息, CALL FUCNTION 'BAPI_ACC_DOCUMENT_POST' ** 继续自建表更新逻辑: UPDATE zfit640_s SET status1 = gs_zfit640_s-status1 bukrs1 = gs_zfit640_s-bukrs1 belnr1 = gs_zfit640_s-belnr1 budat1 = gs_zfit640_s-budat1 message1 = gs_zfit640_s-message1 zdate = gs_zfit640_s-zdate ztime = gs_zfit640_s-ztime WHERE oms_item = gs_zfit640_s-oms_item AND servercode = gs_zfit640_s-servercode. IF sy-subrc EQ 0. CLEAR gs_return. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X' IMPORTING return = gs_return. IF gs_return-type = 'E'. CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'. CLEAR: gs_zfit640_s