I need to raise a message to MIGO screen from an enhancement point.
Please refer to the following piece of code,
ENHANCEMENT-POINT MB_POST_GOODS_MOVEMENTS_02 SPOTS ES_SAPLMBWL.
CALL FUNCTION 'MB_CREATE_MATERIAL_DOCUMENT_UT'
error_message = 4.
* As soon as we have started to put things into UPDATE TASK, we must
* ensure that errors definitely terminate the transaction.
* MESSAGE A is not sufficient because it can be catched from
* external callers which COMMIT WORK afterwards, resulting in
* incomplete updates. Read note 385830 for the full story.
IF NOT sy-subrc IS INITIAL.
MESSAGE ID sy-msgid TYPE x NUMBER sy-msgno WITH "385830
sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
* MESSAGE A263.
Here in this code snippet, the above hilglighted function contains a perform which in turn contians many enhancement point. Inside one of these, I want to raise a message of type 'E'.
Unfortunately, this doesn't work. Giving either of Error or Abort, the control always comes to the outermost function above(MB_CREATE_MATERIAL_DOCUMENT_UT'). Here the message statement with type x is executed which is for DUMP.
I want to avoid this. I want to take the control at my enhancement point and show the necessary reason in the screen such that the control never reaches at the above dump.
Kindly give your inputs.
Thanks & Regards,