cancel
Showing results for 
Search instead for 
Did you mean: 

VA21 validation

Former Member
0 Kudos

Hi, i'd like to know if some standard things exists to make in sort that :

- set up commands quantities minimas

- allow some users to bypass this control

in other words :

a user lambda creates a command.

he wants a quantity inferior to the minima defined.

he receives a message saying that he needs the approval to do so

My only question is :

how can we block the command in the exact state it is before he gets the message, so that, after validation from other user, he can continue to create it.

Please help, points awarded !!!

Thanks a lot,

O.Leroux

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Here is what I would do:

1. Specify minimum order quantity in the Sales Org1 view of the material master.

2. Keep message V4 082 as a Warning message in transaction OVAH.

3. Maintain a table of users (like Lambda, Omega and definitely Mu - never liked Mu).

4. In a suitable user-exit in the sales document (*_DOCUMENT_SAVE, *_SAVE_PREPARE etc) check if Lambda has requested quantity less than that specified in Step 1.

=====>IF YES, put a block or a rejection reason on the line.

=====> IF NO, save the order.

To unblock/unreject the order, you can have Lambda's boss Alpha save the order using his id, or you can get real fancy and build a workflow to do approvals.

Approval Workflow.

1. Lambda blocks an order because he specified a quantity smaller than the minimum.

2. This order is saved in a blocked status and a workflow is triggered to Alpha for his approval.

3. The workflow task arrives in Alpha's inbox as an executable task with 3 push buttons - A- Approve, B - Don't approve and C - Cancel and retain the task in inbox.

4. Alpha can take any action - A, B or C.

If Alpha clicks on A, call BAPI_SALESORDER_CHANGE and make an immaterial/insignificant change. This BAPI is executed by user WF-BATCH which means that WF-BATCH should not be in the table with Lambda.

If Alpha clicks on B, terminate the workflow task.

If Alpha clicks on C, do nothing. This is standard workflow behaviour that requires no coding. The task remains with Alpha so that he can revisit it at a later time again.

Please don't award me points, just send me some money instead