Quantcast
Channel: SCN : Unanswered Discussions - ABAP Development
Viewing all articles
Browse latest Browse all 8768

Raising an error message from within an Enhancement Point

$
0
0

Hello colleagues,

 

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'

     EXCEPTIONS

       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.

     MESSAGEID sy-msgid TYPE xNUMBER sy-msgno WITH         "385830

                sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

*     MESSAGE A263.

   ENDIF.




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'.

I tried.

MESSAGE E070(MESSAGE_CLASS).


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,

Varsha


Viewing all articles
Browse latest Browse all 8768

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>