cancel
Showing results for 
Search instead for 
Did you mean: 

Restriction of equipment with notification

gaurav_solanki2
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

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.

gaurav_solanki2
Participant
0 Kudos

Hi sir,

Thanks for your fast reply, but when I use this in given user-exit QQMA0014 its not being trigger also I have checked with the debugger

gaurav_solanki2
Participant
0 Kudos

Sir,

Is it Functional module EXIT_SAPMIWO0_020 ?

Regards

gaurav

Answers (1)

Answers (1)

jogeswararao_kavala
Active Contributor
0 Kudos

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.

gaurav_solanki2
Participant
0 Kudos

Thank you so much sir.

Its done and thread has closed.

Regards

gaurav