‎2007 Aug 27 4:23 PM
Hello,
We have added a search help exit for sales order reason codes to restrict the values allowed by order type. It works great except when the user changes the order type. The system does not pass thru the search help exit again and refresh the values for the new order type unless the user calls transaction VA01 to start over again. How can I force the system to refresh the search help exit without starting the transaction again?
Thanks.
Maggie
‎2007 Aug 30 11:10 AM
For VA01 there is an inlude MV45AFZZ. In this include there is a form called FORM userexit_field_modification.
Put in this form the following code and the problem is solved.
CASE SCREEN-NAME.
WHEN 'VBAK-AUGRU'.
CALL FUNCTION 'VRM_DELETE_VALUES'
EXPORTING
id = 'VBAK-AUGRU'
ID_CONTAINS_PROGNAME =
EXCEPTIONS
ID_NOT_FOUND = 1
OTHERS = 2.
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDCASE.
Regards,
Robert
‎2007 Aug 28 9:14 AM
just place the REFRESH statement to the parameter which your passing the SEARCH HELP DATA ..
for example :
parameters : s_lifnr for matchcode object help_lifnr .
"************in your code
refresh s_lifnr .
reward points if it is usefull ...
Girish
‎2007 Aug 29 3:26 PM
Hello,
I've got the same problem. The refresh statement doesn't work because you are not going back to the search help exit. Is there something that leads the program not to go to het search help exit again?
‎2007 Aug 29 9:41 PM
Hi Maggie
I am not sure , but I think there is a separate exit when the order type is changed.
‎2007 Aug 30 11:10 AM
For VA01 there is an inlude MV45AFZZ. In this include there is a form called FORM userexit_field_modification.
Put in this form the following code and the problem is solved.
CASE SCREEN-NAME.
WHEN 'VBAK-AUGRU'.
CALL FUNCTION 'VRM_DELETE_VALUES'
EXPORTING
id = 'VBAK-AUGRU'
ID_CONTAINS_PROGNAME =
EXCEPTIONS
ID_NOT_FOUND = 1
OTHERS = 2.
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDCASE.
Regards,
Robert
‎2007 Aug 30 4:02 PM
Thanks very much for your help everyone. We implemented Robert's solution and it solved the problem.