Skip to Content
0

CRM_ORDER_SAVE activity update error

Apr 25 at 07:22 PM

66

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Thales Batista Apr 26 at 12:33 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

0
Bruno Garcia Apr 26 at 08:39 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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!

0