Saturday, February 17, 2007

SAP R/3 : EN-QUEUE... Becareful when using it...

Three days ago, i was helping my colleague to troubleshoot his program. His program uses EN-QUEUE and DE-QUEUE functions to lock and unlock a transparent table that the program is using.

While I was troubleshooting, the application crashed indefinitely and it wouldn't budge. So i make the very wrong move by pressing, you know what, CTRL-ALT-DELETE. The all-mighty Microsoft GOD forbidden function to kill off crashed or stalled program. Why i would say it wrong or in fact you guys out there are shooting my brains off is because when an SAP or ABAP program is running, even though it may looked stalled, but behind it - IT IS STILL RUNNING...!

So i made the terrible mistake.

When i opened up the editor to edit the program, it was locked. So again, i went to SM12 to unlock the program. However, this doesn't really solve our problem. Why? Because, you have to remember that my friend is using EN-QUEUE and DE-QUEUE functions. It means, when your program has begun an EN-QUEUE function you must always DE-QUEUE it at the end immediately. Now, because i make the ever blunder CTRL-ALT-DEL before the ABAP program got the chance to DE-QUEUE it, the report will not execute properly in the next session.

So we were turning in cycles for at least one hour and looking for an answer until someone said, "Eh, you guys should check out SM51... maybe your process is still running" By GOLLY, it was still running and it was there. We delete the session and instantly everything came back to normal.

Lesson learnt :
1. Never use the almighty God Forbidden Microsoft invented CTRL-ALT-DEL to kill off your ABAP process. Think twice before doing it.
2. SM51 to maintain and monitor processes
3. SM12 to maintain and monitor locked programs or transactions.

is sky the limit... CTRL-ALT-DEL and EN-QUEUE vis DE-QUEUE...

No comments: