<?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: sample code wanted in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077862#M96829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this what you are looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report   zrich_0001  .


parameters: p_parm1 type i,
            p_parm2 type i,
            p_parm3 type i.

data: result type i.

start-of-selection.

  if p_parm1 &amp;gt; 0
     and p_parm2 &amp;gt; 0
     and p_parm3 &amp;gt; 0.
    result = p_parm1 + p_parm2 + p_parm3.
    message s001(00) with result.

  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also replace the START-OF-SELECTION statement with AT SELECTION-SCREEN.  This way, you can just hit ENTER instead of Execute.&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Dec 2005 19:54:28 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2005-12-09T19:54:28Z</dc:date>
    <item>
      <title>sample code wanted</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077861#M96828</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 would like code that does the following:&lt;/P&gt;&lt;P&gt;Creates a selection screen with three input boxes.  If all three input boxes contain numbers, it adds them and displays the result in a smaller screen or messagebox - otherwise, it loops continually until data is entered in all three fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 19:45:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077861#M96828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-09T19:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: sample code wanted</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077862#M96829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this what you are looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report   zrich_0001  .


parameters: p_parm1 type i,
            p_parm2 type i,
            p_parm3 type i.

data: result type i.

start-of-selection.

  if p_parm1 &amp;gt; 0
     and p_parm2 &amp;gt; 0
     and p_parm3 &amp;gt; 0.
    result = p_parm1 + p_parm2 + p_parm3.
    message s001(00) with result.

  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also replace the START-OF-SELECTION statement with AT SELECTION-SCREEN.  This way, you can just hit ENTER instead of Execute.&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 19:54:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077862#M96829</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-12-09T19:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: sample code wanted</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077863#M96830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PARAMETERS: p_1(10) TYPE n OBLIGATORY,&lt;/P&gt;&lt;P&gt;            p_2(10) TYPE n OBLIGATORY,&lt;/P&gt;&lt;P&gt;            p_3(10) TYPE n OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: p_total(10) TYPE n,&lt;/P&gt;&lt;P&gt;      g_msg(100).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_total = p_1 + p_2 + p_3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE 'The total of three variables is :'&lt;/P&gt;&lt;P&gt;            p_total INTO g_msg SEPARATED BY space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE i000 WITH g_msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please close the issue with appropriate points if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vemu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 19:56:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077863#M96830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-09T19:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: sample code wanted</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077864#M96831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am just typing it in so please excuse me if there are some typos resulting in syntax errors.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
parameters: p_nbr1 type i obligatory,
            p_nbr2 type i obligatory,
            p_nbr3 type i obligatory.

start-of-selection.

v_total = p_nbr1 + p_nbr2 + p_nbr3.

message i000(OO) with 'Your Total is' v_total.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 19:58:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077864#M96831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-09T19:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: sample code wanted</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077865#M96832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The addition 'OBLIGATORY' in my code will force the user to enter all the three values and I think that is what you wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 20:08:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077865#M96832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-09T20:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: sample code wanted</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077866#M96833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Srinivas, instead of doing an IF statement, the OBLIGATORY extension is a better way if you want to "lock down" to the specific field.  You will get error messages on each field untill they are filled, in my code, there is no error messages, it just doesn't do anything untill all are filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what you had in mind.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 20:12:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077866#M96833</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-12-09T20:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: sample code wanted</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077867#M96834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kevin, please make sure that you close this post when you feel your question has been answered.  Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 21:00:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-wanted/m-p/1077867#M96834</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-12-09T21:00:49Z</dc:date>
    </item>
  </channel>
</rss>

