<?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: Problem 'SUBMIT and RETURN' and USER COMMAND in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624683#M1570605</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;have a look at ABAP keyword help for AT with option USER-COMMAND! You can find there:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In table 2 e.g. you can find function code BACK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you have to change the function code inthe user interface of program B from BACK to another value, if you want to catch it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Klaus Babl on Feb 14, 2011 6:59 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Feb 2011 05:58:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-02-14T05:58:27Z</dc:date>
    <item>
      <title>Problem 'SUBMIT and RETURN' and USER COMMAND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624680#M1570602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've a program 'A'  that call with SUBMIT and RETURN to program B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In program B (it's a report), i need show a message when the user press the key 'BACK' 'END' or 'CANC' and not allowed  to return to program A.&lt;/P&gt;&lt;P&gt;The code are in event at user-comand for program B, however it debug don't stop. I don't debugging this buttons, when i press this buttons the program go back to program A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Silvia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 12:08:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624680#M1570602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-11T12:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem 'SUBMIT and RETURN' and USER COMMAND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624681#M1570603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Sumbit instead of submit and return. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the event at user command.... when 'BACK' check for your condition and stop there.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you want to go back to your previous program..... use leave to screen 0 or leave to program (Read help on it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if they dont work as you expected.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why dont you create a function module/Class and method for Program B and call this from Program A.... You can have screen in function module and do the screen validations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 18:29:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624681#M1570603</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2011-02-11T18:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem 'SUBMIT and RETURN' and USER COMMAND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624682#M1570604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Silvia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not want to return to program A then use SUBMIT instead of SUBMIT and RETURN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to show message if user clicks back, end or cancel button then you can do so provided program B is a Z program. Change the function code of these buttons from E (i.e. Exit) to space (i.e. normal application). Next in the 'AT User Command' event you can handle each buttons and display error message on screen like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
At User-Command.

Case sy-ucomm (or okcode):
when 'BACK'.
message 'Cannot go Back' type 'E'.
... (handle the same for remaining buttons)

Endcase.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think if you give error message then the processing will stop at program B and will not return to program A (if you are using SUBMIT and RETURN). You can try this and let us know if this or something else works. It will be beneficial for others too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saba&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Feb 2011 00:48:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624682#M1570604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-13T00:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem 'SUBMIT and RETURN' and USER COMMAND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624683#M1570605</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;have a look at ABAP keyword help for AT with option USER-COMMAND! You can find there:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In table 2 e.g. you can find function code BACK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you have to change the function code inthe user interface of program B from BACK to another value, if you want to catch it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Klaus Babl on Feb 14, 2011 6:59 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 05:58:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624683#M1570605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-14T05:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem 'SUBMIT and RETURN' and USER COMMAND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624684#M1570606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 16:51:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-submit-and-return-and-user-command/m-p/7624684#M1570606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-23T16:51:08Z</dc:date>
    </item>
  </channel>
</rss>

