How to block the creation of a sales order ?
RespondidaHi,
I would like to block a Sales Order I'm creating on certain conditions : it contains at least one Item with QueryGroup28 = 'Y' and an UDF in the Logistics pane is empty. In this case, I would like to stop the Creation and to place the focus in the Logistics pane on the UDF.


This doesn't work. I've tried to change the values of the fields "BeforeAction", "ActionSuccess", "InnerEvent", "BubbleEvent" : I never reach the UF-615.
But if I change the Event and choose "Data Update", on an existing order the validation works, the order is not updated and the focus is set where I want it to.
So what should I do to make the validation work on a Sales Order creation ?
Thank you
Michel
-
Comentario oficial
Hello Michael,
For line validations please use a Universal Function type Lineloop, this is designed to validate line by line with documents created or not if a condition is met. The validation you created, check for lines in the order table but you need to consider that the document is not created yet and does not exist in the orders table, that's why it will never work.
For more information about LineLoops please check our free E-learning in our YouTube channel:
-
Hi Michel,
Not sure there is a record in RDR1 with a Data Add.
That's why it is working with a Data Update.I think you should use a lineloop.
Regards,
John -
Hi John
Thank you for your answer, indeed it works better with a LineLoop :



There's just one thing : after the creation, I have this message twice :

Any idea why ?
Michel
-
What if you set Beforeaction to False?
-
John,
Without changing anything, I tried again after I had closed and opened again SAP and I don't have the message anymore.
Thank you very much for your help, it's been very helpful.
Michel
Iniciar sesión para dejar un comentario.
Comentarios
5 comentarios