on 03-07-2010 10:38 AM
Hi Experts,
Can anybody tell me, how would I create an auto creation of Maintenance Notification by entering measurement document reading?
What are the back end and front end settings to be required for this?
Regards,
Hi,
You will have to use the User exit IMRC0001 to implement this functionality whenever the Readings have a particular value.
For ex: You could maintain the Upper and lower limit for each measurement point and whenever the measurement reading falls outside this range you could use this user exit to generate a notification and attach the same to the measurement document using this user exit.
Regards
Narasimhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for quick reply, The question I raised is purely a standard functionality of condition based preventive maintenance. Try to understand, I can't propose user exit to my client for this basic functionality. Inorder to see the proof, you can run IK17, that is a standard report of measurement documents, there are two columns available for notification and order as well.
Regards,
Siemens-PM
Hi,
That is the [standard functionality|http://help.sap.com/erp2005_ehp_04/helpdata/EN/a7/fa4c988f6611d29e8a0000e8323350/frameset.htm] provided by SAP for condition based maintenance functionality. The condition based maintenance functionality is implemented using this user exit only.
There is no out-of- the- box configuration functionality to trigger a notification on save of the measurement document,Other than through this user exit.
Regards
Narasimhan
Dear Siemens PM,
Please ensure you search this forum before creating any new posts as this topic has been discussed many times before.
The following link would help:
http://help.sap.com/erp2005_ehp_03/helpdata/EN/1b/0804a6901d11d29e8b0000e8323350/frameset.htm
If still not satisfied, You could Call up Documentation for the Customer Exit IMRC0001
Choose Tools ® ABAP Workbench.
Then choose Utilities ® Enhancements ® Project management.
Enter IMRC0001 and select Documentation as the object component.
Choose Display and the online documentation is displayed.
Calling up Documentation for the Function Module EXIT_SAPLIMR0_001
Choose Tools ® ABAP Workbench.
Then choose Development ® Function Builder.
Enter EXIT_SAPLIMR0_001 and select Interface as the object component.
Choose Display.
Choose Goto ® Further options ® Documentation ® Function module doc. and the online documentation is displayed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If still not satisfied, the following code for function exit could help:
IMPORT impt_cnt FROM MEMORY ID 'Zimptx'.
IMPORT imrg_cnt FROM MEMORY ID 'Zimrgx'.
IMPORT upr FROM MEMORY ID 'Zuprx'.
IMPORT lwr FROM MEMORY ID 'Zlwrx'.
*break arehman.
l_out_of_range = ''.
IF NOT ( impt_cnt-mrmaxi IS INITIAL ) .
CALL FUNCTION 'CHECK_EQUALITY_13DECS'
EXPORTING
iv_float_1 = imrg_cnt-readg
iv_float_2 = impt_cnt-mrmax
EXCEPTIONS
float_1_eq_float_2 = 1
float_1_gt_float_2 = 2
float_1_lt_float_2 = 3.
IF sy-subrc = 2.
l_out_of_range = 'X'.
set Code Group and Coding for Notification
MOVE 'CONDINDI' TO my_l_viqmel-QMGRP .
MOVE '0001' TO my_l_viqmel-QMCOD .
ENDIF.
ENDIF. " endif max is not initial
IF NOT ( impt_cnt-mrmini IS INITIAL ) .
CALL FUNCTION 'CHECK_EQUALITY_13DECS'
EXPORTING
iv_float_1 = imrg_cnt-readg
iv_float_2 = impt_cnt-mrmin
EXCEPTIONS
float_1_eq_float_2 = 1
float_1_gt_float_2 = 2
float_1_lt_float_2 = 3.
IF sy-subrc = 3.
l_out_of_range = 'X'.
set Code Group and Coding for Notification
MOVE 'CONDINDI' TO my_l_viqmel-QMGRP .
MOVE '0002' TO my_l_viqmel-QMCOD .
ENDIF.
ENDIF. "endif min is not initial
IF l_out_of_range = 'X'. " If value is out of range then Generate Notification.
LOOP AT imrg_ins.
where woobj is initial and
not ( vlcod is initial ) and
vlcod+3(1) ne '0'.
Sample condition: ...............
New measurement document is not
assigned to a notification and a
valuation code has been given and
the last digit of the Code is not
'0'. -> Create malfunction report
Check notification type ........
IF l_qmart NE l_tq80-qmart.
SELECT SINGLE * INTO l_tq80 FROM tq80
WHERE qmart = l_qmart.
IF sy-subrc NE 0.
MESSAGE e421(im) WITH l_qmart.
ENDIF.
ENDIF.
IF NOT ( l_priok IS INITIAL ).
Priority given --> check! ......
IF l_priok NE l_t356-priok.
SELECT SINGLE * INTO l_t356 FROM t356
WHERE artpr = l_tq80-artpr
AND priok = l_priok.
IF sy-subrc NE 0.
MESSAGE e001(i0) WITH 'T356' l_tq80-artpr l_priok space.
ENDIF.
ENDIF.
ENDIF.
Measurement point changed in the
same transaction? ...............
LOOP AT impt_upd
WHERE point = imrg_ins-point.
MOVE impt_upd TO l_impt.
EXIT.
ENDLOOP.
*
IF sy-subrc NE 0.
No -> Get from buffer or DB. ....
CALL FUNCTION 'MEASUREM_POINT_READ'
EXPORTING
point = imrg_ins-point
IMPORTING
impt_wa = l_impt
EXCEPTIONS
OTHERS = 1.
ENDIF.
CHECK sy-subrc = 0 AND
l_impt-point = imrg_ins-point AND
NOT ( l_impt-mpobj IS INITIAL ).
Get the transparent key of the ..
measuring point's object. .......
CALL FUNCTION 'OBJECT_IDENTIFICATION_GET'
EXPORTING
objnr = l_impt-mpobj
IMPORTING
e_key = l_mpobi
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc = 0.
CASE l_impt-mpobj(2).
WHEN 'IE'.
MOVE l_mpobi TO l_viqmel-equnr.
MOVE l_mpobi TO my_l_viqmel-equnr.
WHEN 'IF'.
MOVE l_mpobi TO l_viqmel-tplnr.
MOVE l_mpobi TO my_l_viqmel-tplnr.
WHEN OTHERS.
Measuring point's object is not .
allowed as reference object of a
a notification. -> Next loop! ...
CONTINUE.
ENDCASE.
Fill data to notification header
MOVE: l_qmart TO l_viqmel-qmart,
l_t356-priok TO l_viqmel-priok,
imrg_ins-idate TO l_viqmel-ausvn,
imrg_ins-itime TO l_viqmel-auztv,
imrg_ins-readr TO l_viqmel-qmnam,
impt_old-locas TO l_viqmel-bautl,
imrg_ins-mdtxt TO l_viqmel-qmtxt.
MOVE: l_qmart TO my_l_viqmel-qmart,
l_t356-priok TO my_l_viqmel-priok,
imrg_ins-idate TO my_l_viqmel-ausvn,
imrg_ins-itime TO my_l_viqmel-auztv,
imrg_ins-readr TO my_l_viqmel-qmnam,
impt_old-locas TO my_l_viqmel-bautl,
imrg_ins-mdtxt TO my_l_viqmel-qmtxt.
IF imrg_ins-mdtxt IS INITIAL AND
NOT ( imrg_ins-vlcod IS INITIAL ).
Measurement document has no text
to load up to notification. .....
--> Take text of valuation code!
CALL FUNCTION 'QPK1_CODE_TEXT'
EXPORTING
i_katalogart = imrg_ins-codct
i_codegruppe = imrg_ins-codgr
i_code = imrg_ins-vlcod
IMPORTING
e_text = l_viqmel-qmtxt
EXCEPTIONS
OTHERS = 1.
ENDIF.
MOVE l_viqmel-qmtxt TO my_l_viqmel-qmtxt.
EXPORT i_bapi2080_nothdri TO MEMORY ID 'ZMAR'.
EXPORT my_l_viqmel TO MEMORY ID 'ZQMEL'.
Call external Program to Generate Notification
SUBMIT zpm_not_gen AND RETURN.
break arehman.
IF sy-subrc = 0.
Assign the measurement document .
to the notification. ............
MOVE-CORRESPONDING imrg_ins TO imrg_ins_usr.
MOVE l_t_viqmel-objnr TO imrg_ins_usr-woobj.
APPEND imrg_ins_usr.
ENDIF.
ENDLOOP.
ENDIF. "l_out_of_range = 'X'.
User | Count |
---|---|
105 | |
14 | |
10 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.