Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

COMMANDS NOT USED IN EXITS

Former Member
0 Kudos
118

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

4 REPLIES 4

Former Member
0 Kudos
92

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

Former Member
0 Kudos
92

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

0 Kudos
92

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

Former Member
0 Kudos
92

Byju,

Thanks for ur nice explanation. I appreciate this.

Seema