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.