cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Block for order whose quantity exceeds % of available stock on hand

Former Member
0 Kudos

Hello gurus,

I am wondering if there is standard SAP functionality that could enable the following scenario:

For a material in material group XYZ, if a sales order is entered that exceeds 50% of stock on hand, a delivery block is placed on the order. If a sales order is entered that is under 50% of stock on hand, no delivery block is placed on the order.

The number 50% is arbitrary and would be specified based on the material group. As well, this can be based on the material. I'm hoping there is configuration out there that would block the delivery creation if an item on the sales order exceeded a pre-defined % of available, unrestricted stock in the plant. Any help would be greatly appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Andy

There is no standard config/functionality available for this. The only standard functionality available is to create Delivery blocks on creation for a document type but it does not perform any checks before doing so. There is a functionality available for Scheduling agreements to apply delivery block when a tolerance limit for schedule changes is exceeded, but I am not sure if you can make it work for simple sales orders.

You have to go with user exists:

MV45AFZZ- USEREXIT_MOVE_FIELD_TO_VBAK (to apply at header level) or USEREXIT_MOVE_FIELD_TO_VBEP (to apply at schedule line level).

Hope this helps.

Former Member
0 Kudos

Hi

Thanks .. But one thing - when ever i run the va01 or va02-- in the regulatory list - NOTICHECK is coming first - REACH Relevant  Checks are not picking while calling EHS

please help me where can i look for this

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Andy,

Let me summarise ur question - You have Material - A, B & C all of them belonging to a particular Mat. Group lets say - 444. Lets think if the stock of all the Materials - A, B & C is 100 CS's.

When a Sales order is created for Material - A for Quantity of 60 CS - You want a Delivery block.

If my understanding is yes, I think the requirement is too complex, but achiviable.

Because -

- If this can be achived its possible with only User exits, but the requirment is linked with Availability,

- If we want to implement this in the Save user exit, the code has to go check the stock in availability and if the conditions are met needs to block the delivery,

- you need to consider the stock situations as the re-scheduling will also be happening in the background,

- Wht would happen if there are more than 1 material entered and both are different Material grounps. [Need to consider this scenario as well]

Instead of Delivery block - You can implement the changes to Reject the line if the % crosses. That is reason for rejection. As this is more specific to line item.

Create a Z* table and update it with the Material groups that you are planning to use. And give the %.

Implement the code changes in the Save user exit in MV45AFZZ to check this table for each material group and validate it and then compare the Ordered Quantity with the available stock of that material. Not sure though from where you want to get the stock figures.

I tried, but this might be a start. All the best.

Thank you,

Chaitu...

Former Member
0 Kudos

Thank you for the very detailed and helpful response. Yes, I believe custom is the way to go for this and the users will need to specify the specific percentage of stock an order can take for each material or material group. Thanks again for the help.

Former Member
0 Kudos

Chaitu,

After thinking about this a bit more, to refine my logic I have come to this scenario:

I have Materials - A, B, and C and they all belong to material group 444. For material group 444, I set up logic that says if an order for any material within this group consumes more than 50% of available stock for that particular material, I place a block on that line item.

For a specific order, this could be the behavior:

Material A - ordered qty 50 - available stock is 100 - place rejection reason on line item

Material B - ordered qty 40 - available stock is 100 - do not reject

Material C - ordered qty 80 - available stock is 100 - place rejection reason on line item

Additionally, the purpose of placing this rejection reason is for the Customer Service group to review the order. This could have an effect on the rescheduling of the order as well as other unknowns. Once CS reviews and if they approve, they simply remove the rejection reason.

Edited by: Andy Slania on Sep 8, 2010 10:53 PM

Former Member
0 Kudos

I think of other option that you can use i.e. if you know the normal stock levels (which i dont think u could now). Maintain that in a table. The Z* table will have Material group with the normal stock levels maitained for that group of mateirals. And can maintained the tolerance %. This would be easy but needs the warehouse guys and everyones concenses on stock limits.

This option is easier in the sense as no coding is neaded to check the stock status. [which is highly fluctuating]

Hope this helps.

Thank you,

Chaitu...