Skip to Content

Automatic Priority Determination in Notification based on Equipment Object Type

Hi Experts,

Kindly advice which program or method can be used to automatically set the priority in Notification based on Equipment.

Requirement:-

1. I configured 10 Object Types in Equipment Category Z.

2. Each Object Types have its own SLA.

3. SLA is determine by Priority in Notification.

4. When user enter Equipment no. in Notification, priority will get populated automatically in Notification.

Thank you for your response and your precious time.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Dec 10, 2014 at 05:30 AM

    Hello Hafiz,


    The following is the tested code for your issue, using user-ext QQMA0014. As Rakesh mentioned the Priority value will be inputted at the time of Notification Save event. By your narration, you have Type of Technical Object vs Priority data with you. Also you mentioned these are 10 values. If the data is this small you can hard-code in the If .. elseif coding adding more elseif branches like given in the code below. If it is larger you can go for a Ztable.

    IF I_VIQMEL-EQUNR IS NOT INITIAL.
    DATA: L_EQART TYPE EQART.
    SELECT SINGLE EQART FROM V_EQUI INTO L_EQART WHERE EQUNR = I_VIQMEL-EQUNR.

    IF L_EQART = 'MOTOR'.
    E_VIQMEL-PRIOK = '3'.
    ELSEIF
    L_EQART = 'PUMP'.
    E_VIQMEL-PRIOK = '1'.
    ENDIF.

    ENDIF.

    According to this code, when the Equipment's Object type is 'PUMP', then priority '1' is inputted in Priority field and similarly if it is a 'MOTOR' priority '3' will be saved to Priority field. It is understood that the above code is to be put in the include ZXQQMU20 of the user-exit. This code works for both IW21 and IW22. Hope this info will be useful to you.

    Best of luck

    KJogeswaraRao

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 10, 2014 at 05:01 AM

    Hello

    Please use BADI --> NOTIF_EVENT_SAVE or User Exit--->QQMA0014

    It will trigger the Event at Save of Notification and look for Object Type in Equipment and accordingly set the Priority in Notification at time of Save.

    Br

    Rakesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 10, 2014 at 11:47 AM

    Hello Hafiz,

    In that case, the later part of the code (OTGRP) is not straight-forward. I have just worked on it for you, and prepared the complete code for your issue. (Code given below).

    This code:

    -First checks whether the Equipment number is available, then collects the Type of Technical Object information and then decides the Priority.

    -If Equipment number is not there then it looks into the Object part CodeGroup (OTGRP) and if it gets a value for this, it determines the Priority and puts it in the Notification.

    So following is the total code (Test yourself in Dev clients for its desirable working. Take help of your ABAPer for further improvisation needs, if any. Here is the code:

    IF I_VIQMEL-EQUNR IS NOT INITIAL.
       DATA: L_EQART TYPE EQART.
       SELECT SINGLE EQART FROM V_EQUI INTO L_EQART WHERE EQUNR = I_VIQMEL-EQUNR.
    
       IF L_EQART = 'MOTOR'.
         E_VIQMEL-PRIOK = '3'.
       ELSEIF
         L_EQART = 'GENERAL  '.
         E_VIQMEL-PRIOK = '1'.
       ENDIF.
    
    ELSE.
    
       FIELD-SYMBOLS: <FS_QMFE> TYPE ANY.
    
       DATA: BEGIN OF I_QMFE OCCURS 100.
               INCLUDE STRUCTURE VIQMFE .
       DATA:END OF I_QMFE.
    
       ASSIGN ('(SAPLIQS0)IVIQMFE[]') TO <FS_QMFE>.
       I_QMFE[] = <FS_QMFE>.
    
       LOOP AT I_QMFE.
         IF I_QMFE-OTGRP = 'MOTOR'.
           E_VIQMEL-PRIOK = '3'.
         ELSEIF
           I_QMFE-OTGRP = 'PUMP'.
           E_VIQMEL-PRIOK = '1'.
         ENDIF.
       ENDLOOP.
    ENDIF.
    
    
    

    Best of luck

    KJogeswaraRao

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.