Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8451

Re: How to define measuring point characteristics

$
0
0

Hello Daniel,

 

I have arrived at an answer which gives me complete satisfaction. The user exit to be used is NOTIMRC0001.  We should use user-exit IMRC0004.  The code also simplifies accordingly. So please put the following code in the include ZXMRCU04 of the exit IMRC0004.

DATA: l_readg TYPE imrg-readg,
           l_point TYPE imrg-point,
           l_prvrdg TYPE imrg-readg,
           l_diff TYPE imrg-readg.

     CLEAR: l_readg, l_point, l_prvrdg, l_diff."wains

     l_point = imrg_ins-point.
     l_readg = imrg_ins-readg * 1000.

     SELECT SINGLE readg FROM imrg INTO l_prvrdg WHERE point = imrg_ins-point.
     l_diff = l_readg - l_prvrdg.

     IF l_diff < 0.
       l_diff = - l_diff.
     ENDIF.

     IF l_point = '000000000500' AND l_diff > '20000'.
       MESSAGE: 'The difference between consecutive readings is more than ''20000''' TYPE 'E' DISPLAY LIKE 'I'.
     ENDIF.

 

All notes are same including the multiplication factor.

 

Now I'll tell the difference.

The earlier exit triggers at COMMIT WORK, which might cause a short dump.

This exit triggers the error exactly at the time of entering the Reading in the IK11 screen and allows you to correct the reading.

 

Last but not the least

I'd request you to shift the Correct answer to this post for conveying proper answer to the forum.  Shall wait for your response.



Best Regards

KJogeswaraRao


Viewing all articles
Browse latest Browse all 8451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>