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

Prevent Creation of Counters for Specific Measuring Point Category

$
0
0

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 impt-mptyp = 'C' and impt-indct = '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


Viewing all articles
Browse latest Browse all 209

Trending Articles