<?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: Pushbutton logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459006#M831076</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create push buton&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS AFTER INPUT.
...
MODULE user_command_100.
. . .

DATA:ok_code LIKE sy-ucomm.
...
MODULE user_command_100 INPUT.
CASE ok_code.
WHEN 'SRTU'.
SORT it_book by ... .
. . .
ENDCASE.
ENDMODULE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create a pushbutton, you must:&lt;/P&gt;&lt;P&gt;Create a pushbutton: Choose the Pushbutton object from the Screen Painter element list, place it&lt;/P&gt;&lt;P&gt;on the screen, and assign a name to it. You can enter a static text in the Text attribute. Enter a&lt;/P&gt;&lt;P&gt;function code for the pushbutton in the Function code attribute. This is placed in the OK_CODE&lt;/P&gt;&lt;P&gt;field automatically when the user chooses the pushbutton on the screen.&lt;/P&gt;&lt;P&gt;Activate the command field (OK_CODE field): You must give the field a name in the element list&lt;/P&gt;&lt;P&gt;of the Screen Painter, then declare an identically-named field in the ABAP program with reference&lt;/P&gt;&lt;P&gt;to the system field sy-ucomm.&lt;/P&gt;&lt;P&gt;When the user chooses a function on the screen, the system places the corresponding function code&lt;/P&gt;&lt;P&gt;into the OK_CODE field. You can then query the field and use the result to trigger the appropriate coded&lt;/P&gt;&lt;P&gt;processing block.&lt;/P&gt;&lt;P&gt;If the user chooses a pushbutton that has the function type ' ' (space), the PAI event is processed.&lt;/P&gt;&lt;P&gt;If the user chooses a pushbutton that has the function type "E", the system processes a module with the&lt;/P&gt;&lt;P&gt;addition AT EXIT-COMMAND. This happens before the automatic field transport and the field input&lt;/P&gt;&lt;P&gt;checks. The system places the function code that has been triggered into the OK_CODE field, which you&lt;/P&gt;&lt;P&gt;can then query in the module.&lt;/P&gt;&lt;P&gt;After the AT EXIT-COMMAND module, the system continues processing the screen normally (field input&lt;/P&gt;&lt;P&gt;checks, followed by PAI processing&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;Create the program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new program in the repository browser (Transaction SE80) . Name standard for dialog programs is SAPMZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attributes window:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Module pool = M&lt;/P&gt;&lt;P&gt;- Application = Z&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create the screen &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add a pushbutton to the screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attributes screen for the pushbutton, enter a function code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the FctCode field ( In this example: 0020 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create a screen, SAP automathic creates a field with the type OK. The function code of the psuhbutton will be placed here when you push the button. However you have to supply the name of the OK field ( In this example: OK_CODE ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must also create a global variable in the program, to store the value of the OK field ( See below ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create global variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
* Global variable to store OK code

ok_code(4),
* Temporary store the value of the OK code
save_ok_code(4).

Create code for the screen

PROCESS BEFORE OUTPUT.
MODULE status_0001.

PROCESS AFTER INPUT.
MODULE user_command_0001.

MODULE status_0001 OUTPUT.
SET PF-STATUS '0001'.
SET TITLEBAR '001'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Example of how deactivate a field on the screen&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ZCOSTAFSTM-ZAFSTEMNR is the name of the screen field we want to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;deactivate.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;CHECK screen-name = 'ZCOSTAFSTM-ZAFSTEMNR'.&lt;/P&gt;&lt;P&gt;screen-input = '0'.&lt;/P&gt;&lt;P&gt;MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0001 INPUT.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here you can catch when user pushes a pushbutton&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Save the OK code in save_ok_code and clear it&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;save_ok_code = ok_code.&lt;/P&gt;&lt;P&gt;CLEAR ok_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE save_ok_code.&lt;/P&gt;&lt;P&gt;WHEN '0010'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Afstemninger&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.&lt;/P&gt;&lt;P&gt;PERFORM my_list.&lt;/P&gt;&lt;P&gt;WHEN '0020'.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'ZCO1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'RETU'.&lt;/P&gt;&lt;P&gt;LEAVE TO SCREEN '0000'.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here you can catch when the user psuh a button on the menu bar or presses a function key&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE sy-ucomm.&lt;/P&gt;&lt;P&gt;WHEN 'OPRT'.&lt;/P&gt;&lt;P&gt;PERFORM something.&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;&lt;STRONG&gt;hope u find it useful &amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 22, 2008 4:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Feb 2008 08:43:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-22T08:43:34Z</dc:date>
    <item>
      <title>Pushbutton logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459003#M831073</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;This is probably easy, but I've never had the need to do it before. &lt;/P&gt;&lt;P&gt;I need to execute a report with selection criteria from a Pushbutton instead of the SAP Execute button. &lt;/P&gt;&lt;P&gt;What code do I put behind the Pushbutton to do this? &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 08:32:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459003#M831073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T08:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Pushbutton logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459004#M831074</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;Maybe you can use this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen pushbutton 35(20) text-012 user-command start. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case sscrfields-ucomm. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when 'START'. &lt;/P&gt;&lt;P&gt;call function 'POPUP_TO_CONFIRM' &lt;/P&gt;&lt;P&gt;exporting &lt;/P&gt;&lt;P&gt;titlebar = text-004 &lt;/P&gt;&lt;P&gt;text_question = text-008 &lt;/P&gt;&lt;P&gt;text_button_1 = 'Yes' &lt;/P&gt;&lt;P&gt;text_button_2 = 'No' &lt;/P&gt;&lt;P&gt;importing &lt;/P&gt;&lt;P&gt;answer = v_answer &lt;/P&gt;&lt;P&gt;exceptions &lt;/P&gt;&lt;P&gt;text_not_found = 1 &lt;/P&gt;&lt;P&gt;others = 2. &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 e.... &lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v_answer = c_yes. &lt;/P&gt;&lt;P&gt;submit z_your_program and return. &lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Errors derived from memory &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;errors .............. &lt;/P&gt;&lt;P&gt;when others. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set initial dynpro &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call screen 100. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers...............&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 08:35:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459004#M831074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T08:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pushbutton logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459005#M831075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;go through this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES sscrfields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_carrid TYPE s_carr_id,&lt;/P&gt;&lt;P&gt;            p_cityfr TYPE s_from_cit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: FUNCTION KEY 1,&lt;/P&gt;&lt;P&gt;                  FUNCTION KEY 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;  sscrfields-functxt_01 = 'LH'.&lt;/P&gt;&lt;P&gt;  sscrfields-functxt_02 = 'UA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;  CASE sscrfields-ucomm.&lt;/P&gt;&lt;P&gt;      WHEN'FC01'.&lt;/P&gt;&lt;P&gt;      p_carrid = 'LH'.&lt;/P&gt;&lt;P&gt;      p_cityfr = 'Frankfurt'.&lt;/P&gt;&lt;P&gt;    WHEN 'FC02'.&lt;/P&gt;&lt;P&gt;      p_carrid = 'UA'.&lt;/P&gt;&lt;P&gt;      p_cityfr = 'Chicago'.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  WRITE / 'START-OF-SELECTION'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sreelakshmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 08:36:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459005#M831075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T08:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Pushbutton logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459006#M831076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create push buton&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS AFTER INPUT.
...
MODULE user_command_100.
. . .

DATA:ok_code LIKE sy-ucomm.
...
MODULE user_command_100 INPUT.
CASE ok_code.
WHEN 'SRTU'.
SORT it_book by ... .
. . .
ENDCASE.
ENDMODULE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create a pushbutton, you must:&lt;/P&gt;&lt;P&gt;Create a pushbutton: Choose the Pushbutton object from the Screen Painter element list, place it&lt;/P&gt;&lt;P&gt;on the screen, and assign a name to it. You can enter a static text in the Text attribute. Enter a&lt;/P&gt;&lt;P&gt;function code for the pushbutton in the Function code attribute. This is placed in the OK_CODE&lt;/P&gt;&lt;P&gt;field automatically when the user chooses the pushbutton on the screen.&lt;/P&gt;&lt;P&gt;Activate the command field (OK_CODE field): You must give the field a name in the element list&lt;/P&gt;&lt;P&gt;of the Screen Painter, then declare an identically-named field in the ABAP program with reference&lt;/P&gt;&lt;P&gt;to the system field sy-ucomm.&lt;/P&gt;&lt;P&gt;When the user chooses a function on the screen, the system places the corresponding function code&lt;/P&gt;&lt;P&gt;into the OK_CODE field. You can then query the field and use the result to trigger the appropriate coded&lt;/P&gt;&lt;P&gt;processing block.&lt;/P&gt;&lt;P&gt;If the user chooses a pushbutton that has the function type ' ' (space), the PAI event is processed.&lt;/P&gt;&lt;P&gt;If the user chooses a pushbutton that has the function type "E", the system processes a module with the&lt;/P&gt;&lt;P&gt;addition AT EXIT-COMMAND. This happens before the automatic field transport and the field input&lt;/P&gt;&lt;P&gt;checks. The system places the function code that has been triggered into the OK_CODE field, which you&lt;/P&gt;&lt;P&gt;can then query in the module.&lt;/P&gt;&lt;P&gt;After the AT EXIT-COMMAND module, the system continues processing the screen normally (field input&lt;/P&gt;&lt;P&gt;checks, followed by PAI processing&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;Create the program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new program in the repository browser (Transaction SE80) . Name standard for dialog programs is SAPMZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attributes window:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Module pool = M&lt;/P&gt;&lt;P&gt;- Application = Z&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create the screen &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add a pushbutton to the screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attributes screen for the pushbutton, enter a function code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the FctCode field ( In this example: 0020 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create a screen, SAP automathic creates a field with the type OK. The function code of the psuhbutton will be placed here when you push the button. However you have to supply the name of the OK field ( In this example: OK_CODE ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must also create a global variable in the program, to store the value of the OK field ( See below ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create global variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
* Global variable to store OK code

ok_code(4),
* Temporary store the value of the OK code
save_ok_code(4).

Create code for the screen

PROCESS BEFORE OUTPUT.
MODULE status_0001.

PROCESS AFTER INPUT.
MODULE user_command_0001.

MODULE status_0001 OUTPUT.
SET PF-STATUS '0001'.
SET TITLEBAR '001'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Example of how deactivate a field on the screen&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ZCOSTAFSTM-ZAFSTEMNR is the name of the screen field we want to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;deactivate.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;CHECK screen-name = 'ZCOSTAFSTM-ZAFSTEMNR'.&lt;/P&gt;&lt;P&gt;screen-input = '0'.&lt;/P&gt;&lt;P&gt;MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0001 INPUT.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here you can catch when user pushes a pushbutton&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Save the OK code in save_ok_code and clear it&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;save_ok_code = ok_code.&lt;/P&gt;&lt;P&gt;CLEAR ok_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE save_ok_code.&lt;/P&gt;&lt;P&gt;WHEN '0010'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Afstemninger&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.&lt;/P&gt;&lt;P&gt;PERFORM my_list.&lt;/P&gt;&lt;P&gt;WHEN '0020'.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'ZCO1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'RETU'.&lt;/P&gt;&lt;P&gt;LEAVE TO SCREEN '0000'.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here you can catch when the user psuh a button on the menu bar or presses a function key&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE sy-ucomm.&lt;/P&gt;&lt;P&gt;WHEN 'OPRT'.&lt;/P&gt;&lt;P&gt;PERFORM something.&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;&lt;STRONG&gt;hope u find it useful &amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 22, 2008 4:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 08:43:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459006#M831076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T08:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Pushbutton logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459007#M831077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can do the same functionality using the SE41 transaction code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 09:14:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pushbutton-logic/m-p/3459007#M831077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T09:14:42Z</dc:date>
    </item>
  </channel>
</rss>

