cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Orders - Contract Issue

0 Kudos

Hi Team,


The issue is that we are needing to set up contracts to make multiple releases to sales orders.  Any time that anyone is creating a sales order from a contract, or is in change mode in any of the sales orders created with reference to the contract, it ties up all of the sales orders connected to the contract.


For example, Contract # 0040009907 was set up in SAP, and 92 separate sales orders were created with reference to this contract number.  Each time that anyone was in any of those 92 sales orders – either creating a new order from the contract, making changes to a sales order, performing credit approval, releasing from GTS Block, releasing delivery lines, performing staging processes of the items on the order, or in any other way further processing the order – all 92 related sales orders are locked so that nobody can in any way further process any of the orders, thereby allowing only one order at a time to be worked on in any way.  This slows down the process incredibly, as we need to have multiple orders processed in parallel at any given time for each of the processes as described above.


Kindly provide the solution.


Kind Regards,

Viswanath

Accepted Solutions (1)

Accepted Solutions (1)

Lakshmipathi
Active Contributor
0 Kudos


all 92 related sales orders are locked so that nobody can in any way further process any of the orders



Either you have not spelled out correctly or I misunderstood your statement - not sure.  System will never lock any sale orders if any change is made in another sale order which has also been created with reference to the same contract.  Moreover, if you feel that system is taking too much time, then you need to check with your Security team as to which table system is consuming more time.  Based on this, you can arrive at a possible solution.



G. Lakshmipathi



0 Kudos

Hi Lakshmipathi,

I really appreciate your reply....

Please see the document flow...

SAP blocks the sales orders in the change mode or creating new with reference to same contract (only one sales order can open at the time). The requirement is all the orders should open in change mode at a time.

Kindly advise how to go about this.

Kind Regards,

Viswanath

VeselinaPeykova
Active Contributor
0 Kudos

Hello,

you displayed the document flow only for the contract with behaviour as standard.

In case you wish to understand why the other contract behaves differently I would need the information for your other contract.

Your copy control screenshots are confusing - they show copy from standard sales order to contract... normally it is the opposite.


Edit:

To help you understand better one part of the lock concept in SAP: If I have a standard order (OR) with TAN item category and decide to create a return order RE with reference to it, the OR order will not be locked during RE order processing, because it is not expected that RE order will update OR document. The same is valid if I have decided to create another OR document with reference to the first one.

Of course I will get locks for ATP for the second OR order because of the settings for the item that I use, but it is a shared lock. This means that another user can process a OR order with the same material at the same time.


You can try to investigate the differences in processing for both your contracts by yourself as well by observing the system behaviour in SM12 at each step.

It may be a good idea to ask a developer or a system administrator for assistance if the locks are not released after you go out of change mode (either by pressing back or by saving the transaction). Check also SM13 in case of problems.

0 Kudos

Hi Veselina Peykova,

Sorry I got confused...

Please see the copy controls config.

Item data

Kind Regards,

Viswanath

VeselinaPeykova
Active Contributor
0 Kudos

I tried to replicate your setup in my sandbox, but I still get the preceding document locked when I create standard sales order with reference to a contract.

Either your process flow for the second type of contract is completely different to what I am trying to do or you have some customer-specific devlopments that influence the standard lock logic.

Are you absolutely sure that the contract is not getting locked with these exact settings when you create or change sales orders with direct reference to it?

Please try to investigate what lock entries you get at each step of the contract processing (SM12).

In case you still cannot find the root cause for this behaviour, probably you will need to ask one of your developers for assistance.

0 Kudos

Thank you so much for your help...

Happy weekend.

Kind Regards,

Viswanath

0 Kudos

Hi Veselina Peykova,

Thank you so much for your help...

Finally I found the solution.

Changed field:

pos./neg. quantity field as ‘+’  instead of blank in the copy control Item.cat  to Order type.



Kind Regards,

Viswanath


VeselinaPeykova
Active Contributor
0 Kudos

I am glad that you resolved the issue.

This is a bit strange... the only way I can get the preceding documet not locked is if I do not update the document flow at all via copy control (update document flow = ' ') and this means to not set quantity update.

But from your screenshots you were updating the document flow for contract->order for the contract that was not locked during order creation. Probably you have some additional coding that triggers based on specific customizing settings.

And yes, you are right : it makes sense to have '+' for pos/neg. quantity in contract to order copying (QC->OR for KMN item category for example).

0 Kudos

Yes exactly...

Thanks & Regards,

Viswanath

Answers (2)

Answers (2)

VeselinaPeykova
Active Contributor

This is actually the standard SAP behaviour. Because the system assumes that when you are in change mode of a document you are going to perform some updates there - otherwise why would you be in change mode? The updates that you can perform in a sales order created with reference to a contract affect the statuses and the values of the preceding document. This is why the system establishes an exclusive lock not only of the current sales order, but also on the contract. See the screen from SM12 (I am only in VA02 for the sales order, which has number 13496. The contract is with number 40000208):

If somebody tries to access in change mode another sales order for the same contract, this means that the system should create an exclusive lock for the same contract and this is not possible with exclusive locks. This is a kind of protective mechanism to avoid inconsistencies. In some processes you do not need an exclusive lock - this is something that a system administrators or a developer is better suited to explain with technical details if you are interested in the concept.

If you are creating a delivery for the second sales order, then the system does not need to lock the contract (at least in my processes with a standard value contract) - it will lock the second sales order and the ATP tables for the materials until I save the outbound delivery:

There is not much that you can do to change the default system behaviour without causing inconsistencies in the system.

What I can suggest regarding order processing activities such as credit release - try to organize the credit release in a way that a one credit clerk is responsible for one credit account. In this case he will not have a problem with credit release, because he processes the orders within the same session sequentially.

Make sure that new orders with reference to contracts are created before the credit department starts credit release to avoid document locking.

Delivery processing/order locking: after credit release the clerks are not supposed to stay in change mode of the sales order, neither the employees responsible for backorder processing.

If you really get lock errors during delivery processing because somebody is in change mode of the contract, please ask a system administrator to check for terminated updates/obsolete lock entries/deadlocks. The administrator together with a developer and the responsible consultant can also investigate if it is possible to improve the overall performance.

If the problem persists even after scheduling your business activities according to the agreed cutover times, contact your consultant for advice, because there could be some special development for your company that causes additional locking.

0 Kudos

Thank you Veselina Peykova,

I really appreciate your reply with detailed information on how the lock object functionality works.

In my case, the lock is happening for the second sales order in change mode when the first sales order is also opened in change mode, both referenced to same contract type ZXXX.

We do have another contract type ZYYY where system is not locking for multiple orders opened at the same time, which were created with reference to contract type ZYYY.

The only difference I see in the config side is the item category of the sales order.

Is there any settings in the config side like consumption of contract which would activate the lock object functionality?

Please let me know if you need more information on this.

Kind Regards,

Viswanath

VeselinaPeykova
Active Contributor
0 Kudos

Since the contract types and item categories are not the same - probably the processes are very different.

Could you please share the information on the document flow, copy controls, item categories, document types involved (if possible - with screenshots)?

0 Kudos

Hi

Please see the below screen shots for more details for this issue.

SAP blocks the sales orders in the change mode (only one sales order can open at the time). The requirement is all the orders should open in change mode at a time.

Kindly advise how to go about this.

Document flow..

Contract Type

 

        

Contract Item Category

    

Sales order type

Sales order item category

Copy control Header data

Item data

Kind Regards,

Viswanath

0 Kudos

Hello, Kindly let me know if you found a solution to this. I need to implement the same.

Thanks,

Arjun.