cancel
Showing results for 
Search instead for 
Did you mean: 

While saving a document database conflict appears on workgroup clients

javed_ihsan
Active Participant
0 Kudos

Hi

I will expalin the sales process first.

A sales representative creates a sales transaction on his laptop and submits it for approval.

An approver logs on to a workgroup client to check/modify if required and then approve or reject the transaction.

Contrans is scheduled for every 5 minutes on the workgroup server. The issue raises in the following scenario:

1. Approver modifies the transaction and saves it.

2. Approvers does some more changes but have not saved it yet.

3. Contrans starts on the workgroup server.

4. Now If the approver tries to save the transaction he gets an error message

Error message "transaction XXX not fully confirmed by the server and can not be edited, please synchronise again to recieve pending confirmations"

5. Once the deal is confirmed by CRM server and the approver try to save the deal then the following error message with a popup appears

u201CDatabase conflict has occurredu201D

6. After clicking on the pop-up all the changes done after the first save are lost.

Any Solution/Suggestion/Proposal would be highly appreciated.

Thanks in advance.

Javed

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Javed

We have begun using workgroup and the first thing that I would recommend is to reduce the frequency of the conntrans.

We currently have set ours to every 15 minutes but have been advised that even this is really too frequent.

Don't know if that helps

Regards

James

ps. Let me know if you want to have any discussions about pros and cons of workgroup as we have been having some really bad performance challenges

javed_ihsan
Active Participant
0 Kudos

Hi James

Thanks for your reply and we are already thinking to increase the frequency of contrans but that will not solve the issue completely though it will reduce the conflict issues. We are thinking if there is anyway to send the document to CRM based on some parameters like by pressing approval button. Currently when any changes are done in a document and saved then that document is sent to CRM in the next schedule contrans but we want to stop that and send that document only when a specific button is pressed.

What do you think? is this possible to control sending of document to crm based on some parameter?

Regards

Javed

Former Member
0 Kudos

Hi,

your issue is not related to the workgroup scenario at all. This might happen on a "normal" MSA client too.

Actually you have 2 independent issues:

1) "waiting for pending CRM confirmation": After upload of an document from MSA to CRM (by hitting submit button) it is not editable as long as the confirmation is not yet sent back from CRM to MSA client. This is to avoid inconsistencies of documents which are also uploaded later on to R/3 or have some other post-processing in CRM like billing.

2) "BO xyz is locked by user abc": This might happen if the MSA user still "stands" on the document (even in display mode) which has been uploaded just before. In case the user starts conntrans OUTSIDE of MSA no refresh to the application is fired, and if the user edits/changes and saves the document then the time stamp check is failing (because it is not read from DB but from the loaded object which is older than the timestamp sent from CRM). If the user would run conntrans from the MSA MENUE a refresh would happen and the error wouldn't appear. But this doesn't apply to a workgroup scenario...

Finally I can't see any solution for your problem because after uploading the document from the MSA user to the workgroup server the way of course goes via the CRM server - and changes afterwards done by the approver too.

Regards,

Wolfhard

javed_ihsan
Active Participant
0 Kudos

Hi Wolfhard

Thanks for your reply.

First issue I can understand user/approver will wait until document is confirmed by the CRM.

But issue no 2 is quite critical.

Yes this issue is related to both workgroup and normal MSA clients but this issue is controllable on normal MSA clients as the contrans is in your control but on workgroup client since the contrans runs in background on the workgroup server so no control.

In our scenario approver will be editing/approving document on a workgroup client and contrans is running on the workgroup server. So if an approver saves a document after modification and then do some more changes but have not saved it yet. Now contrans on the workgroup server starts then here the issue lies as the system does not stop the approver from editing the document even the document is sent to CRM. Now whenever the approver saves the document then database conflict occurs and all changes done after the first save are lost.

What we were expecting is when contrans starts and document is sent to CRM then all the changes done on that document will be saved and then that document will be sent to CRM. Also that document will get locked for any other changes until that document is confirmed/returned from CRM.

Now we are looking for a solution where documents are not sent to CRM every time it is saved but documents should be sent to CRM based on certain events like when approve button is pressed.

Regards

Javed

Former Member
0 Kudos

Hi,

I am quite sure that it is not possible for conntrans to check respectively control not yet saved business objects opened in several applications on several machines.

The only thing what I could think of is to implement some code enhancement concerning the save type of the document as it is done in event beforesave in BO BOSALESDOCGEN:

ThisBO.SaveType = "S" means local save (no data put in out queue)

ThisBO.SaveType = "C" means communicated save (data is sent to CRM)

But I doubt that it is possible to avoid sending the changes after the document has already been sent (by the creator) to CRM.

And even if it would be possible to do so then there might be another problem: if the approver would do 5 changes and click in the end "your" new approve button then probably only the last change would be sent but not the 4 changes before because a gross replication is only possible if the document has not been sent before at all.

Regards,

Wolfhard

Former Member
0 Kudos

Javed -

I am not sure if you tried this, but in case you want to avoid the database conflict issue while trying to save the business object, you need to have some coding done to overcome the DB Conflict issue. As far as I remember, there are certain standard methods at a Business Object level, that you need to use before executing the actual save. These methods would actually be trying to restore the latest image of the Business Object from the database and would apply the changes done in the UI and then force the save on the database.. I don't have the code with me at this point of time, but if needed could try to dig it out for you..

Thanks & Regards,

Piyush

former_member192750
Active Contributor
0 Kudos

Hi Javed,

Like Wolfhard said, unfortunately there is no way to resolve the conflict issue as this is the way the solution works in offline. I wouldn't really want to implement Piyush's solution on a productive scenario - there are too many scenarios to consider about when the save is made and what Conntrans is currently doing with the object in the DB during it's scheduled sync run.

Maybe a way forward would just be give the user(approver in your case) a visual cue(you might even want to make the object read-only) that the object instance he/she is currently viewing is pending a confirmation. The TR_STATUS field in every MSA table holds the 'status' of the object in reference to it's sync status.

Regards,

Ankan