on 01-03-2012 4:04 PM
Hello All,
Can you please let me know if we could disable editing of the sales order using status profile once the order is approved by approver for delivery/ billing.
Thanks and regards,
Mathew
You can conveniently do this in USEREXIT_READ_DOCUMENT in MV45AFZZ. This user exit is called after the Sales order number is entered in the initial screen of VA02 and before the order details screens are shown. So it is ideally suited for your purpose.
We have similar coding in our production system where we show error message to the user if he tries to open the sales order in VA02 and the sales order is already released/signed, captured by a status in our custom status profile
The coding may look like. You can make appropriate changes to suit your requirement.
if vbak-auart = 'ZOR' and sy-tcode = 'VA02'.
concatenate 'VB' vbak-vbeln '000000' into zobjnr.
select single stat into jest-stat
from jest
where objnr = zobjnr
and stat = 'E0003'
and inact = space.
if sy-subrc = 0.
* Order status is E0003 - cannot change
message id 'Z5' type 'E' number '134'.
endif.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may need to use user exit USEREXIT_SAVE_DOCUMENT_PREPARE or USEREXIT_SAVE_DOCUMENT in program MV45AFZZ.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.