Dears,
I have to put the validations, while saving the PO while (creating/changing). so i have selected Enhacement MM06E005 , user exit EXIT_SAPMM06E_012 and include ZXM06U43 . My code getting trigger. BUT first showing the popup like HOLD, EDIT and CANCEL. Before this HOLD,EDIT and CANCEL POPUP , my error message should be appear AND this HOld,EDIT and CANCEL popup shol not come( IF my code trigs .)
IF SY-TCODE = 'ME21N' OR SY-TCODE = 'ME21' OR SY-TCODE = 'ME22N' OR
SY-TCODE = 'ME22' OR SY-TCODE = 'ME31L' OR SY-TCODE = 'ME32L' OR
SY-TCODE = 'ME23N' OR SY-TCODE = 'ME23' OR SY-TCODE = 'ME33L'.
IF
( I_EKKO-BSART = 'NAUB' AND I_EKKO-RESWK = '8400' )
OR ( I_EKKO-BSART = 'NAUB' AND I_EKKO-RESWK = '8440' ).
MESSAGE E061(ZMM01) WITH I_EKKO-BSART.."WITH 'PLEASE CHOOSE CORRECT DOCU TYPE FOR THIS SUPPLYING PLANT'.
LEAVE TO SCREEN 500.
ENDIF.
ENDIF.