<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Stop execution of a function in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818216#M1314455</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;STRONG&gt;CHECK&lt;/STRONG&gt; or &lt;STRONG&gt;RETURN&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See F1 help for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Jun 2009 06:16:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-30T06:16:29Z</dc:date>
    <item>
      <title>Stop execution of a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818211#M1314450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the user exit MV45AFZZ, I would like to stop the delete processing in some case and throwing a message to the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MV45AFZZ:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
FORM userexit_delete_document.

  if A &amp;gt; B.
    Stop process and throw message.
  endif.

ENDFORM.                    "USEREXIT_DELETE_DOCUMENT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone tell me how to do so? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Olivier D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2009 06:04:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818211#M1314450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-30T06:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Stop execution of a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818212#M1314451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this  - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 
FORM userexit_delete_document.
 
  if A &amp;gt; B.
"    Stop process and throw message.
 Message E000(YOUR MESSAGE CLASS) WITH TEXT-NNN.  "
  endif.
 
ENDFORM.                    "USEREXIT_DELETE_DOCUMENT


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2009 06:06:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818212#M1314451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-30T06:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Stop execution of a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818213#M1314452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the exceptions in that user exit and assign the value of sy-subrc accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if A &amp;gt; B.
    sy-subrc = n.
    EXIT.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if A &amp;gt; B.
    Message E000(ZMC) with 'your message'.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2009 06:09:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818213#M1314452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-30T06:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Stop execution of a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818214#M1314453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Joskin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if A &amp;gt; B.&lt;/P&gt;&lt;P&gt;"    Stop process and throw message.&lt;/P&gt;&lt;P&gt;     message 'Error Occured' type 'E'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Try this type logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2009 06:12:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818214#M1314453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-30T06:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Stop execution of a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818215#M1314454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)   You raise error message at particular condition without terminationg your program , only terminate the Routine .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM userexit_delete_document.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if A &amp;gt; B.&lt;/P&gt;&lt;P&gt;   message lv_message display like 'E'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.                    "USEREXIT_DELETE_DOCUMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) if u want to terminate the program , then code is...........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM userexit_delete_document.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if A &amp;gt; B.&lt;/P&gt;&lt;P&gt;   raise message &lt;/P&gt;&lt;P&gt;   stop.   (keyword)&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.                    "USEREXIT_DELETE_DOCUMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shambhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2009 06:14:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818215#M1314454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-30T06:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Stop execution of a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818216#M1314455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;STRONG&gt;CHECK&lt;/STRONG&gt; or &lt;STRONG&gt;RETURN&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See F1 help for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2009 06:16:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818216#M1314455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-30T06:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Stop execution of a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818217#M1314456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USe the code mentioned below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM userexit_delete_document.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if A &amp;gt; B.&lt;/P&gt;&lt;P&gt;    Message E000(MESSAGE CLASS).&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM.                    "USEREXIT_DELETE_DOCUMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can pass message text in SE91 under message classes available with you.&lt;/P&gt;&lt;P&gt;Or just double click on the E000, to create a new message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2009 06:16:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-execution-of-a-function/m-p/5818217#M1314456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-30T06:16:43Z</dc:date>
    </item>
  </channel>
</rss>

