on 01-06-2017 7:20 AM
Hi
We have multiple notification type and equipment category and we are using some notification type for specific equipment category. Now we want to restrict the equipment category with the notification type.
Like in notification type ( M2 ) user can only use (M) equipment category same as in notification type (Z2) user can not use any other equipment category except (A) equipment category.I cant restrict it at authorization level, because user can have the authorization of both notification type and equipment and I think there is no standard customization.
So how can I restrict it ,so that user will not be able to create M2 notification with A equipment category.
Thanks
Regards
Gaurav
Only way is to make use of user-exit QQMA0014.
Put the following code in the include ZXQQMU20 of the above exit. This restricts Notification type M2 to Equipment Category M while Notification creation.
IF sy-tcode = 'IW21' AND i_viqmel-qmart = 'M2'.
DATA: v_eqtyp TYPE eqtyp.
SELECT SINGLE eqtyp INTO v_eqtyp FROM equi WHERE equnr = i_viqmel-equnr.
IF v_eqtyp <> 'M'.
MESSAGE: 'M2 Notifications can only be created for Equipment Categories ''M''' TYPE 'E'.
ENDIF.
ENDIF.
You can use the same code for other combinations of Notification type and Equipment Categories by replacing these two values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Of course. It is the same Function Exit.
If it is not triggering means you haven't yet created a project through CMOD, where in Enhancement section you need to list the user-exit name. namely QQMA0014.
Means use tcode CMOD give a project name of your choice (like ZPMNOT) and inside click on Enhancement tab and give the user-exit name and Save.
Then in SMOD (QQMA0014) you go to the F/Exit you mentioned, Double click on the include name ZXQQMU20 (If it prompts to create, accept) and give the code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.