OLE Automation : Get handle to Notes Database in SAP using ABAP

Hi, There is a requirement to compose a new memo in Lotus Notes from SAP System(using ABAP code). We found the OLE Automation can be used to implement this requirement. As a first step we tried to open names.nsf database to see if we are to get handle to it in ABAP code. But its not getting…

Below is the code:

CREATE OBJECT NOTESESSION ‘Notes.Notessession’.

GET PROPERTY OF NOTESESSION ‘UserName’ = text.

Write: text.

CREATE OBJECT W ‘notesUIWorkspace’.

CREATE OBJECT MAILDB ‘NotesDatabase’.

CREATE OBJECT MEMO ‘NotesDocument’.

CREATE OBJECT UIDOC ‘NotesUIDocument’.

ALL METHOD OF NOTESESSION ‘GETDATABASE’ = maildb.

EXPORTING #1 = ‘’

#2 = ‘names.nsf’.

GET PROPERTY OF maildb ‘ISOPEN’ = flag.

write : flag.

The flag always prints 0, does mean its not getting handle to the Notes db. However the code starts Notes client if it is not started and prints User Name.

I would like to know if there is any problem with the above code. Request your suggestions to implement the above functionality.

Thanks in advance.

Best Regards

Vasant Horapeti

Subject: Unsupported functions

HiAs far as I know cOM/OLE doesn’t support Notes frontend class like notesuiworkspace or notesuidocument. These are only available through the notesclient.

Just use the backend classes notesdocument, notesdatabase etc. (without UI) and it should work.

Subject: But, still backend classes are not working

Thanks for your response. But if you see my code it is simple. I am trying to get only handle to database object. That is back-end class. Its not opening. I have only declared front end objects. But i have not used them in the code.

Please let me know your suggestions.

Subject: No UI

I don’t know ABAP.Did you test it without the UI stuff? Remove it completely.

Subject: maybe working

i try this on vb:set ws = createobject(“Notes.NotesUIWorkspace”)

then,

ws.composedocument “servernamehere”, “databasemailfilehere”, “Memo”

and it works.

for abap, maybe:

CALL METHOD OF NOTESUIWORKSPACE

EXPORTING #1 = “servernamehere”

#2 = “databasemailfilehere”

#3 = “Memo”.