on 2022 Feb 22 9:53 PM
Hello All,
I am trying to update the value of a z-field in Additional data B tab based on the user status selected by an user.
Requirement:
When an user changes the user status (from 'A' to 'B') for a line item from the Status tab in a Sales Order and SAVES the Order, the value of a Z-field (X) present in the Additional data B tab of the same line item should be removed.
I have written my logic by creating an enhancement in the FORM USEREXIT_SAVE_DOCUMENT_PREPARE of the include program MV45AFZZ.
Logic applied:
For every line item in XVBAP and for the respective object number (OBJNR) the user status is read using the FM STATUS_READ.
Now, if the STATUS is Equals to 'B', the value of the Z-field (X) for the respective line item in XVBAP has been cleared and XVBAP has been modified with blank value.
Issue:
Even after.modifying XVBAP, the value is not getting updated and the Z-field (X) continues to have the same value while the user status already got updated from 'A' to 'B'.
Can anyone suggest anything regarding this issue?
Hi
Please put a break point in this exit and include and see if it is trapped in save. You can put your code there and see if it stops there.
Include : MV45AFZA
USEREXIT_REFRESH_DOCUMENT
Regards,
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I did check this.. but then I also made some observations. My code was not working as XVBAP did not have the updkz field as 'U' as the user is only changing the status from 'A' to 'B' in this case. So, even when I am putting my code in USEREXIT_REFRESH_DOCUMENT, it is not updating the values in the Sales Order.
User | Count |
---|---|
93 | |
9 | |
8 | |
7 | |
4 | |
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.