Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Many a time our customers ask us if we can send an outlook meeting notice from ABAP. Until now, We did not realize that it was possible, But now we do.

Here is the code snippet of what we had done to achieve this.

The first step was look at a Microsoft outlook meeting invitation as a flat file. For that, we created a meeting notice and downloaded it as a *VCS file. For this please create a dummy invite, invite attendees and save is as a .VCS file. ( File->Save as). Your flat file should look like this.

PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN

Now , We all know that the function module  SO_NEW_DOCUMENT_ATT_SEND_API1 can be used send an e-mail with a file as an attachment.  There are tons of messages already on this topic and hence to avoid redundancy, I am skipping that part. for eg please refer

I am only showing the lines that are used to fill and create the calendar file. Please note this is a sample code and hence hardcoded. Please use text elements for constants and work areas to append to internal tables without directly appending them.

* These are the parameters for the attachment file name and the contents of the attachment itself.
DATA: t_objhead LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA: t_objbin LIKE solisti1 OCCURS 20 WITH HEADER LINE.
CONSTANTS:  c_cr(2) VALUE '0D'.
t_objhead = 'testappointment.vcs'.
APPEND t_objhead.
*hence the file will be sent as a vcs file. now for the details.
APPEND t_objbin.

Please add all the other lines in the file in a similar manner.

You can also try to send an e-mail from SBWP to an external address with a VCS attachment and the results would be similar. Please note that the number UID:040000008200E00074C5B7101A82E0080000000070011ADA9FD6C7010000000000000000100
 00000F29C2A2ACE5F284382D1B7CC8BA82B8B might vary for diffewrent versions. Also, they can save it into their calendar and you might get a receipt acknowlegement if you are in the same smtp server as them in case you set the flag in SO_NEW_DOCUMENT_ATT_SEND_API1. Please try using this snippet and let me know any problems you  face or any questions that you may have. Happy reading.

Any comments to improve this snippet are more than welcome.




  1. Guest

    Hi Ganesh,

    I used the code mentioned by you to create an appointment using the VCS file through ABAP. The email is sent successffully with a VCS attachment but the outlook gives a error stating that you tried to save a recurring lunar appointment in iCalendar format. To avoid this error, set the appointment option to Gregorian instead of Lunar.

     Can you tell me where do we specify the appointment type as lunar or Gregorian.



  2. Guest

    Hi Paresh,

    I do not know, if you fixed this. Once you build the script for vcs file, call this function module   CALL FUNCTION 'SO_RAW_TO_RTF'
          OBJCONT_OLD = lt_soli[]
          OBJCONT_NEW = lt_soli_new[].

     This will do the alignment and you should not see the gregorian error

    This will fix the problem.



  3. Guest

    Hi all,

    We would like to do the same but for Lotus Notes appointments.

    Do you know if this is possible ?

    Regards, Michel

  4. Guest

    Hi experts!!

    Somone has de code for  LOTUS???

    Suresh, could you paste the code to send an appointment???

    thanks a lot!

  5. Guest


    It should not matter whether you use Outlook or Lotus NOtes at all, as SAP can send appointments in the format .ICS, which is supported by IBM, Google, (partially) by Microsoft, any many other vendors.

    You can compose any appointment on your own (inluding also deletion of an existing appointment). You may refer to:

    Kind Regards: Alexander