简体   繁体   English

使用SAP JCO 3.0时是否需要调用BAPI_TRANSACTION_ROLLBACK?

[英]When using SAP JCO 3.0 is it necessary to invoke BAPI_TRANSACTION_ROLLBACK?

是否有必要调用BAPI_TRANSACTION_ROLLBACK或仅JCoContext.end()会进行隐式回滚?

If the particular JCoContext.end() will end the stateful call sequence (which is not true for a nested context) then the respective underlying RFC connection will be reset. 如果特定的JCoContext.end()将结束有状态调用序列(对于嵌套上下文不是这样),则将重置相应的基础RFC连接。 And this means that also an associated uncommitted LUW (Logical Unit of Work) will be canceled which results in an implicit rollback. 这意味着还将取消关联的未提交的LUW(逻辑工作单元),这将导致隐式回滚。

But if you know that a rollback is required then why not calling BAPI_TRANSACTION_ROLLBACK directly? 但是,如果您知道需要回滚,那为什么不直接调用BAPI_TRANSACTION_ROLLBACK? I would prefer explicit operations instead of implicit assumptions. 我希望使用显式运算而不是隐式假设。 I guess this would make debugging and tracing easier as well. 我想这也将使调试和跟踪也变得更加容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM