<?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: regarding user command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589229#M592726</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when u create your button u need to give an fctcode for that button nothing but function code, which u are going to use in the program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        vamsi reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2007 10:13:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-26T10:13:58Z</dc:date>
    <item>
      <title>regarding user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589228#M592725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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 'SUBR'.&lt;/P&gt;&lt;P&gt;      RESULT = NUMBER1 - NUMBER2.&lt;/P&gt;&lt;P&gt;    WHEN 'MUL'.&lt;/P&gt;&lt;P&gt;      RESULT = NUMBER1 * NUMBER2.&lt;/P&gt;&lt;P&gt;    WHEN 'DIV'.&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;can any one explain about this code ...&lt;/P&gt;&lt;P&gt;how the function code is assigned...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 10:10:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589228#M592725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-26T10:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: regarding user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589229#M592726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when u create your button u need to give an fctcode for that button nothing but function code, which u are going to use in the program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        vamsi reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 10:13:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589229#M592726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-26T10:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: regarding user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589230#M592727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You have to design PF-STATUS&lt;/P&gt;&lt;P&gt;using SET PF-STATUS 'AAA'&lt;/P&gt;&lt;P&gt;and add the buttons whose functions codes are ADD, DIV,SUBR etc&lt;/P&gt;&lt;P&gt;then when you press on the respective button the respective output will be displayed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 10:14:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589230#M592727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-26T10:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: regarding user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589231#M592728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The function is not assigned here but somewhere else such as a toolbar&lt;/P&gt;&lt;P&gt;look out for any toolbars used and see if they have function codes attached to their custom buttons&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 10:15:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589231#M592728</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2007-07-26T10:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: regarding user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589232#M592729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi srinivasa&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create the buttons add subr mul and div and give the functioncode for that buttons as ADD SUBR MUL DIV and then when u run ur program and click that buttons that appropriate function will happen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward point if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Azhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 10:17:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589232#M592729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-26T10:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: regarding user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589233#M592730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;  Basically the Event AT USER-COMMAND is triggered when u select a button or menuitem on the GUI Status(Menubar + Application Toolbar + Function keys)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But You have to Create the GUI status in SE41.&lt;/P&gt;&lt;P&gt;Each button / menu item in the GUI status has to assigned to a Function code.&lt;/P&gt;&lt;P&gt;Like ADD, MULT etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system field SY-UCOMM holds the function code when u click on a button.&lt;/P&gt;&lt;P&gt;Then The GUI status  has to called in the List using SET PF-STATUS.&lt;/P&gt;&lt;P&gt;&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;&amp;lt;b&amp;gt;  SET PF-STATUS 'GUISTATUS'.&amp;lt;/b&amp;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 'SUBR'.&lt;/P&gt;&lt;P&gt;RESULT = NUMBER1 - NUMBER2.&lt;/P&gt;&lt;P&gt;WHEN 'MUL'.&lt;/P&gt;&lt;P&gt;RESULT = NUMBER1 * NUMBER2.&lt;/P&gt;&lt;P&gt;WHEN 'DIV'.&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;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if Helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 10:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589233#M592730</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-07-26T10:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: regarding user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589234#M592731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Srinivasa , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   In the code what you have given , definately there will be 4 buttons for ADD, SUBR , MUL and DIV . and those buttomn can wither be created using ME41 ( menu painter ) or by declaring them in your program as pushbuttons . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  In Either case you have to assign function codes( ADD,SUBR,MUL and DIV for 4 buttons )  and those function codes are being captured here and the process takes place . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To assign function codes go to menu painter( SE41 ), create a statuc there and then create 4 options for these  for these and assign them with these function codes .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ranjita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 10:19:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589234#M592731</guid>
      <dc:creator>former_member196299</dc:creator>
      <dc:date>2007-07-26T10:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: regarding user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589235#M592732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when u r using user-command , SET  PF-STATUS  'XXX' if you double click on 'XXX'  it takes you to se41 .in that in application toolbar you can your own function code and your own buttons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your example ADD,SUBR,MUL,DIV are function codes for the buttons in the user-command screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 10:21:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589235#M592732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-26T10:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: regarding user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589236#M592733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably this is a programm to do arithmetic fuctions as per the user inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Initially  the above lines the the result and two numbers, number1 and number2 is declared as integers with initial value as 20 and 5.&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;*// This is the first event for the list..&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;*// A case statement is used to check fot the user input and execute corresponding statements within that case..&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 'SUBR'.&lt;/P&gt;&lt;P&gt;RESULT = NUMBER1 - NUMBER2.&lt;/P&gt;&lt;P&gt;WHEN 'MUL'.&lt;/P&gt;&lt;P&gt;RESULT = NUMBER1 * NUMBER2.&lt;/P&gt;&lt;P&gt;WHEN 'DIV'.&lt;/P&gt;&lt;P&gt;RESULT = NUMBER1 / NUMBER2.&lt;/P&gt;&lt;P&gt;**// when others is used in the end to handle exceptions&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2007 10:29:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-user-command/m-p/2589236#M592733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-26T10:29:14Z</dc:date>
    </item>
  </channel>
</rss>

