|
Problem:
How to disable editing of the sales order using status profile once the order is approved by approver for delivery/ billing? Solution: You may need to use user exit USEREXIT_SAVE_DOCUMENT_PREPARE or USEREXIT_SAVE_DOCUMENT in program MV45AFZZ. 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. Code: 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. |
|
See Also
Get help for your SAP SD problems
SAP Sales and Distribution Books
Delivery Hints
SAP Sales and Distribution Tips
Main Index
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|