cancel
Showing results for 
Search instead for 
Did you mean: 

CRM_ORDER_SAVE activity update error

Former Member
0 Kudos

Hi, gurus.

I am creating and updating activities in CRM trought RFC using CRM_ORDER_MANTAINT and CRM_ORDER_SAVE and then doing COMMIT_WORK AND WAIT

Its working fine but some cases when calling an Update a short DUMP (DBSQL_DUPLICATE_KEY_ERROR) ocurred and the activity isn't updating.

I've searched in the forum and I cant find a solution.

Debugging I found that in program SAPMSSY4 its called the FM CRM_ACTIVITY_H_UPDATE_DU filled with internal table it_records_to_insert instead it_records_to_update

¿Is it ok that when Im updating it_records_to_insert were filled?

¿How can I solve this dump?

Thanks & best regards

Obed

Accepted Solutions (0)

Answers (3)

Answers (3)

dan_zhu2
Discoverer
0 Kudos

hi

I think if you check the dump information, you will see the error looks like only from sap standard program. But have you thought if there is any action profile is activated to create/udpate a task(or activity), depending on some condition like status, partner function and etc? At the end the standard function SAPLCRM_ACTIVITY_H_DU is triggered to insert duplicated record into DB table.

I faced similar issue, hopefully this could help!

BR

BGarcia
Active Contributor
0 Kudos

Hi Obed,

If it helps, you can try to put a breakpoint in CRM_ORDER_MAINTAIN and try to simulate what you're doing by code in GUI transaction CRMD_ORDER. I believe it will help you how you should fill the necessary internal tables in CRM_ORDER_MAINTAIN.

Kind regards,
Garcia

Former Member
0 Kudos

Thanks Garcia!

We have this error only in Production environment and we tried to simulate cases that comes with DUMP in a TEST environment and they work correctly but thanks for your help!

Regards!

thalesvb
Active Contributor
0 Kudos

Hello Obed,

There is something wrong in your call to CRM_ORDER_MAINTAIN when thoses cases happens. It's a bit difficult to pinpoint where the problem is only with this information, but I can think in two cases that may lead to this dump:

  1. The code are using global variables from RFC function group to call the MAINTAIN and are passing garbage to it (missing a CLEAR before filling the internal tables);
  2. Mode field mistakenly filled with Create constant.

Check if dump shows CRM_ORDER_MAINTAIN parameter values. If yes, verify if thoses cases above are happening.

It should have some execution pattern that triggers the dump and should help to debug. Maybe someone in your organization already detected this pattern.

Regards.

Former Member
0 Kudos

Thanks Thales!

I checked the code and I found that in MAINTAIN Activity table, mode field wasn't filled with any value meanwhile Header table indeed has the update value but I set both to update mode and DUMP still coming.

I debugged several cases and the MAINTAIN or SAVE_ORDER hasn't have garbage.

I know that information that I give its too weak but we don't have more information. It´s weird beacuse I haven’t found a pattern that leeds me a better solution.

Regards.