Hello Jose,
Please follow this document, I see a solution here: Specify conditions for Components in PM Order (User Exit IWO10009) in Case2. You can easily derive your exact solution out of this.
One more related link: Restrict Operation changes after Order Release (user exit IWO10009)
KJogeswaraRao