Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

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

replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question