gpt4 book ai didi

commit - BAPI_TRANSACTION_COMMIT 与 WAIT = 'X' 在 BADi 内

转载 作者:行者123 更新时间:2023-12-04 15:10:59 25 4
gpt4 key购买 nike

当在 BADi 中等于 'X' 时,使用带有 'WAIT' 参数的 'BAPI_TRANSACTION_COMMIT' 会有什么影响?我是否应该期望 SAP 在 LUW 提交时提交数据?

我知道如果您指定参数“WAIT”=“X”,在“BAPI_TRANSACTION_COMMIT”内部会发生“COMMIT WORK”或“COMMIT WORK AND WAIT”。

我也知道在 BADi 中进行“提交工作”是不正确的,但如果我通过 BAPI 使用“提交工作并等待”?

The SAP documentation regarding to COMMIT说:

This executes all high-priority (VB1) update function modules in the order of their registration and in a common database LUW. If you do not specify the addition AND WAIT, the program does not wait until the update work process has executed it (asynchronous updating), but instead is resumed immediately after COMMIT WORK. However, if the addition AND WAIT is specified, program processing after COMMIT WORK will not continue until the update work process has executed the high-priority update function modules (synchronous updating).

When all high-priority update function modules are completed successfully, the statement executes the low-priority (VB2) update function modules in the order of registration together in a common database LUW.



我的困惑是因为我们有一个 BADi 实现,其中使用参数“WAIT”=“X”调用了上述函数,并且我们发现了一个 SAP Notes,它禁止在该 BADi 中使用“COMMIT WORK”,但是它说“提交工作”而不是“提交工作并等待”。

因此,我可以认为该实现是正确的,因为当 LUW 完成时将提交该数据……与否。任何意见?

最佳答案

实际上,当您调用 COMMIT WORK 时,LUW 就完成了。或 COMMIT WORK AND WAIT .唯一的区别是 COMMIT WORK是异步的,COMMIT WORK AND WAIT是同步的。
BAPI_TRANSACTION_COMMITWAIT参数集等于COMMIT WORK AND WAIT .如果没有参数集,它等于 COMMIT WORK .

这是真的。您不得提交 BAdI。如果在 BAdI 已经执行之后有回滚怎么办?它可能会使您的数据处于完全不一致的状态。

关于commit - BAPI_TRANSACTION_COMMIT 与 WAIT = 'X' 在 BADi 内,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26494338/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com