<?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: How to catch errors in calling program when using SUBMIT ... AND RETURN ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-catch-errors-in-calling-program-when-using-submit-and-return/m-p/5672280#M1289808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Surya ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your function module's code validate the date .&lt;/P&gt;&lt;P&gt;If the low value of the date less than high and date period is not more than 20 then &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call transaction&lt;/STRONG&gt; and in else condition &lt;STRONG&gt;raise exception&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your FM write like that - -&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF   date-low LT date-high AND 
                       date_difference LE '20' .

CALL  TRANSACTION   'transaction'.
ELSE.
RAISE  ...........  " Raise the invalid date exception
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 May 2009 03:30:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-25T03:30:09Z</dc:date>
    <item>
      <title>How to catch errors in calling program when using SUBMIT ... AND RETURN ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-catch-errors-in-calling-program-when-using-submit-and-return/m-p/5672279#M1289807</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;I am calling a report using submit and return statement from a function module. The report has select-options field for a date field. If user enters a date in low, which is greater than high, getting error message "Lower limit is greater than upper limit". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to catch this error without endup stoping on selection screen of the report?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the documentation, I read :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Programs called with SUBMIT ... AND RETURN or CALL TRANSACTION cannot propagate exceptions to the caller, because exception objects are bound to the internal mode of a program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to overcome this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also my aim is to write a validation on the date selection-option to have the date range not more than 20 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure of how to achieve this.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do validation of select-options data before submiting to the report ?&lt;/P&gt;&lt;P&gt;Is there any standard FM to achieve this task? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Surya.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Surya on May 24, 2009 6:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 21:36:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-catch-errors-in-calling-program-when-using-submit-and-return/m-p/5672279#M1289807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-24T21:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch errors in calling program when using SUBMIT ... AND RETURN ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-catch-errors-in-calling-program-when-using-submit-and-return/m-p/5672280#M1289808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Surya ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your function module's code validate the date .&lt;/P&gt;&lt;P&gt;If the low value of the date less than high and date period is not more than 20 then &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call transaction&lt;/STRONG&gt; and in else condition &lt;STRONG&gt;raise exception&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your FM write like that - -&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF   date-low LT date-high AND 
                       date_difference LE '20' .

CALL  TRANSACTION   'transaction'.
ELSE.
RAISE  ...........  " Raise the invalid date exception
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 03:30:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-catch-errors-in-calling-program-when-using-submit-and-return/m-p/5672280#M1289808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T03:30:09Z</dc:date>
    </item>
  </channel>
</rss>

