Skip to Content
0
Former Member
Feb 23, 2010 at 08:05 PM

CRM Order Save when used twice leads to Dump SAPSQL_ARRAY_INSERT_DUPREC

139 Views

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