Skip to Content

Restriction of equipment with notification

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 06, 2017 at 08:17 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 07, 2017 at 04:08 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded