cancel
Showing results for 
Search instead for 
Did you mean: 

How to get UID used to create Meeting Request in Outlook from SAP?

Former Member
0 Kudos

Hi Friends,

We have booked an appointment in Outlook 2010 from SAP using the transaction PSV2, now we need to delete that appointment using .ICS file as attachment.

We have used the below code to build the .ICS file and the UID part is highlighted.

lv_row = 'BEGIN:VCALENDAR'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'VERSION:2.0'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'PRODID:-//SYFADIS//PORTAIL FORMATION//FR'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'METHOD:CANCEL'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'BEGIN:VEVENT'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

"lv_row = 'UID:E009E0E7344BA2F1BEDD005056AC611E@saphwdf.sap.corp'.

data lv_appt_guid_str type String.

lv_appt_guid_str = lv_appt_guid.

"append the e-mail address domain to the GUID!

CONCATENATE lv_appt_guid_str '@saphwdf.sap.corp' into lv_appt_guid_str.

lv_row = 'UID:'.

CONCATENATE lv_row lv_appt_guid_str into lv_row.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'SEQUENCE:1'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'DTSTAMP:20101217T132517Z'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

data lv_org_mail type ADR6-SMTP_ADDR.

lv_org_mail = lo_appointment->get_organizer_email( ).

CONCATENATE 'ORGANIZER:' lv_org_mail into lv_row.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

" lv_row = 'DTSTART:20101231T110000Z'.

lv_row = 'DTSTART:'.

CONCATENATE lv_row lv_date_from 'T' lv_time_from 'Z' into lv_row.

lv_cnt_nn = strlen( lv_row ) .

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'DTEND:'.

CONCATENATE lv_row lv_date_to 'T' lv_time_to 'Z' into lv_row.

lv_cnt_nn = strlen( lv_row ) .

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'SUMMARY:SMI Duty cancellation'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'STATUS:CANCELLED'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'END:VEVENT'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

lv_row = 'END:VCALENDAR'.

lv_cnt_nn = strlen( lv_row ).

concatenate '0' lv_cnt_nn lv_blank_tt lv_row into lv_row RESPECTING BLANKS.

append lv_row TO lt_attachment.

call function 'SO_RAW_INT_TO_RTF'

TABLES

objcont_old = lt_attachment

objcont_new = lt_attachment.

We are currently passing the GENAPPT_ID to the below method to get the GUID, but the class return a blank value.

DATA: lo_appointment TYPE REF TO cl_appointment,

DATA: lv_appt_guid TYPE SC_APPGUID.

CALL METHOD LO_APPOINTMENT->GET_GUID

RECEIVING GUID = lv_appt_guid.

We are facing an issue in finding the exact UID which is used by SAP to create the meeting request.

Could you please let us know from which table we can get the correct UID or how to proceed?

Please advise.

Thank you in advance.

Regards,

Vish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Friends,

Got a reply in the incident raised to SAP. They have asked to refer the example report : "RSSC_DEMO_CL_APPOINTMENT_APPL".

We were able to solve our issue and now the calendar entries can be deleted properly.

Thank you all for your inputs.

Regards,

Vish

Answers (1)

Answers (1)

roberto_vacca2
Active Contributor
0 Kudos

Hi.

You should find all data in SCAPPT table.

With APPT_MODIFY_INTERNAL you modify appointment and with APPT_CREATE_INTERNAL you create new ones.

An environment detail  of what your application does in sap,  could help.

Generally this:

DATA: lo_appointment TYPE REF TO cl_appointment,

DATA: lv_appt_guid TYPE SC_APPGUID.

CALL METHOD LO_APPOINTMENT->GET_GUID

RECEIVING GUID = lv_appt_guid.

Produce nothing....

Hope to help,

Bye.

Former Member
0 Kudos

Hi Roberto,

Thanks for the information.

Our requirement is as follows:

"When an Employee is booked on a training event, he gets an Outlook invite/request which updates the calendar as per the training schedule. This is working. Now when the training gets cancelled or if the Employee is rebooked on a different event then the previous meeting request from Outlook calendar needs to be cancelled and a meeting with a new date/time needs to be updated in the calendar."


In other words, basically we need to delete the outlook invite/request and create a new one. But our concern here is to identify the UID related to the invite/request which is to be deleted.

The above mentioned code is using for creating the .ICS file, and we have used the SCAPPT-APPT_GUID as UID of the .ICS file. But when we open the attachment in outlook it is not picking the appointment. From SCAPPT we tried to utilize the below two fields but APPL_GUID is always empty and APPT_GUID is not giving the correct value.

Below is a snapshot of the outlook calendar

Hope our query is clear now?

Thank you in advance.

Regards,

Vish