How to edit/post notification linked to Work order in Work Manager application ?
Here is the easiest and quicker way of implementing the changes.
We know that Notification linked to Work Order are display at Work Order level. Any notification populated under work order collections are display only – That’s what hyperlink for notification on work order tab points to. Idea is to populate all notifications into notification collection under main object which are displayed in notification tab based on assignment type configuration for notification type . By default notifications on notification tab are enabled for edit and changes are posted to SAP. So if we populate all the notifications which are assigned to user and notification linked to Workorder which might have different work center into Notifications collections under main object, we can reuse existing OOB functionality for Notification. The only change you need to make is to change reference of hyperlink from notification on work order to reference Notification collection on main object on Agentry side rest will be SAP changes.
SAP Changes :-
- Change Work Order Class Handler “/SYCLO/CL_PM_WORKORDER2_DO” method me->get_work_order_notification in GET method.
a. Comment out code to return notifications details ( items/causes/activities) in work order GET method. To improve performance and avoid redudant data.
b. Either create Z table to store Notifications linked to Work order with user guid as a key and refresh it during every fetch or retrieve work order
download to Mobile users from /SYCLO/MDW02 table from notification fetch directly and look up for notifications linked to work order.
BAPI Wrapper :- /SYCLO/PM_DOWORKORDER2_GET
ET_NOTIF_HEADER – Return only header data
ET_NOTIF_ITEM
ET_NOTIF_ITEM_CAUSE
ET_NOTIF_TASK
ET_NOTIF_ACTIVITY
2. Modify Notification class handler “/SYCLO/CL_PM_NOTIFICATION2_DO” method :- get_assignment, once all assigned notification are retrieved and before main SQL statement is executed. Introduce logic to retrieve notification linked to work order from Z table or /SYCLO/MDW02 – Populate main internal table for notification. Once main internal table is populated existing logic will populate notification details.
Agentry Changes:-
- Change reference of hyperlink for notification on work order to point to notification collections.
Once notification are populated under main objects. Any changes made to notifications are updated in SAP.
Hello Manju,
Can you help point how exactly to change reference of hyperlink from notif on WO to notif on Main object?
"The only change you need to make is to change reference of hyperlink from notification on work order to reference Notification collection on main object on Agentry side rest will be SAP changes."
When i try to change it in editor, i get an error :>main object> notification collection is not a valid selection.