Skip to Content

Block delivery creation based on Sales Contract status

Feb 21 at 01:15 AM


avatar image


Our workflow is Contract > Sales Order > Outbound Delivery. We have a user status profile assigned to the contract and the business requirement is to allow the creation of sales orders referencing a contract regardless of contract status.

In business terms the contract is sent to the customer for signing and when the signed contract is received the status of the contract is updated to "SIGN - Contract Signed / PO Received".

The creation of a delivery referencing the sales order > contract must be blocked until the contract status is "SIGN - Contract Signed / PO Received".

Is this possible in SAP?



10 |10000 characters needed characters left characters exceeded

Why would the business create orders referencing a contract that has not been signed yet?

If signing takes several days or more and if these orders are configured to reserve stocks, increase the credit exposure or trigger production this is probably unwise if you cannot guarantee on 100% that the customer will sign at all and that the final contract will have the same terms at the point of signing.

Where I live, a contract cannot be binding if it has not been accepted and signed by both parties and they should have identical signed copies of the agreement. What you describe may be considered illegal, so if I were in your position, I would discuss the business requirement with the legal consultant and the business process expert before starting to work on the change request.


Just like Veselina, I'd question the business requirement. It only takes a moment to create a sales order. Why drive demand for your purchasing and/or manufacturing for something that has not been even formally ordered yet? Seems like a significant business risk.



Thanks for the comments. We are using sales orders as a forward planning mechanism to alert warehouses of upcoming demand. The warehouses complain that if we wait until the contract is signed they don't get enough warning of what's coming up in future. Our business process is that the warehouses are not authorised to pick and pack product until the delivery has been created so there is no risk of product being delivered before the contract is signed. We have implemented the credit horizon so sales orders beyond the horizon don't consume credit limit.

Via reporting the warehouses are informed of whether or not the contract has been signed so they know the probability of the transaction eventuating.


If the customer ordered some products but still has not signed the contract - you could create an order that does not reference it.

If the customer signs the contract later - the next sales orders will be referencing it.

If I am a customer who has placed an order just before signing a contract: if I want to benefit from the contract conditions and if don't mind waiting, I would contact sales myself to cancel my old order and place a new one.


How exactly does the "forward planning mechanism" work in your system? If you don't physically need sales orders to drive purchase requisitions, for example, until the contract is signed you could just provide a report to the warehouse to tell them "hey, these are the sales orders already placed and here is a contract that is not signed yet but might be coming your way". Because all sales documents are even stored in the same tables it's very easy to produce such reports.


We've decided to go with the user exit as suggested by Phanikumar. The coding appears to be quite simple. The forward planning mechanism involves a report using sales orders to show forward customer demand and creation of deliveries to authorize pick and pack. We'll use the user exit to prevent users from creating a delivery before the contract is signed. This way we can continue to have a simple process where every sales order references a contract and we don't have to re-enter sales orders. Thanks for your suggestions and comments, much appreciated.

* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Phanikumar Valiveti Feb 21 at 06:28 AM

Two solutions-either you can again put status profile creations at SO level (SO Blocked/SO accepted) or

You can try with an exit at delivery level with exit FORM USEREXIT_READ_DOCUMENT at MV50AFZ1 by validating the Doc.flow Table VBFA and Contract status(VBUK)..Pl discuss with your abaper on this.


10 |10000 characters needed characters left characters exceeded
John Marelich Feb 22 at 06:43 AM

Hi Phanikumar,

I was able to successfully create a TEST User status profile and assigned it to our Sales Order document type OR via tcode BS02.

I followed the following steps

Step1: Create Status Profile-tcode: BS02

click on create ...give

Status profile name - ZTEST

Text block delivery_billing

language : En

select ZTEST..and click on detail to come to new screen

Give as follows

status no status text Lowest Highest

10 B1 Block Delivery 10 20

20 B2 Block Billing 20 30

select status no 10 defined above and click on detail icon, in new screen click on create icon..and for business transaction say "create delivery" select radio option "forbidden"....repeat same for status no 20 but say with business transaction "create billing document" and option "forbidden. I then assigned status profile ZTEST to Sales Document type OR via transaction VOV8.

User Status Profile ZTEST works fine and blocks deliveries when the status is set to 10 in the sales order and blocks billing documents when the status is set to 20 in the sales order.

When I change status profile ZTEST as follows:

10 B1 Block Sales Order 10 20

20 B2 Block Delivery 20 30

and assign ZTEST to Sales Order document type CQ - Quantity Contract it blocks the creation of Sales Orders when Contract status = B1 but DOES NOT BLOCK Deliveries when the contract status is B2. Why does this not work for Contract document type CQ but it works for Sales Order document type OR?



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

Please use "Comment on this answer" button to reply to an answer. Otherwise the person you're replying to is not notified. Also this is misleading to others since it's not really an answer to the question above.

Thank you.


Why does this not work for Contract document type CQ but it works for Sales Order document type OR?

A contract will never have a delivery document as an immediate subsequent document-So technically-there was no direct relation to stop a delivery for a contract(Infact -there was a middle document IE SO will tell to create delivery or not..)

You used Status Profile at SO will be suffice your requirement-I feel so(Also please check all the users creating the SO are able to release this SO or not-Is it acceptable to your client)

I doubt some user group creating SO and some other user Group releasing this SO is not supported by Standard SAP system with SO level status profiles(Dear members Please correct me here if said wrong..)

Else try with the Enhancement said in earlier post..


John Marelich Feb 23 at 01:07 AM

Does anyone have an idea on this?

10 |10000 characters needed characters left characters exceeded