2022年1月20日星期四

how to solve userexit_check_vbap validate all grey

 Someone maybe add check logic in  userexit_check_vbap. For example vbap-PS_PSP_PNR.  

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 wbs element field was not opened for re-editing (it was still shown in grey and disallowed for user entry). Just like below:




Here is the solution 

add code in  USEREXIT_CHECK_VBAP

DATA P_FLG TYPE C.

"Get FLAG From Share Memory.
IMPORT P_FLG FROM MEMORY ID 'ZTEST'.


IF VBAP-PS_PSP_PNR '00002650' AND P_FLG IS INITIAL.
  export P_flg 'X' TO MEMORY ID 'ZTEST'.
  MESSAGE e100(zzdea_msg).
ENDIF.


IF P_FLG 'X'.
    CLEAR VBAP-PS_PSP_PNR.
ENDIF.


FREE MEMORY ID 'ZTEST'.

when error message was shown just click Enter, WBS Elemet is cleared.







没有评论:

发表评论

Customer Characteristic

  Characteristic Descriptions are stored in the table - CABNT - Language - SPRAS - Characteristic description - ATBEZ Characteristic Values ...