on 10-03-2007 6:40 PM
Hi All,
Is there a way to block the users from adding new line items to a sales order from a closed period. In simple, once a sales order is created and billed, no one should add any more line items to the sales order.
Please let me know.
Thanks
SM
Hi Shylaja,
Once you create Order --> Delivery --> Finally you do billing and pass on to accounting all the items in sales order would get greyed out.
But its not having, we can do this by using User Exit.
Please try with the one of the below user exit, In this regard please take your abapers help.
MV45ATZZ
MV45AOZZ
MV45AIZZ
MV45AIZZ
MV45AFZZ
MV45EFZ1
MV45AOZZ
MV45AIZZ.
Please Reward If Really Helpful,
Thanks and Regards,
Sateesh.Kandula
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can either raise error message preventing order save if it's VA02, if all items have been billed and there is any item in xvbap with xvabp-updkz = 'I' - insert.... it can be done in userexit_save_document_prepare
OR
you can simply switch from VA02 to VA03 using userexit_read_document if all items have been billed so your users won't be able to change anything in sales order which is complete.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1st case -
userexit_save_document_prepare (main program - sapmv45a)
if sy-tcode = 'VA02'.
read table xvbap with key updkx = 'I'.
if sy-subrc = 0.
check if all items are billed or just order status
if the order is complete - issue error message.
endif.
endif.
2nd case -
userexit_read_document
if your order is complete
issue INFO message
set parameter id 'AUN' field vbak-vbeln.
leave to transaction 'VA03' and skip first screen.
it will actually prevent user from opening the order in VA02 and it will eb open in VA03 instead.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
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.