2007 Sep 15 12:14 AM
Hi Gurus,
Can anyone tell me when we do programming in enhancements some COMMANDS should be avoided, pls help me ..This was an interview question..Looking forward for replies.
thanks
Seema
seema801@gmail.com
2007 Sep 15 5:33 AM
Hello Seema,
There are a variety of enhancements available..like BADI,BAPIs,Exits..etc
Pleass check the following link about Incomaptible enhancements
http://help.sap.com/saphelp_46c/helpdata/en/d2/42f955cafe11d1ad0c080009b0fb56/frameset.htm
<b>Incompatible Changes to Function Modules
In program code</b>
New additional source code that involves changes to the interpretation/processing logic
Changes to the existing source code that involve changing to the interpretation/processing logic
Adding or removing COMMIT WORK commands in the program
Reward if helpful and pls revert back if you have found a solid answer or document for the same
Regards
Byju
2007 Sep 15 6:34 PM
Byju,
Thanks for your reply and i appreciate ur time.
So should we avoid COMMIT in user exits ? that's what u meant to say ? can u pls explain ?.
thanks
seema
Message was edited by:
SEEMA JOSHI
2007 Sep 16 8:36 AM
Hi Seema,
The point is that we should not remove any existing or add any extra Commit commands to the exit
The main reason i believe is as follows.....
COMMIT WORK closes all open database cursors, any attempt to continue a SELECT loop after a COMMIT WORK results in a runtime error. For the same reason, a FETCH after a COMMIT WORK on the now closed cursors also produces a runtime error. You must therefore ensure that any open cursors are no longer used after the COMMIT WORK.
Also there are Non-Catchable Exceptions
Cause: COMMIT WORK is not possible in a FORM that was called using PERFORM ... ON COMMIT
Runtime Error: COMMIT_IN_PERFORM_ON_COMMIT
Cause: COMMIT WORK is not allowed in the update.
Runtime Error: COMMIT_IN_POSTING
Regards
Byju
2007 Sep 16 8:58 PM
Byju,
Thanks for ur nice explanation. I appreciate this.
Seema