Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Creating notification using user-exit IMRC0001

Former Member
0 Likes
3,355

Hi ,

I am creating notification using user-exit IMRC0001 (Exit before update (after COMMIT WORK)) invoked through IK11. Notification is created using FM IQS1_POST_NOTIFICATION with Exp para I_commit = ' ' , which creates notification ( entry exist in table QMEL) but when i check this in IW23 it gives me message "Status object does not exits" . Here it actully checks entry in the JSTO table which does not exists.

The above problem is due to non "COmmit work" statement, and FM OBJECT_NUMBER_INSERT_QM is not called which creates status records in the status tables.

Explicitly calling Commit Work or giving export para i_commit in FM IQS1_POST_NOTIFICATION give dump.

Any help on is highly appreciable.

Thanks

Karan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,565

Okay, after talking with SAP, here is the fix.

This will hopefully save anyone else from any headaches.

The sample code provided in user exit IMRC0001 is correct.

You just need to add the following function call to the end:

STATUS_UPDATE_TASK_TRIGGER

This fixes the problem Karan spoke about, with the status record not being created in the JSTO table. The notification is now valid and accessible.

Hi ,

I am creating notification using user-exit IMRC0001 (Exit before update (after COMMIT WORK)) invoked through IK11. Notification is created using FM IQS1_POST_NOTIFICATION with Exp para I_commit = ' ' , which creates notification ( entry exist in table QMEL) but when i check this in IW23 it gives me message "Status object does not exits" . Here it actully checks entry in the JSTO table which does not exists.

The above problem is due to non "COmmit work" statement, and FM OBJECT_NUMBER_INSERT_QM is not called which creates status records in the status tables.

Explicitly calling Commit Work or giving export para i_commit in FM IQS1_POST_NOTIFICATION give dump.

Any help on is highly appreciable.

Thanks

Karan

5 REPLIES 5
Read only

suresh_datti
Active Contributor
0 Likes
1,565

You can try the following..

Create a wrapper cutom function module around IQS1_POST_NOTIFICATION & put the COMMIT WORK in there.Call this custom fucntion module as a BACKGROUND TASK from User exit. This would eliminate the COMMIT WORK conflict & avoid the short dump.

~Suresh

Read only

0 Likes
1,565

also, make sure that your custom wrapper is defined as a RFC.

<u>another option:</u>

create an custom event (sm62).

write a stand alone report-program to create notification with commit.

then schedule a background job for your program triggered by your event.

in your exit raise the custom event (bp_event_raise)

Read only

Former Member
0 Likes
1,565

Were you able to resolve your error by creating the custom wrapper?

If you did, would you mind sharing the details. Thanks.

Read only

Former Member
0 Likes
1,566

Okay, after talking with SAP, here is the fix.

This will hopefully save anyone else from any headaches.

The sample code provided in user exit IMRC0001 is correct.

You just need to add the following function call to the end:

STATUS_UPDATE_TASK_TRIGGER

This fixes the problem Karan spoke about, with the status record not being created in the JSTO table. The notification is now valid and accessible.

Read only

Former Member
0 Likes
1,565

Hi,

Shame that I saw this post too late. I have also solved the same problem, and I am sure I would have solved it faster had I saw this earlier!

I had the same problem when trying to implement exit IMRC0001.

We started with our own coding until facing this object status problem with the notifications. Then I found SAP Note 119742 and we migrated to the sample coding embedded at this message, which had some useful consistencies. However, this sample coding still had the same problem, so I opened a message at the Service and we were instructed to complete the coding with the following line:

' CALL FUNCTION 'STATUS_UPDATE_TASK_TRIGGER'.

This was enough to correct the problem, instead of trying to correct all that Commit Work problem or trying to complete the JSTO info.

Of course that we made some changes on the sample coding, but the user decided to keep use of the Valuation Code for the measurement document (field CODGR + field VLCOD). And this lead us to another problem, an ABAP short dump error!

I had created a new code at a 'D' type catalog and prepared it for the measuring point type in the Customizing. But when you try to associate a new code to the notification (no flag "used" shown on QS42, field QPCD-VERWENDUNG), it also gives us an error. After searching for SAP Notes, I found note 370035 exactly about this problem, but its correction instructions were all implemented (old Notes). Then the problem was solved with the use of an old code, until the new code was flagged.