<?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 How to show error message in a report program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700398#M1577962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am making a report using smartforms. I am successful in showing data  but problem is if if i put a value in parameters that does not exist is database, the smartform runs and related fields shows as empty fields. But the form is running. I want to show error message if the parameter values dose not matches with the database values. The message will show as &lt;U&gt;Document not exists&lt;/U&gt;&lt;/P&gt;&lt;P&gt;So i used related error msg here like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; if sy-subrc ne 0.
          message e357.
           endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is not working for passing values to smartform. It works if i use in classical report. Plz help me on this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rosaline.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Feb 2011 08:16:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-02-03T08:16:41Z</dc:date>
    <item>
      <title>How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700398#M1577962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am making a report using smartforms. I am successful in showing data  but problem is if if i put a value in parameters that does not exist is database, the smartform runs and related fields shows as empty fields. But the form is running. I want to show error message if the parameter values dose not matches with the database values. The message will show as &lt;U&gt;Document not exists&lt;/U&gt;&lt;/P&gt;&lt;P&gt;So i used related error msg here like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; if sy-subrc ne 0.
          message e357.
           endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is not working for passing values to smartform. It works if i use in classical report. Plz help me on this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rosaline.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 08:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700398#M1577962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T08:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700399#M1577963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rosaline,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before calling the smartform, check whether the data that you are passing to smartform is initial or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the approach can be:&lt;/P&gt;&lt;P&gt;1. Read the data from the database tables based on the entries made by the user on the selection screen.&lt;/P&gt;&lt;P&gt;2. Prepare the data to be printed / displayed&lt;/P&gt;&lt;P&gt;3. Check if there is any data to be displayed / printed. If there is not data, display the message 'No records found' else display it in an ALV grid or call the smartform for the printout (as per your requirement).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it answers your query. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!!!&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 08:32:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700399#M1577963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T08:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700400#M1577964</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;Hope you are giving this error message in the Report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must assign the Error Message number to a Message class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message e000(8i) with 'Parameter value not found'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here 000 is the message number in the message class 8i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then please check the whether the internal table which you are passing to the smartform is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Sumodh.P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 08:37:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700400#M1577964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T08:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700401#M1577965</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;write like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;          message e357.&lt;/P&gt;&lt;P&gt;         exit.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&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;Ganesh Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 08:58:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700401#M1577965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T08:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700402#M1577966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message 'document not exsist' type 'S'&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 09:03:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700402#M1577966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T09:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700403#M1577967</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;Can you please tell me your program flow to call a smartform from driver program?In more specific I would like to know whether you have written the SQL query retrieve from the database and pass it to smartform as import parameter and or tables or you just call the smartforms in the driver program and did all the query parts in smartforms?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of first one means if you retrieve all the data which you need to show in smartforms in the driver program then before call SSF_FUNCTION_MODULE_NAME you check whether the Tables you are passing or the work area you are passing is initial or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second case first you check the data is there or not in the database by using selection screen values before storing in internal table.then do a sy-subrc check before the smartform calling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suvajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 09:03:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700403#M1577967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T09:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700404#M1577968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all for reply.  Should i have to use message before call function 'SSF_FUNCTION_MODULE_NAME' ? I tried it but not working. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if it_final[] is not initial.
            if sy-subrc ne 0.
           Message e000(8i) with 'Parameter value not found'.
           endif.
            endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 09:09:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700404#M1577968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T09:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700405#M1577969</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;You should check that you fields are not initial before calling the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rahul Jain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 10:02:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700405#M1577969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T10:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700406#M1577970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Thanks all for reply.  Should i have to use message before call function 'SSF_FUNCTION_MODULE_NAME' ? I tried it but not working. &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;CODE&gt;if it_final[] is not initial.
&amp;gt;*             if sy-subrc ne 0. ---&amp;gt; "Remove this condition check, it not required
&amp;gt;            Message e000(8i) with 'Parameter value not found'.
&amp;gt;            endif.
&amp;gt; *            endif. ---&amp;gt; "remove this
&amp;gt; &lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sy-subrc doesnt need to be validated here, remove that If condition and check again.&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>Thu, 03 Feb 2011 10:59:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700406#M1577970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T10:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700407#M1577971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;write in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ITAB IS NOT INITIAL.&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'.&lt;/P&gt;&lt;P&gt;  .........................................&lt;/P&gt;&lt;P&gt;  .........................................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  MESSAGE 'NO Parameter Found' TYPE 'S'.&lt;/P&gt;&lt;P&gt;  LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;ENDIF.&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;Suvajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 11:47:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700407#M1577971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T11:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to show error message in a report program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700408#M1577972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Suvajit. My problem is solved now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;Tripod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Feb 2011 05:04:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-show-error-message-in-a-report-program/m-p/7700408#M1577972</guid>
      <dc:creator>former_member308418</dc:creator>
      <dc:date>2011-02-06T05:04:59Z</dc:date>
    </item>
  </channel>
</rss>

