on 07-05-2004 3:00 PM
Hi all
I try to work with the SAP GUI Scripting API. I manage to either connect to a running SAP Client instance or create a new one.
The _DsapfewseEvents events interface works fine - I can advise my Event handler and the CreateSession and DestroySession methods are called corretly.
But when I try to connect my ISapSessionEvents handler on a newly created session - no event handler methods will be called. The funny thing is that the Advise method works fine - my COM Event Handler is queried for all the interfaces that need to be implemented - but after the Advise finished - all references will be released again by SAP and therefore no method will be called.
What am I doing wrong? Do I need to call any special method or set any special property in order to consume the session events? Are there any SAP Server settings that I need to change?
Thanks in advance for any help
Solved the problem - here is the solution (for those that are interested!)
The CreateSession event passes an ISapSessionTarget* where one can advise the ISapSessionEvents event sink. If the reference count on the ISapSessionTarget is not increased - it won't work.
My theory: The ISapSessionTarget is a wrapper object that is just used by the scripting lib - if the client is not actually referncing the object - it will "die" and therefore all registered events will die as well.
have a nice day
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andreas!
I would like to work with SAPGUI Scripting API.
When you execute it, do you execute from abap code or just configuration?
Please, tell me some tips.
Thanks,
Rogerio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that suggestion!
I will try
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.