码迷,mamicode.com
首页 > 其他好文 > 详细

记账程序注意凭证记账与更新自建表同事提交

时间:2018-03-10 12:07:53      阅读:215      评论:0      收藏:0      [点我收藏+]

标签:ret   bsp   完成后   更新   export   sage   cat   消息   提交数据   

 

** 完成后先不提交 或者 回滚,记录下消息,
 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 "ADD BY YANGC AT 20171115 FOR 肖克 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-bukrs1,gs_zfit640_s-budat1,gs_zfit640_s-belnr1. gs_zfit640_s-status1 = E. CONCATENATE gs_zfit640_s-message1 提交数据失败 INTO gs_zfit640_s-message1 SEPARATED BY . ENDIF. ELSE. ROLLBACK WORK. CLEAR: gs_zfit640_s-bukrs1,gs_zfit640_s-budat1,gs_zfit640_s-belnr1. gs_zfit640_s-status1 = E. CONCATENATE gs_zfit640_s-message1 过账状态数据更新到ZFIT1025表失败 INTO gs_zfit640_s-message1 SEPARATED BY . ENDIF.

 

记账程序注意凭证记账与更新自建表同事提交

标签:ret   bsp   完成后   更新   export   sage   cat   消息   提交数据   

原文地址:https://www.cnblogs.com/rainysblog/p/8537292.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!