How to block the creation of a sales order ?

Answered

Comments

5 comments

  • Official comment
    Avatar
    Yaremi Miranda Lopez

    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:

    https://youtu.be/dsgZmz-XE7U

    Comment actions Permalink
  • Avatar
    John Slaats

    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

    Comment actions Permalink
  • Avatar
    mr

    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

     

     

    Comment actions Permalink
  • Avatar
    John Slaats

    What if you set Beforeaction to False?

    Comment actions Permalink
  • Avatar
    mr

    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

    Comment actions Permalink

Please sign in to leave a comment.