문제

What is sy-oncom used for?

I've the following explanation from SDN but in my program I'm getting a value of 'T' and 'X'.

SY-ONCOM

On Commit flag. This system field is set to different values depending on the call status of an ABAP program. Of these, only the value of ‘P’ is guaranteed. If at all, SY-ONCOM must only be queried for ‘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.

도움이 되었습니까?

해결책

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. Before this, the PERFORM foo ON COMMIT calls are executed, and during these routines, the field should be set to 'P'.

Just out of curiosity, what do you need it for?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top