Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

screen graying out for vendor master error message validation in EXIT

kirankumark2
Participant
0 Kudos
250

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.

2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos
190

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)

raymond_giuseppi
Active Contributor
0 Kudos
190