Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9129

Re: Automatic Priority Determination in Notification based on Equipment Object Type

$
0
0

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 Equipmentnumber 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


Viewing all articles
Browse latest Browse all 9129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>