on 04-19-2006 3:42 PM
Hello,
What is the proper code to put in the aet.ShutDown event to properly terminate the add-on?
I tried to put End, but the add-on was still running in the processes after SAP was closed.
another question: why is my add-on taking 63k of memory??
One more thing, when I stop the add-on from the add-on manager, it is still running in the processes! Is this the same issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ralph,
The only thing I can see wrong with your code is that you are calling GC.Collect after exiting the application (ie GC.Collect won't run as the application has already quit).
If you stop the add-on from the Add-on Manager then the event that is fired is aet_ServerTerminition and not aet_ShutDown. Note, there is a 'bug' in SBO that will report that the add-on failed to stop, even though it has unloaded from memory. See SAP note 820898 for more details.
Hope this helps,
Owen
For the memory issue, yes it is 64MB. I'm glad to know that it is normal.
However, for stopping my Add-on, disconnecting the company didn't work. Any other suggestions?
thank you
P.S: This is the code that I have used so far:
If EventType = SAPbouiCOM.BoAppEventTypes.aet_ShutDown Then
oCompany.Disconnect()
System.Windows.Forms.Application.Exit()
GC.Collect()
End If
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<i>why is my add-on taking 63k of memory??</i>
If you mean 64<b>Mb</b> then it is probably because you use the DI API. It has always been a huge memory hog and unfortunately you can't really avoid it in most add-ons. I think SAP recommends something like a minimum of 128Mb memory required per add-on.
Try calling the Disconnect method of the DI API Company object before ending the add-on to see if that helps with your shutdown problem. Also make sure you are only connecting to the DI once through single sign-on.
John.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use this code with VB6. I had some problems with 2004 but in 2005 works fine
Case aet_ShutDown:
oCompany.Disconnect
Close
Sleep (2000)
End
About memory, if you are talking about 63MB that is normal. Addons need lots of memory. In fact we are experiencing lots of perfomance problems since we upgraded to 2005
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.