Hello,
I am using BADi : ZME_PROCESS_PO_CUST~POST, to check if PO creater and PO release(ME29N) person are going to be same. ITs working correctly - but i am not able to throw the error message. Tried various options from SDN, nothing works.
When debugging - it goes to message - but the message is not getting displayed and PR is getting released.
DATA: lv_ernam TYPE ekko-ernam.
IF sy-tcode = 'ME29N'.
SELECT SINGLE ernam INTO lv_ernam FROM ekko
WHERE ebeln = im_ebeln.
IF lv_ernam = sy-uname.
* MESSAGE e000(0k) WITH 'User is not authorized to Release Purchase Order'.
* MESSAGE w000(00) with 'User is not authorized to Release Purchase Order' DISPLAY LIKE 'E'.
* MESSAGE E118(ZMES)." display like 'E'.
* MESSAGE ID 'ZMES' TYPE 'E' NUMBER '118' WITH 'User is not authorized to Release Purchase Order'.
MESSAGE e398(00) WITH ' User is not authorized to Release Purchase Order' .
mmpur_message_forced 'E' 'ME' '118'
ENDIF.
Thanks
Senthil