2009 Apr 11 12:42 PM
Hi experts,
I hav a requirement in VA02 that everytime when we change the end customer value the volume should get incremented by 1 Gal in the item level.
For which I am writing the code in include MV45AFZZ under userexit_save_document. My approach is I am fetching value from CDPOS table . Now the problem is I need to compare it with the existing screen field and need to reflect the incremented value in volume screen field ( VOLUM)
What should be the approach and logic for it and what is the accurate place to code .
Please suggest asap .
I wll really thankful to you all if you can suggest some solution.
2009 Apr 11 12:50 PM
Hi,
use USEREXIT_MOVE_FIELD_TO_VBAK and USEREXIT_MOVE_FIELD_TO_VBAP where you will be getting the header and item data of sales order .....
1. current header data will be in strcture VBAK and table XVBAK
2. current item data will be there in VBAP structure and table XVBAP.
You can hold these values in one z strucutre and can compare it while saving...
Thanks,
Shailaja Ainala.
2009 Apr 11 12:58 PM
thanks for your reply ,,,,
I have a question here that you mean to say if we update xvap and xvak it will update the screen fields in VA02?
2009 Apr 11 1:14 PM
Hi,
Do one thing keep break point in both the USEREXIT_MOVE_FIELD_TO_VBAK and USEREXIT_MOVE_FIELD_TO_VBAP and check the field value which you want to change and at runtime try to change the value .......and check whether reflected by ew value after saving ..............if its fine then you can continue....
first try to do like this..
Thanks,
Shailaja Ainala.
2009 Apr 11 1:16 PM
I had tried it and it was not working thats is the reason I have posted this query in SDN
2009 Apr 11 1:27 PM
HI,
Then try in save only currently i dont have system to check out you can try out in save...
Thanks,
Shailaja Ainala.
2009 Apr 11 1:52 PM
I had already tried Userexit_Save_document .Its triggering while I save the changes . My problem is I have the logic but dont know how to compare and update the screen fields as at the time of debugging I changed the value in xvbap but it didnt refect in the VA02.
2009 Apr 12 7:03 AM
2009 Apr 13 7:28 AM
Hi,
If you are working in ECC 6.0, try with the Enhancement Spot.
Thank you,
Sekhar.