Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Add Voting buttons in MS Outlook from SAP ABAP program

Former Member
0 Kudos

I have a requirment where SAP ABAP program will send an email.

I need to have the voting buttons (yes/no) in the email. It does not have to be in the content of the email but the typically voting buttons that we can add to the MS Outlook email.

If there is someone who can give me the steps and documentations, greatly appreciate.

The main critieria is that it has to be MS outlook.

3 REPLIES 3

Former Member
0 Kudos

Greetings,

I am looking for the same thing. i still can't figure out how to do it. up till now i have already have the program to open the e-mail editor(due to my program spec requires only the editor to open) with all of the text and data retrieve from SAP table. i'm having problem translating vb macro to ABAP(i'm using ole2incl). i think after translating this macro;

Dim mailItem As Outlook.MailItem

mailItem.VotingOptions = "Yes;No"

mailItem.Send

we can implement it with the rest of the program. would you m ind sharing anything you know concerning this matter.. and i would greatly appreciate it if you could share anything on formatting the e-mail also.

i'm sorry if this is of no help to you and thankful if you could share anything concerning this matter.

Former Member
0 Kudos

Hi,

here is the solution i think.

INCLUDE ole2incl .

DATA: ole_outlook TYPE ole2_object,

ole_CItem TYPE ole2_object,

ole_body TYPE string.

CREATE OBJECT ole_outlook 'Outlook.Application'.

CALL METHOD OF ole_outlook 'CreateItem' = ole_CItem

EXPORTING #1 = 0.

SET PROPERTY OF ole_CItem 'To' = 'receiver @ mail.com'.

SET PROPERTY OF ole_CItem 'Subject' = 'E-mail Title'.

CALL METHOD OF ole_CItem 'Display'.

CONCATENATE ole_body

'Dear Sir/Madam,'

cl_abap_char_utilities=>newline

cl_abap_char_utilities=>newline

INTO ole_body.

SET PROPERTY OF ole_CItem 'Body' = ole_body.

CALL METHOD OF ole_CItem 'ATTACHMENTS' = ATTS.

CALL METHOD OF ATTS 'ADD'

EXPORTING #1 = 'C:\File_Location\File_name.extension'.

SET PROPERTY OF ole_CItem 'VotingOptions' = 'Yes;No'.

FREE OBJECT ole_outlook.

*you can replace the voting option to what you want, for example 'Yes;No' or 'Approve;Reject'.

0 Kudos

Hi,

I am also looking for same sort of solution, but does this work only with outlook or will it work with all the email clients including web mails or blackberry?

Regards,

Kamesh Bathla