MSS provides an option to send a meeting invite via Email for Reminder of dates. For example, end of leave of absence.
Method HANDLE_ACTION of SAP standard POWL feeder class CL_HRMSS_ROD_TASKS_POWL calls method CREATE_APPOINTMENT of class CL_HRMSS_CENTRAL_SERVICES.
Problem with the coding in method CREATE_APPOINTMENT is that it sets meeting organizer and meeting participant as same person. For example, if user Parag Parikh access MSS and tries to send an E-mail to update Calendar , the options to Accept, Decline etc. are disabled for him. At the same time, this invite does not update calendar of the Manager.
Some of the options would be,
1) Make meeting organizer and meeting participants as different person. ( Example, setting up time to have discussion between manager and employee. So manager would be meeting organizer and empoyee would be participant ).
2) Changing meeting organizer as some generic user ID when sending Email so that manager can accept invite to update his calendar. i.e. the meeting invite works as a reminder in Manager’s calendar.
3) Implement an over-write exit for method CREATE_APPOINTMENT/implicit enhancement at the begining of the method and implement E-mail sending method per business requirement. For example, replace SAP code to send meeting invite with the code to send a .ics file as attachment with E-mail. SAP code in method CREATE_ICS_FILE of class CL_HRMSS_CENTRAL_SERVICES can be used as reference.
For option 1), the task is relatively simpler. BAdI HRMSS_B_CALENDAR_APPOINTMENT ( with filter ‘ROD’ ) can be used where SAP passes instance of appointment in changing parameter CV_APPOINTMENT ( instance of class CL_APPOINTMENT ). Method ADD_PARTICIPANT of class CL_APPOINTMENT can be used to add participants. Method DELELTE_PARTICIPANT can be used to delete SAP populated participant.
option 2) becomes little tricky because of the position where SAP calls BAdI HRMSS_B_CALENDAR_APPOINTMENT. This BAdI is called after the appointment is saved in the database. As a result, meeting organizer can not be changed in the BAdI. Method SET_ORGANIZER will return an exception if called inside the BAdI implementation.
A possible approach would be to copy relevant attributes of the appointment to a new appointment with the only change being meeting organizer. This code to create a new appointment can be written inside BAdI implementation.
Old meeting can be deleted from databse using FM APPT_PARTLIST_DELETE_INTERNAL. Pass CHANGED_MODE = ‘1’, CV_APPOINTMENT->INSTANCE_ID to APPT_ID.
Instance of new appointment can be passed to changing parameter CV_APPOINTMENT so that SAP will send meeting invite via E-mail for this new appointment. As shown in example below, user ID WF-BATCH was used for demonstration purpose. Options to accept or decline meeting were enabled for manager Parag Parikh as now meeting organizer and meeting participant are different.