简体   繁体   English

什么是SY-ONCOM?

[英]What is SY-ONCOM?

What is sy-oncom used for? sy-oncom 有什么用?

I've the following explanation from SDN but in my program I'm getting a value of 'T' and 'X'.我从 SDN 那里得到了以下解释,但在我的程序中,我得到了“T”和“X”的值。

SY-ONCOM SY-ONCOM

On Commit flag.在提交标志上。 This system field is set to different values depending on the call status of an ABAP program.该系统字段根据 ABAP 程序的调用状态设置为不同的值。 Of these, only the value of 'P' is guaranteed.其中,仅保证“P”的值。 If at all, SY-ONCOM must only be queried for 'P'.如果有的话,SY-ONCOM 必须只查询'P'。

The value 'P' means that the program is already executing a subroutine started using PERFORM … ON COMMIT and therefore a further subroutine call using PERFORM ... ON COMMIT would cause a runtime error.值“P”表示程序已经在执行使用 PERFORM ... ON COMMIT 启动的子例程,因此使用 PERFORM ... ON COMMIT 进一步调用子例程会导致运行时错误。

It's a largely undocumented field, I wouldn't rely on it.这是一个基本上没有记录的领域,我不会依赖它。 I know that it should be set to 'V' (Verbucher) when an update function module is run in the update task after COMMIT WORK.我知道在 COMMIT WORK 之后的更新任务中运行更新功能模块时,它应该设置为“V”(Verbucher)。 Before this, the PERFORM foo ON COMMIT calls are executed, and during these routines, the field should be set to 'P'.在此之前,执行 PERFORM foo ON COMMIT 调用,并且在这些例程期间,该字段应设置为“P”。

Just out of curiosity, what do you need it for?只是出于好奇,你需要它做什么?

我不确定这是否是SY-ONCOM唯一包含'X'的时间,但是我注意到当代码在通过qRFC执行的BAPI中执行(或作为其一部分)时,SY-ONCOM包含'X'。入站队列(使用事务SMQ2查看/监视)

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

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