<?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 Screen programming - Return statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526907#M1561019</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;In the middle of a user exit, I have called a screen in which two buttons are there "SAVE and Exit".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If save button is pressed, data should update the value is table and  continue with the user exit.&lt;/P&gt;&lt;P&gt;If exit button is pressed, nothing should happen and continue with the user exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is, i have called this screen in the middle of the user exit. Exit button works fine, it continues with the next line of the code in the user exit.&lt;/P&gt;&lt;P&gt;But for save button, after updation, it returns to the first line of the user exit. But it should continue with the next line in the user exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which statement will bring the control to next line of the user exit after updation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Ezhil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Jan 2011 10:49:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-01-10T10:49:58Z</dc:date>
    <item>
      <title>Screen programming - Return statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526907#M1561019</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;In the middle of a user exit, I have called a screen in which two buttons are there "SAVE and Exit".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If save button is pressed, data should update the value is table and  continue with the user exit.&lt;/P&gt;&lt;P&gt;If exit button is pressed, nothing should happen and continue with the user exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is, i have called this screen in the middle of the user exit. Exit button works fine, it continues with the next line of the code in the user exit.&lt;/P&gt;&lt;P&gt;But for save button, after updation, it returns to the first line of the user exit. But it should continue with the next line in the user exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which statement will bring the control to next line of the user exit after updation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Ezhil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 10:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526907#M1561019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-10T10:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Screen programming - Return statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526908#M1561020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What screen are you calling? Please paste the code for &lt;STRONG&gt;SAVE&lt;/STRONG&gt; user-command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 10:56:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526908#M1561020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-10T10:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Screen programming - Return statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526909#M1561021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you call the screen using &lt;EM&gt;CALL SCREN XXX&lt;/EM&gt; then &lt;EM&gt;LEAVE TO SCREEN 0&lt;/EM&gt; should be enough. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the exit might somehow try to process SAVE function too. I suggest you use different function code in your screen to enter SAVE mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 10:58:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526909#M1561021</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2011-01-10T10:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Screen programming - Return statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526910#M1561022</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;Screen is a custom screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code for SAVE and exit button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{ &lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  USER_COMMAND_0100  INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0100 INPUT.&lt;/P&gt;&lt;P&gt;IF sy-ucomm = 'SAVE'.&lt;/P&gt;&lt;P&gt;    PERFORM confirm_data.&lt;/P&gt;&lt;P&gt;     LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;  ELSEIF sy-ucomm = 'EXIT'.&lt;/P&gt;&lt;P&gt;    LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " USER_COMMAND_0100  INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  CONFIRM_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM confirm_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPES : BEGIN OF ty_data,&lt;/P&gt;&lt;P&gt;            sfakn TYPE vbrk-sfakn,&lt;/P&gt;&lt;P&gt;           END OF ty_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA :  wa_vbrk TYPE vbrk,&lt;/P&gt;&lt;P&gt;          it_upd TYPE STANDARD TABLE OF vbrk WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;          it_vbrk TYPE STANDARD TABLE OF vbrk WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;          ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;          it_data TYPE STANDARD TABLE OF ty_data,&lt;/P&gt;&lt;P&gt;          wa_data TYPE ty_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-ucomm = 'SAVE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR : wa_data.&lt;/P&gt;&lt;P&gt;    REFRESH : it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IMPORT it_data FROM MEMORY ID 'VF11'.&lt;/P&gt;&lt;P&gt;    READ TABLE it_data INTO wa_data INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * INTO wa_vbrk FROM vbrk WHERE vbeln = wa_data-sfakn.&lt;/P&gt;&lt;P&gt;    wa_vbrk-zrbdc = ztsd_inv_cancel-zrbdc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND wa_vbrk TO it_upd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'ENQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        mode_rstable   = 'E'&lt;/P&gt;&lt;P&gt;        tabname        = 'VBRK'&lt;/P&gt;&lt;P&gt;        varkey         = 'VBELN'&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        foreign_lock   = 1&lt;/P&gt;&lt;P&gt;        system_failure = 2&lt;/P&gt;&lt;P&gt;        OTHERS         = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'DB_UPDATE_TABLE'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          tablename      = 'VBRK'&lt;/P&gt;&lt;P&gt;        TABLES&lt;/P&gt;&lt;P&gt;          inttab         = it_upd&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          db_error       = 1&lt;/P&gt;&lt;P&gt;          not_found      = 2&lt;/P&gt;&lt;P&gt;          wrong_param    = 3&lt;/P&gt;&lt;P&gt;          internal_error = 4&lt;/P&gt;&lt;P&gt;          OTHERS         = 5.&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;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'DEQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          mode_rstable = 'E'&lt;/P&gt;&lt;P&gt;          tabname      = 'VBRK'&lt;/P&gt;&lt;P&gt;          varkey       = 'VBELN'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "confirm_data}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 11:04:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526910#M1561022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-10T11:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Screen programming - Return statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526911#M1561023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;LEAVE PROGRAM&lt;/EM&gt; unloads the program from the memory. By using &lt;EM&gt;LEAVE TO SCREEN 0&lt;/EM&gt; you simply end up current screen call sequence. This causes to return to the following intruction after CALL SCREEN, hence continuing your program execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 11:08:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526911#M1561023</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2011-01-10T11:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Screen programming - Return statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526912#M1561024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SET SCREEN 0.
LEAVE SCREEN&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of &lt;STRONG&gt;LEAVE PROGRAM&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 11:15:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-programming-return-statement/m-p/7526912#M1561024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-10T11:15:09Z</dc:date>
    </item>
  </channel>
</rss>

