Prevent Creation of Counters for Specific Measuring Point Category
Today I am having another piece of knowledge to preserve which is a non-routine solution worked-out while trying to help one amongst us. Let’s see the What and Hows about it.
Our friend has configured a Measuring Point Category ‘C’. He wants the system should allow users to Create (IK01) only Measuring Points but not Counters.
What is the issue?
Functionally this looks very much possible through the Customizing tcode OIMRC where we can hide fields using MeasPointCategory as the Influencing field. So he selected Hide radio-button for field IMPT-INDCT (MeasPoint is counter) for the influencing field value as category ‘C’ .
You might have understood that the whole exercise is to hide the Counter checkbox from IK01 initial screen.
The result (The issue).
The Checkbox disappears only after we fill the MPT category (C) and click on the refresh button in the application toolbar of IK01 initial screen. Means user is free to create the Counter on any Mpt category inspite of efforts to hide the Counter checkbox through customizing.
So how do we achieve this?
First I explored the available IMRC user-exits but none was found fitting into this need. Then I though to explore the Implicit Enhancement Point in the IK01 program namely SAPLIMR0. After few minutes of working, I could succeed.
Here is the Solution
I created an Enhancement named ZPM_INDCT at Line3 in the include LIMR0F18 (of the above program i.e., SAPLIMR0).. Then I put a simple code shown below and activated the enhancement.
IF impt–mptyp = ‘C’ and impt–indct = ‘X’.
MESSAGE: ‘Creating Measuring Point as Counter is prohibited’ type ‘E’.
With this code in place, when user tries to Enter inside the IK01 Create screen with Tick in the Counter checkbox and with vale ‘C’ in the MeasPtCategory field, he gets an error pop-up shown below and he will have to exit, rerun IK01 and correct himself.
It is a very simple job for a beginner of ABAP. . For the convenience of implementation I am giving herewith the implementation screen of the Include.
So that’s all. Hope this piece of knowledge will be found of help to few members.
There are no words to express on your fast & quick response's on any type of post's. It's really great to have an SCN topic leader like you sir. Here, one thing need to understand why there is a need to create only MPt. and not counter?
Thank you PS R for your motivating words as always. 🙂
Such solutions are just technically oriented and the technical person does not ask the need because the opposite side (functional man) is the very reason for his existence (a customer relationship)
If I try to answer your query as a Functional man, then one of the reasons can be something like this:
Suppose a company orders all its zones to create MPts of ctgy C to measure ONLY temperature of Drive and Driven ends of all Rotating machines..
Hope I could convey .
I would like to thank the efforts of Jogeswara sir's effort to solve any query in such a short time. He took only few hours to solve my query. And I appreciate his efforts to contributing to SCN community.
My issue was to create measuring point only because, I was using that measuring point category to be used for Condition Based Maintenance. As the name implies in CBM only condition of the system is measured at that particular point of time. For example current/voltage of a motor, temperature of cold storage, allowed vibration level for an equipment. Condition remains with acceptable level majority of the time. But in rare case scenario condition may go out of specified level. In that particular time user needs information(Might be a notification or mail). In this scenario counters are not needed. Because we have counter based plans to trigger a maintenance object. So I wanted to restrict CBM measuring point category to be created for measuring points only.
Thank you Pavan