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?

Accepted Solutions (0)

Answers (3)

Answers (3)

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

jogeswararao_kavala
Active Contributor
0 Kudos

Your ABAPer will be able to do it with the help of a Z-table containing permitted userIds. And the code in QQMA0014 will check the present user is in this list or not and in case of no, then a code here will stop user saving the Notification. You may wait for ideas about Authorization objects in this area.

KJogeswaraRao

jogeswararao_kavala
Active Contributor
0 Kudos

You need to also specify which Tcodes you are speaking about? Means configuration Tcodes (QS41) or User tcodes (IW21/22)? IF you are talking about IW21/22 then this can be controlled through user-exit QQMA0014 and a Ztable (for UserIDs).

Vasileios
Participant
0 Kudos

It is in user tcodes (IW21/22).