‎2008 Nov 26 4:09 PM
Hello Experts,
My issue is the following:
In the transaction VA02, i want change the value of the field VBAP-ABGRU. I did it in the User Exit MV45AFZZ, in the FORM USEREXIT_FIELD_MODIFICATION.
The value of the field changes but the Item line stays shading. I must make some change in the Sales Order and press Enter so that the system takes into account the modification and activates the Item Line.
To resolve this problem, i tried use the BAPI 'BAPI_SALESORDER_CHANGE' but another problem appears is that this BAPI clears all of global variables of VA02, so at the end, all fields in the transaction VA02 are blanks although the Sales Order exists and has data!!
Exist some solution to refresh sales order data inside the transaction VA02 (to activate the Item line) without do changes and press ENTER?
Thank you.
‎2008 Nov 26 4:23 PM
You should change / modify the VBAP fields in the routine USEREXIT_MOVE_FIELD_TO_VBAP.
Change the values in the XVBAP.
Set a break point in the subroutine and try it in debugging.
Regards,
Naimesh Patel
‎2008 Nov 26 4:23 PM
You should change / modify the VBAP fields in the routine USEREXIT_MOVE_FIELD_TO_VBAP.
Change the values in the XVBAP.
Set a break point in the subroutine and try it in debugging.
Regards,
Naimesh Patel
‎2008 Nov 26 4:38 PM
Hello Naimesh,
Thank you for your answer.
I did it but the problem that the system doesn't pass by this form in the first.
I start the transaction VA02, i put the Order Number and i do ENTER, the system doesn't pass by the break-point in the FORM USEREXIT_MOVE_FIELD_TO_VBAP !!
And me, i need activate the Item Line before show it to the user so that can change it. So, i must put my code in one Form from where the system pass in the first like USEREXIT_FIELD_MODIFICATION or USEREXIT_READ_DOCUMENT.
Do you have any idea please?
‎2008 Nov 26 4:43 PM
Try to change it in the subroutine USEREXIT_READ_DOCUMENT.
Change the internal table XVBAP.
Regards,
Naimesh Patel
‎2008 Nov 26 4:48 PM
Hi Naimesh.
I tried it too, the value of VBAP-ABGRU changes but the Item Line and some fileds in the screen are always shading (even though the musn't when i clear the VBAP-ABGRU)!!
For that, I msut do some change in the order and press ENTER to activate them. And this is the problem, i want that to be activated automaticaly.
What do you think?
‎2008 Nov 26 5:44 PM
I got your problem now.
After some debuggin and digging into SAPMV45A, I found out that the Editable or non-editable property of the fields is being set based on the XVBUP-ABSTA (which is the Line item rejection status).
So, in the subroutine, USEREXIT_READ_DOCUMENT:
Clear XVBAP-ABGRU for all the items (Internal table)
Clear XVBAP-ABGRU (workarea)
Set A in XVBUP-ABSTA for all the items (internal table)
Set A in XVBUP-ABSTA (workarea)
It will open up the fields for editing and remove the block.
Regards,
Naimesh Patel
‎2008 Nov 26 7:07 PM
Thank you very very very very MUCH Naimesh.
That works perfectly.
I owe you a coffee
‎2008 Nov 26 7:12 PM