2023 Mar 13 5:59 PM
vendor.jpgHi,
I have a requirement to validate Bank account data when creating a vendor using XK01/XK02/FK01/FK02 transaction codes. I have implemented the EXIT EXIT_SAPMF02K_001 with below code and validation triggers. Now whenever validation fail an error message is triggered and Bank data screen is graying out and automatically next screen is calling but client wants whenever error message thrown screen should be in EDITABLE MODE and it should be in the same BANK ACCOUNT screen. below is the logic i written inside the EXIT. someone please correct me if any code change required to achieve the above. XK01 error screenshot attached
IF ( sy-tcode = 'FK01' ) OR ( sy-tcode = 'FK02' )
OR ( sy-tcode = 'XK01' ) OR ( sy-tcode = 'XK02' ).
IF ( sy-ucomm = 'ENTR' ) OR ( sy-ucomm = 'UPDA' ) OR ( sy-ucomm = 'YES' ) .
CLEAR : records, wa_lfbk, lv_lifnr.
SELECT SINGLE lifnr INTO lv_lifnr FROM lfa1 WHERE lifnr = i_lfa1-lifnr.
*** IF sy-subrc <> 0. "Vendor not yet created
DESCRIBE TABLE t_lfbk LINES records.
IF records > 1.
LOOP AT t_lfbk INTO wa_lfbk.
IF wa_lfbk-bvtyp IS INITIAL.
MESSAGE e275(zrmm).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
2023 Mar 14 8:43 AM
Use the BAdI VENDOR_ADD_DATA, in method CHECK_ALL_DATA you can pass the error message (E_MSGID, etc.) in returned parameters with the number of the dynpro to display (E_DYNNR)
2023 Mar 17 1:38 PM