<?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 Exit customized screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-customized-screen/m-p/8369444#M1641792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have one problem here. I am using the BADI 'ME_PROCESS_REQ_CUST' to perform a checking of PR before save.&lt;/P&gt;&lt;P&gt;When user click 'Save', i will direct them to one customized screen using Function Module which i call screen 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the screen, i have one button 'Cancel' to cancel the transaction. i would like to go back to the PR screen and display an error message 'PR not created'. But when i click on the 'Cancel' button, it calls back to this screen (screen 100) instead of the PR screen. Please guide me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In customized function module to call screen&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CASE OK_CODE.
WHEN 'CANCEL'.
        EXPORT ok_code TO MEMORY ID 'ANS'.
        LEAVE SCREEN.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN BADI function module&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL FUNCTION 'ZFM_CAPITALISED_Q'.

  IMPORT ok_code TO to_ok_code FROM MEMORY ID 'ANS'.

  IF to_ok_code EQ 'CANCEL'.
    MESSAGE ID 'ZMSG' TYPE 'E' NUMBER '000' WITH 'PR not created'.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Starry99&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Nov 2011 08:20:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-11-09T08:20:56Z</dc:date>
    <item>
      <title>Exit customized screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-customized-screen/m-p/8369444#M1641792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have one problem here. I am using the BADI 'ME_PROCESS_REQ_CUST' to perform a checking of PR before save.&lt;/P&gt;&lt;P&gt;When user click 'Save', i will direct them to one customized screen using Function Module which i call screen 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the screen, i have one button 'Cancel' to cancel the transaction. i would like to go back to the PR screen and display an error message 'PR not created'. But when i click on the 'Cancel' button, it calls back to this screen (screen 100) instead of the PR screen. Please guide me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In customized function module to call screen&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CASE OK_CODE.
WHEN 'CANCEL'.
        EXPORT ok_code TO MEMORY ID 'ANS'.
        LEAVE SCREEN.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN BADI function module&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL FUNCTION 'ZFM_CAPITALISED_Q'.

  IMPORT ok_code TO to_ok_code FROM MEMORY ID 'ANS'.

  IF to_ok_code EQ 'CANCEL'.
    MESSAGE ID 'ZMSG' TYPE 'E' NUMBER '000' WITH 'PR not created'.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Starry99&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 08:20:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exit-customized-screen/m-p/8369444#M1641792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-09T08:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Exit customized screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-customized-screen/m-p/8369445#M1641793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 09:17:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exit-customized-screen/m-p/8369445#M1641793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-09T09:17:01Z</dc:date>
    </item>
  </channel>
</rss>

