cancel
Showing results for 
Search instead for 
Did you mean: 

Exit IMRC0001 is used for condition based maintenance. Can any one would provide me the code to implement the logic?

former_member248088
Participant
0 Kudos

Hello Gurus,

I have been searching for this condition based maintenance since long time. I knew theoretically about condition based maintenance, but never knew it in practical. Can any one could provide me the logic so that i can get a KT from you guys. I would really appreciate for this help as am curious to know how technically it will work.

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Hari,

In the subject line you are asking for code, which members will not be in a position to share. In the query you have rightly asked for the logic, which should be the case, where you might get some help.

Few points in this regard:

  • In a very rare case, even if you get some code, you will not be able to apply it directly for your situation, without the ABAP coding knowledge.
  • When ABAP skills are there you do not need code, you only need logic.
  • According to me it is a very easy job for an expert ABAPer.
  • Only thing he needs to spend some time to correlate the fields of IK11 (Reading, Counter reading, UOM, upper range, lower range etc...) to those of IMRG_INS structure of the user-exit . (The code mainly uses this structure of the user-exit)
  • The above can be done by creating some documents and studying which fields of IMRG table are updating during this event.
  • Study different cases of IK11: viz., Simple reading, Counter reading and with valuation codes. (as per your requirement)

Part1 of the code is to trigger a Notification:

1. Through BDCDATA coding (Call transaction IW21)

2. Through FMs in sequence:

    BAPI_ALM_NOTIF_CREATE, 

    BAPI_ALM_NOTIF_SAVE and

    BAPI_TRANSACTION_COMMIT

Part2 of the code

If so required, you can opt for triggering e-mails alongwith Notification trigger, using relevant FM, (Email-ID can be stored in a z-table)

Go through some of my earlier replies on same subject

So the present post has full clues for an ABAPer to meet the requirement. And full details for a functional persons to write the FS. Many other threads are also available in SCN on the topic.

Best of luck

KJogeswaraRao


Also go through this link: http://www.wikiguga.com/topic/9e1e3402b92060a46793a2b37eeb3123

former_member248088
Participant
0 Kudos

Thank you Jogeshwara Rao Garu, for your valuable suggestions.

jogeswararao_kavala
Active Contributor
0 Kudos

My pleasure Hari Garu !

Balu483
Participant
0 Kudos

hi Jogeswara Rao garu,

I am Implemented Customer exit IMRC0001 to create Notification Document Creation while Maintenance document is saved in IK11 by using below BAPI's

BAPI_ALM_NOTIF_CREATE,

BAPI_ALM_NOTIF_SAVE and

BAPI_TRANSACTION_COMMIT

but I am facing dump error as "Invalid COMMIT WORK during COMMIT WORK or ROLLBACK WORK." because Customer exit IMRC0001 is triggered after commit work

if i am not using BAPI_TRANSACTION_COMMIT I am able to create notification document but when i tried to open the same in IW23 I am getting below error

kindly Help me please.

regards,

Balakrishna

Former Member
0 Kudos

I saw your posted comment. Please raise a new question and follow our rules of engagement: https://community.sap.com/resources/rules-of-engagement. I suggest using the "I have a similar question" option under the question to get started. Feel free to take our Q&A tutorial at: https://developers.sap.com/tutorials/community-qa.html. With these tips you'll be able to prepare questions that draw responses from our members.

Best,

Your SAP Community moderator

Answers (1)

Answers (1)

peter_atkin
Active Contributor
0 Kudos