12-11-2015 6:37 AM
Dear Experts,
I am facing an issue related to Outlook from ABAP program. As per the code, the program will create(opens) a new outlook email. But in some systems, it gives an error like SESSION failure. The place where it fails is below:
CREATE OBJECT ole_session 'MAPI.SESSION'.
if sy-subrc ne 0.
raise NO_SESSION.
endif.
I am sure this is a not an issue with sap as this works for other systems. Please let me know if any specific outlook settings are required for this issue.
Note: I have searched the forums, but couldn't find a solution.
Thanks in advance.
Regards,
Sainath
12-11-2015 2:36 PM
Did you check the Outlook versions, are they the same (there are some threads and OSS notes)
There can also be some security problem too. Sometimes DE/RE-select MS Outlook as the email default application solved the MAPI problem.
Regards,
Raymond
12-14-2015 1:24 PM
Hello Raymond,
Thanks for the hints.
Could you please let me know what is DE/RE? Where can I check the settings?
Since the issue happens only in some systems, we can compare the settings of problematic systems with the successful systems.
Thanks & Regards,
Sainath
12-14-2015 1:55 PM
12-11-2015 3:08 PM
I have done this before using code like below:
DATA oleapp type ole2_object.
DATA oleitem type ol2_object.
CREATE OBJECT oleapp 'OUTLOOK.APPLICATION'.
CALL METHOD OF oleapp 'CREATEITEM' = oleitem
EXPORTING #1 = 0.
SET PROPERTY OF oleitem 'TO' = 'Me@test.com'.
CALL METHOD OF oleitem 'DISPLAY'.
12-14-2015 1:26 PM
Hello Jim,
Thanks for the reply. However, the current logic works for all other systems except for few users. So, could you please suggest?
Regards,
Sainath