Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8944

Re: Even though ERROR / 'E' type message, still program is executing normally!!

$
0
0

Hello!

 

This SAP Help Content is suggestive about this issue:

 

Messages in Function Modules and Methods (SAP Library - SAP NetWeaver by Key Capability)

 

If you want the following code blocks to be ignored, as your WF colleague and others have suggested, i recommend you to use the raise statement. It forces the current processing to retreat, and report the caller that something went wrong, similar as what we can do with methods, that raise an exception class which have to be handled by the catch statement, that is set by the caller.

 

If you want to minimize the development effort, you can add the "raising" complement to the end of the message statement, just like this:

 

======================================================================

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

                         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4  RAISING exception_lock_failed.

======================================================================


I have used this way of exception handling and it did work, maybe the right way could be a variation of it, i wish but i can´t set a test right now.


I am not sure if there are other factors that could affect the raise, from workflow of anything else, despite of it, i believe the raise should do the work.


Hope it helps!

Regards,

Renan


Viewing all articles
Browse latest Browse all 8944

Trending Articles



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