Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
jogeswararao_kavala
Active Contributor

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

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

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.

AFTER the user-exit code.

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.

That's about icons in the Application toolbar of the Notification. Now let's see what happens when we  try this technique for an icon in the Notification Header, say Order create icon.

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Make Order Create icon Dysfunctional

  • Though we'll be able to hide Order Create icon in Notification through customizing tcode OIAL (field name XICON_ORDER), present user-exit method of making this icon dysfunctional comes to rescue when our requirement is beyond the Influencing factor of Notification type. 
  • So let's see this case. Same method and similar coding, but here we do not find this icon disappearing.  But it will make the icon dysfunctional by throwing this error when clicked upon.

     

         Here is the code. (The function code here is COAE).

           IF i_tq80-qmart = 'M2' AND sy-tcode = 'IW21' .

           APPEND 'COAE' TO t_ex_fcode.

          ENDIF.


  • In the coding above we want to have this deacticating effect under two conditions. 1. Notification type and the 2. The Tcode.  Such multiple conditions and condition other than Notification type is not possible in customizing OIAL.

So this can be applied to other similar icons in the Notification header and see what happens.

------------------------------------------------------------------------------------------------------------------------------------------------

Note:

Exits like this make the functional consultant life very easy by achieving things very easily which otherwise would consume lot of efforts and time through conventional methods.. 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

26 Comments
Labels in this area