Create multiple appointments, send it to outlook, modify/delete them using ABAP
To create a new appointment and send an email, I have always used following document, which is a real helpful one.
But, when it comes to multiple appointments creation, there is a bit pain.
Following is the learning beyond this document :-
1. Multiple appointment creation via class CL_APPOINTMENT –> Make sure object is instantiated every time.
Else, same appointment will get edited again and again.
2. SET_DATE of CL_APPOINTMENT should be used to set timezone every time. This is true for single appointment creation too.
If timezone parameter is not passed, then timezone will be set based on the logon user timezone.
If there are some error, then UTC will be set as a timezone.
And then the output appointments time will come out to be considering UTC +/- hours.
3. There are various issues for modify/delete appointments. There is already a document by Alexandar for update/delete appointments.
But, another solution for appointment deletion could be – trigger an update for deleted appointment.
And create a new appointment far ahead say 1000 years after. This will also eliminate the task of manually clicking on the button ‘remove from calendar’ and no one will ever check 1000 years ahead. .
4. While creating an appointment, mail for participants is always send to those are marked as ‘external participants’. ‘Internal participants’ are never sent a mail for participation. This setting is pertaining to SU01 attributes for user.
5. Always mention appointment type which is specific to your development. Appointment type values can be picked from table SCAPPTTYPE.
Eg:- lo_appointment->set_type( ‘ZAPPT’ ).
6. FM APPT_CREATE_INTERNAL sends implicitly sends email. Explicitly sending mail causes issue when you send mail to outlook for modified appointment.
That’s all I could collaborate till now, will keep on adding points as and when I get some more inputs to share.
Thanks, happy coding !!