02-23-2010 8:05 PM
HI Experts,
Now this one is a little tricky and bizarre for me.
I am using MVC in the CRM (4.0) box. I create something called an Incident which eventually creates an Activity in CRM.
I use BAPIs CRM_ORDER_MAINTAIN, CRM_ORDER_SAVE and BAPI_TRANSACTION_COMMIT.
The Incident gets created fine. No problems with that.
I close the incident using CRM_ORDER_MAINTAIN, CRM_ORDER_SAVE and BAPI_TRANSACTION_COMMIT.
The Inicident gets closed fine as well.
But, if the Incident is created and then worked upon and then closed in the same session, I get a dump,
SAPSQL_ARRAY_INSERT_DUPREC.
Note: If I log out and log in to close the Incident, the Incident gets closed.
Alternatively, if I create an Incident and then in the same session, close a different incident, it gets closed.
So problem is only when the same incident is created and then closed in the same session.
I debugged to find out the point where it creates the dump.
While closing the Incident, CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE gets executed fine. At BAPI_TRANSACTION_COMMIT I get the dump.
Note: I have tried using both the BAPI_TRANSACTION_COMMITs with and without wait = 'X', no luck. I have tried DEQUEUE_E_CRM_ORDER while creation of Incident, still no luck. I have even used SAP Note 1406201 without any help.
It would be great if any of you can bail me out.
Edited by: subhrangsu bagchi on Feb 23, 2010 9:05 PM
02-23-2010 8:11 PM
Have you looked for notes?
703953 is old, but seems to fit your problem.
Rob
02-24-2010 9:47 AM
Hi,
you try this functional module - CALL FUNCTION 'ENQUEUE_E_CRM_ORDER'.
before using the crm_order_save.
03-16-2010 9:42 AM
HI All,
Thanks for your help.. Unfortunately for me, none of these worked thought I tried them all.
Had to find a work around. Now when the person tries to close the Incident, Iit updates a status flag in custom table and a Batch Job later on changes status of all such Activities. This avoids dump in the BSP Application.
It is indeed a work around, not the best solution... But in the interest of time, had no better option.
But thanks all for your help.
Regards,
Subhrangsu