<?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: USER_COMMAND in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command/m-p/1936835#M387359</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;User-command is an event under interactive report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND.&lt;/P&gt;&lt;P&gt;case sy-ucomm.&lt;/P&gt;&lt;P&gt;when 'disp'.&lt;/P&gt;&lt;P&gt;select * from mara.&lt;/P&gt;&lt;P&gt;write:/ mara-matnr.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when the user selects the menu item or presses any function key the event that is &lt;/P&gt;&lt;P&gt;triggered is at user-command and can handle in the program by writting the code.&lt;/P&gt;&lt;P&gt;the system variable sy-ucomm stores the function code for the clicked menu item or for the function key and same can be checked in the program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Feb 2007 04:10:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-28T04:10:18Z</dc:date>
    <item>
      <title>USER_COMMAND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command/m-p/1936832#M387356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi can any body tell me wht is the purpose of  function module USER_COMMAND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 21:02:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command/m-p/1936832#M387356</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T21:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: USER_COMMAND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command/m-p/1936833#M387357</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;Event in interactive reporting &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This event is executed whenever the user presses a function key in the list or makes an entry in the command field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: NUMBER1 TYPE I VALUE 20, &lt;/P&gt;&lt;P&gt;NUMBER2 TYPE I VALUE 5, &lt;/P&gt;&lt;P&gt;RESULT TYPE I. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION. &lt;/P&gt;&lt;P&gt;WRITE: / NUMBER1, '?', NUMBER2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND. &lt;/P&gt;&lt;P&gt;CASE SY-UCOMM. &lt;/P&gt;&lt;P&gt;WHEN 'ADD'. &lt;/P&gt;&lt;P&gt;RESULT = NUMBER1 + NUMBER2. &lt;/P&gt;&lt;P&gt;WHEN 'SUBT'. &lt;/P&gt;&lt;P&gt;RESULT = NUMBER1 - NUMBER2. &lt;/P&gt;&lt;P&gt;WHEN 'MULT'. &lt;/P&gt;&lt;P&gt;RESULT = NUMBER1 * NUMBER2. &lt;/P&gt;&lt;P&gt;WHEN 'DIVI'. &lt;/P&gt;&lt;P&gt;RESULT = NUMBER1 / NUMBER2. &lt;/P&gt;&lt;P&gt;WHEN OTHERS. &lt;/P&gt;&lt;P&gt;WRITE 'Unknown function code'. &lt;/P&gt;&lt;P&gt;EXIT. &lt;/P&gt;&lt;P&gt;ENDCASE. &lt;/P&gt;&lt;P&gt;WRITE: / 'Result:', RESULT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After entry of a function code, the appropriate processing is performed under the event AT USER-COMMAND and the result is displayed in the details list. &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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 21:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command/m-p/1936833#M387357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-27T21:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: USER_COMMAND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command/m-p/1936834#M387358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;USER_COMMAND is a function module in the PAI of the flow logic.Basically it is used to write the logic when the user presses a self created push button in the menu bar or the application bar.In the PF-status(in the PBO-Process before output-of the screen),you can define push buttons of your choice like SAVE,EXIT,BACK.&lt;/P&gt;&lt;P&gt;When the user clicks on any one of them,say BACK,he would expect the flow to traverse to the previous screen.The logic for this to happen is written in USER_COMMAND as it is the PAI-process after input-module .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;PAI of the screen:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Module user_command.&lt;/P&gt;&lt;P&gt;Case ok_code.&lt;/P&gt;&lt;P&gt;When 'BACK'.&lt;/P&gt;&lt;P&gt;leave to screen 0.&lt;/P&gt;&lt;P&gt;When 'EXIT.&lt;/P&gt;&lt;P&gt;leave program.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(ok_code is defined in the top declaration as &lt;/P&gt;&lt;P&gt;DATA:ok_code type sy-ucomm.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Beejal&lt;/P&gt;&lt;P&gt;**reward if this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 03:33:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command/m-p/1936834#M387358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T03:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: USER_COMMAND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-command/m-p/1936835#M387359</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;User-command is an event under interactive report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND.&lt;/P&gt;&lt;P&gt;case sy-ucomm.&lt;/P&gt;&lt;P&gt;when 'disp'.&lt;/P&gt;&lt;P&gt;select * from mara.&lt;/P&gt;&lt;P&gt;write:/ mara-matnr.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when the user selects the menu item or presses any function key the event that is &lt;/P&gt;&lt;P&gt;triggered is at user-command and can handle in the program by writting the code.&lt;/P&gt;&lt;P&gt;the system variable sy-ucomm stores the function code for the clicked menu item or for the function key and same can be checked in the program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 04:10:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-command/m-p/1936835#M387359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T04:10:18Z</dc:date>
    </item>
  </channel>
</rss>

