2011 Jan 06 9:00 AM
Hi,
I was required to add validation for Material Group 3 (VBAP-MVGR3) in 'Additional Data A' tab (VA01/VA02). The corresponding screen number in 4459. In the PAI section, there is a module called 'vbap_bearbeiten'. In this module, there is an enhancement point called 'VBAP_BEARBEITEN_10 '. I created an implementation of this enhancement point to call a validation subroutine which i put in user exit MV45AFZZ. My problem is whenever a wrong entry is entered for that field, the whole screen in the 'Additional Data A' tab turned grey and disabled for user entry. Re-entry for the correct Material Group 3 is not allowed.
Initially, i used a different approach. I made a core change to screen 4459 by adding a statement like below in the PAI section :-
FIELD vbap-mvgr3 MODULE zsd_check_mvgr3 ON REQUEST.
In fact, the validation worked without any issue. User was prompted for an error message and then was allowed to re-enter a correct entry for that field if a wrong entry was entered initially. However, since this approach involved a core change, it was not allowed by my superior and he demands for using the enhancement framework approach.
Kindly please let me know if you have any idea of resolving this issue. Thanks much in advance.
2011 Jan 06 9:08 AM
You can do this using user exit MV45AFZB, form-routine "USEREXIT_CHECK_VBAP".
Hi,
I was required to add validation for Material Group 3 (VBAP-MVGR3) in 'Additional Data A' tab (VA01/VA02). The corresponding screen number in 4459. In the PAI section, there is a module called 'vbap_bearbeiten'. In this module, there is an enhancement point called 'VBAP_BEARBEITEN_10 '. I created an implementation of this enhancement point to call a validation subroutine which i put in user exit MV45AFZZ. My problem is whenever a wrong entry is entered for that field, the whole screen in the 'Additional Data A' tab turned grey and disabled for user entry. Re-entry for the correct Material Group 3 is not allowed.
Initially, i used a different approach. I made a core change to screen 4459 by adding a statement like below in the PAI section :-
FIELD vbap-mvgr3 MODULE zsd_check_mvgr3 ON REQUEST.
In fact, the validation worked without any issue. User was prompted for an error message and then was allowed to re-enter a correct entry for that field if a wrong entry was entered initially. However, since this approach involved a core change, it was not allowed by my superior and he demands for using the enhancement framework approach.
Kindly please let me know if you have any idea of resolving this issue. Thanks much in advance.
2011 Jan 06 9:08 AM
You can do this using user exit MV45AFZB, form-routine "USEREXIT_CHECK_VBAP".
2011 Jan 07 3:24 AM
Hi guys, thanks much for your feedback.
I tried to call my validation subroutine from USEREXIT_CHECK_VBAP (MV45AFZB). However, it did not work as well. Although the validation subroutine was successfully called in USEREXIT_CHECK_VBAP and error message dialog box was shown if entry was not correct, but when i clicked on the dialog box / pressed the 'enter' key, the 'Material Group 3' field was not opened for re-editing (it was still shown in grey and disallowed for user entry). In fact, through debugging, i found that USEREXIT_CHECK_VBAP was called again (after i pressed the 'enter' key) and it caused the program to enter an infinite loop.
On the other hand, i also tried to use USEREXIT_MOVE_FIELD_TO_VBKD (MV45ZFZZ). Unfortunately, i also met with the same issue as described above. Kindly please let me know if there is a way to solve this issue. Thanks.
2011 Jan 06 9:09 AM
Hi try to write the logic in
include MV45AFZZ in form routine USEREXIT_MOVE_FIELD_TO_VBAP and throw error message after the validation it will work...
Prabhudas