Block Notification Change and Display by Work Center
I have two work centers in my organization and both are using same notification type N1. At the same time, I need to restrict change and display activities in the notification by work center.
How do I block the access by work center in Notification?
Work Center ABCD can only change and display Notification type N1 with Work Center ABCD. If the Notification N1 belong to Work Center EFGH, Work Center ABCD is not able to change or display the Notification. Vice versa.
Jogeswara Rao K replied
Below is a tested solution, technical way.
Have a Z-table with UserId and the OBJID (you will get this form CRHD table against your Work center).
Have entries in the Z-table like this. (only one entry for one UserId)
Put the following code in the include ZXQQMU36 (user-exit QQMA0026).
DATA: V_UNAME TYPE SY-UNAME.
SELECT SINGLE UNAME FROM ZPM_OBJID INTO V_UNAME WHERE OBJID = I_VIQMEL-ARBPL.
IF V_UNAME <> SY-UNAME.
MESSAGE: 'You are not authorized for this Maint. Work Center.' TYPE 'E' DISPLAY LIKE 'I'.
Now the system throws the following error, when a user with a particular OBJID entry in the Z table tries to enter a Notification (IW22 / 23) with a different Maint. Work Center.