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: 

send attachment as ICS format using class CL_BCS and CL_DOCUMENT

Madhurivs23
Participant
0 Kudos

Hello,

I have my data in internal table and I want to pass this data as ICS format to the email address. using CL_BCS.

In this case I dont want to save the file first on local server then pass it as attachement. Rather I want to send the internal table data directly as attachment with .ICS format.

Please help.

thanks and regards,

Madhuri

5 REPLIES 5

Sandra_Rossi
Active Contributor
0 Kudos

Hi Madhuri,

Probably I don't understand the question, but why don't you simply use ADD_ATTACHMENT method with parameter I_ATTACHMENT_TYPE = 'ics' and I_ATTACHMENT_SUBJECT = 'FileName'?

Sandra

0 Kudos

Hi Sandra,

Where should I pass my internal table data to this method? or should I save the contents in one temp .ics file and then send?

If my file is stored in application server, then should I give path to the I_ATTACHMENT_SUBJECT parameter?

regards,

Madhuri

0 Kudos

Hi Sandra,

I am able to send the file as attachment with ICS type.

I have appended the CALENDER event etc to the text file. now that file is getting attached as .ICS properly, but the problem is that the contents of the text file are also coming as body of email which I dont want. is there any parameter we need to pass to any method?

call function 'SO_RAW_INT_TO_RTF' tables objcont_old = text objcont_new = text. document = cl_document_bcs=>create_document( i_type = 'RAW' i_text = text i_subject = 'test ICS' ). "#EC NOTEXT CALL METHOD document->add_attachment EXPORTING i_attachment_type = 'ICS' i_attachment_subject = 'test' i_att_content_text = text[].

rgds,

Madhuri

Edited by: madhuri sonawane on Jun 20, 2011 6:28 PM

0 Kudos

Hi Madhuri,

By mistake, you have passed TEXT variable twice, in both body and attachment.

Sandra

0 Kudos

Hi Sandra,

thanks very much. I referred to link :

http://wiki.sdn.sap.com/wiki/display/Snippets/SAPABAPtoOutlookCalendar+Entry

rgds,

Madhuri