Hi Lucio,
Logic for activating the User Exit
The Measurement Reading (READG) is entered in the IK11 transaction , the user exit(IMRC0001) has to be activated under the following condition:
If the entered Measurement reading Value (IMRG-READG) > Upper Range Limit (IMPTT-MRMAX) or < Lower than lower range limit, The user exit (IMRC0001) has to be triggered / activated for the generation of PM Order in the background automatically with the information as “Condition Based Maintenance order created for Outside Values” and the measurement document(IK11) should be saved.
Else, if the value (IMRG-READG) is within the limit measurement document simply will be stored with the measurement reading (IMRG-READG)
Basic data for Order generation
Transaction to be linked is IW31
1) Order type=PMXX
2) Equipment Number(EQUNR)
Where equipment number (EQUNR) = MPOBJ – IE* Where Measuring Point Object (IMPTT- MPOBJ) = IE*EQUNR
3) Planning Plant(V_EQUI-IWERK) is taken from the corresponding Equipment(V_EQUI-EQUNR) where Equipment(EQUNR) = MPOBJ – IE*
4) Main Work Center object-id (V_EQUI-GEWRK) taken from the Corresponding Equipment(V_EQUI-EQUNR) Where Equipment(EQUNR) = MPOBJ – IE*
5) Main work center is found out by passing the object(GEWRK) to CRHD-ARBPL.
Best Regards
Kalyan