cancel
Showing results for 
Search instead for 
Did you mean: 

Authorisation for changing items, activities, causes and tasks

Vasileios
Participant
0 Kudos

My client wants to have special authorisation on creating and changing items, causes, activities and tasks. Only certain users will be allowed to create or change these screens. Do you have any idea how to accomplish this?

View Entire Topic
jogeswararao_kavala
Active Contributor

Hello Vasilios,

Use the following code in the include ZXQQMU20 (user-exit QQMA0014). As already mentioned, I have assumed that the permitted UserIds are listed in a Ztable named ZTABLE.


DATA: LV_UNAME TYPE SY-UNAME.
SELECT SINGLE UNAME FROM ZTABLE INTO LV_UNAME WHERE UNAME = SY-UNAME.
IF LV_UNAME <> SY-UNAME.

   DATA: IQMFE TYPE TABLE OF VIQMFE.
   SELECT * FROM VIQMFE INTO TABLE IQMFE WHERE QMNUM = I_VIQMEL-QMNUM.

   IF IQMFE[] IS NOT INITIAL.
     DATA: LD_LINES TYPE I,
           LD_LINES1 TYPE I.
     DESCRIBE TABLE IQMFE LINES LD_LINES.
     DESCRIBE TABLE T_VIQMFE LINES LD_LINES1.

     IF LD_LINES <> LD_LINES1.
       MESSAGE: 'You are not authorized to enter Catalog related data'
       TYPE 'E' DISPLAY LIKE 'I'.
     ENDIF.
   ENDIF.
ENDIF.

What it does

1. This checks whether the current user is in the permitted list (ZTABLE).

2. If no this checks the number of previous entries in the object part & damage tab and the present number if there is difference it throws the following error message.


You need to add similar lines for other tabs too (VIQMUR, VIQMSM and VIQMMA) and refine the code by your ABAPer if needed..


Good luck

KJogeswaraRao