Skip to Content
Author's profile photo K Jogeswara Rao

Prevent Creation of Counters for Specific Measuring Point Category

Dear Friends,

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.

Objective

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 imptmptyp = ‘C’ and imptindct = ‘X’.

   MESSAGE: ‘Creating Measuring Point as Counter is prohibited’ type ‘E’.

ENDIF.

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.

err.JPG

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.

zpm_indct.JPG

So that’s all. Hope this piece of knowledge will be found of help to few members.


Author’s other posts

Regards

KJogeswaraRao

Assigned Tags

      4 Comments
      Comments are closed.
      Author's profile photo PS R
      PS R

      Hi Sir,

      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?

      Regards,

      PS R

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      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)

      Now

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

      • Now Temperature can never be a counter.
      • And not necessarily all the users are very well educated in SAP that they will not do the mistake of ticking the Counter checkbox .
      • So, in order to give a fool-proof system, arrangement like the present one is needed.

      Hope I could convey .

      Regards

      KJogeswaraRao

      Author's profile photo Pavan Kumar CS
      Pavan Kumar CS

      Hello,

      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.

      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao
      Blog Post Author

      Thank you Pavan

      Regards

      KJogeswaraRao