Quantcast
Channel: Enterprise Asset Management (SAP EAM)
Viewing all articles
Browse latest Browse all 209

Do you want to hide NOPR / NOCO icons of PM/CS/QM Notifications?

$
0
0

Hello Friends,

One more useful tip in this blog. That's obviously about the subject line. Means what-if we want to hide application toolbar icons such as (Put in Process) and (Complete) in a Notification?

 

Some recent discussions and few in the past about this requirement show that in the very beginning members look towards OIAL (Field selection for Maintenance Notifications), where settings for flags and appear. But nothing happens when we set Hide radio-button here. This is because these icons here do not belong to Application toolbar of Notification Header, but these belong to Tasks Catalog tab. So what I want to say is Hiding these icons (Notification Put in Process / Complete) not possible through spro settings.

 

This blog is all about how we do it. SAP has given an exclusive user-exit for this purpose namely:

QQMA0024 - QM/PM/SM Deactivate function codes in CUA menu.


Let's see how we do it. Obviously we need to put some code in the Z-include provided in this exit namely ZXQQMU35. What is the code which makes an icon disappear. For this, first you need to know the Function code of an icon. How? Go to any IW21 or IW22 screen. Press the mouse key on the icon, hit F1 key and release mouse key.

 

When I did this for Put in Process flag I got this popup

Capture.JPG

And when I did this for Complete flag I got this:

2.JPG

 

Means the Function code for Put in Process icon is COWO and that of Complete icon is ARCH. These codes are required for us in coding in the above include.

 

Now the code to hide Put in Process icon.

APPEND 'COWO' TO t_ex_fcode.

 

This simple one line code in the include ZXQQMU35 hides the Green flag from all sorts of Notifications irrespective of any type etc. It is equal to OIAL setting without influencing criterion. Now let's see what if we want to give influencing effect. Suppose we want to hide this icon for M2 Notification,

then the code will be:

IF i_tq80-qmart = 'M2'.
   APPEND 'COWO' TO t_ex_fcode.
ENDIF.


Similarly, if we want to hide this icon in 'M2' Notifications only for few users, then we need to maintain their userIds in a Ztable (under field name say UNAME). In this case the sample code will be like:

IF i_tq80-qmart = 'M2'.
   DATA v_uname TYPE uname.
   CLEAR v_uname.
   SELECT SINGLE uname FROM ztable INTO v_uname WHERE uname = sy-uname.
   IF v_uname IS NOT INITIAL.
     APPEND 'COWO' TO t_ex_fcode.
   ENDIF.
ENDIF.

 

Similarly your ABAPer can extend this logic to very complex syntax using the Import structure I_VIQMEL given in the exit, making it possible for addressing all your conditions to hide an icon.

 

The Before and After pictures of the cases discussed above in Create Notification screen, are shown below


BEFORE the user-exit code.

untitled1.jpg

 

AFTER the user-exit code.

untitled2.jpg

 

Similarly when you use function code ARCH in place of COWO in the code the would disappear disabling the Notification Complete functionality. Though the title of this post mentions two widely used flags, other icons (like partner, Default values etc) also can be hidden in the same manner .

 

Though authorization objects are there to be used in Roles, there will be situations we will be needing this exit. For example, in my environment, we have 1000s of PM users where we maintained limited Roles and controlled many accesses through enhancements. There can be similar other situations too which demands this exit.

 

This post is equally applicable to PM/CS and QM notifications as given in the title. By now something might have stricken in your mind about the applicability of this function in your area. If so, show this to your ABAPer, it is a 2minute job for him/her.

 

 

Thank you and Regards

KJogeswaraRao


Viewing all articles
Browse latest Browse all 209

Trending Articles



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