Want to hide NOPR / NOCO icons in PM/CS/QM Notifications?
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
Mr Jogeswara
this is the very useful document tanks for sharing this 🙂
Thank you Asjad ! 🙂
Regards
Very clear and instructional document!
Congratulations,
Regards.
Thank you RAUL ! 🙂
Regards
Mr.Jogeswara,
Good document
Thank you Kiran 🙂
Regards
Very Usefully info..
Linganna
Thank you Linganna 🙂
Regards
Thanks a lot, i was looking for this and found this discussion. It would really help me in making this icon disappear. We have a workflow and requirement was that user save the Notification and go to Business Workplace to select different options including putting the Notification in Process from there.
User were using the Flag directly from IW21/IW22 and bypassing the workflow, thus this exit will assist me a lot.
Thanks again
Glad to learn this post is of use to you Faisal khan
Hi Jogeswara,
I am having difficulty in finding the Include ZXQQMU35 in program SAPMIWO0. We are on EHP 7.0
Hi Faisal,
It is not from the program you mentioned. If you go through the post carefully, you will understand that this include is a part of user exit QQMA0024.
My apologies. I went through the doc again and found the include.
Thanks again for this document as user recently requested for this change and I jumped to my bookmarks for this article.
Please Rate this document.
Just did. One quick question, the said changes done on DEV and changes were successful. Then changes were taken to QAS. Checked include ZXQQMU35 on QAS and code was there. But when running IW21, the flag still appears.
Perhaps the CMOD work not taken to QAS.
CMOD is the project creating tcode where you will assign the user-exit in the Enhancement section. It is working in DEV because that part was done earlier and not trasported to QAS, So first identify the project in DEV and then check its availability in QAS. IF this is true, then you need to delete the assignment in DEV, create anew project and assign this exit and transport to QAS.
sir you are just awesome.
very good doc for pm consultants.
Thank you Sameer.
sir one thing here how to find out these types of user exits available in sap or not. i mean how to find out these kinds of user exits
Hello Sameer,
Your query is tempting me to tell a story. I'll try to be brief.
Basically I'm a Functional man (SAP customer). Under compulsions I entered into ABAP and user-exits. There are technical ways of finding a user-exit for our need, but it rarely helped me. Google and SCN posts always helped me to find one. Once you know one user-exit of one area, you can have a list of user-exits in that area through wildcard search such as QQMA* in SMOD which gives list of all user-exits in PM and QM area. Similarly IWO1* , IMRC*, IEQM*, ILOM*, ITOB* etc etc. Now the thing is though I visited the list where the present user-exit resides few hundred times I never looked into details of those other than my requirement. Some day I searched Google to help a SCN member where I came across this..
Now the conclusion
Because of the above reasons, to avoid reinventing the wheel, I maintain a practice to document such solutions immediately, so that these are not lost. Many posts of mine are similar.
Regards
KJogeswaraRao
thanks a lot sir.
Hello Rao Sir,
Always compulsions will lead to enter into new fields which will definitely help others like us and in this case your compulsion of entering into ABAP and user exits made other life very easy in achieving the goals. Thanks a lot.
With Regards,
PS R
🙂
🙂 😆
Thank you PS R, That's a good expression.
Regards
KJogeswaraRao
Thank you.. Useful document.
Hi,
great document.
Is it possible to only hide the button and not the function in the menu?
regards
Hi Jogeswara,
Very clear and useful document !!!
I had a requirement to hide approve/reject button on the basis of authorization check in IW21/IW22 and it worked ....
Thanks & Regards
Madhusmita