<?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 Painter - Enter clears all fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-painter-enter-clears-all-fields/m-p/2865615#M672066</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 2 input fields in a screen and a table control. When I press the enter key all fields are cleared except the table control values. How to retain the values &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.

  MODULE status_0100.

  MODULE tblcntrl_change_tc_attr.
  LOOP AT   i_items
       INTO wa_items
       WITH CONTROL tblcntrl
       CURSOR tblcntrl-current_line.
  ENDLOOP.

PROCESS AFTER INPUT.

  LOOP AT i_items.
    MODULE tblcntrl_modify.
  ENDLOOP.

  MODULE user_command_0100.

MODULE tblcntrl_change_tc_attr OUTPUT.
  DESCRIBE TABLE i_items LINES tblcntrl-lines.
  tblcntrl-lines = tblcntrl-lines + 10.
ENDMODULE.           

MODULE tblcntrl_modify INPUT.
  MODIFY i_items FROM wa_items INDEX tblcntrl-current_line.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    INSERT wa_items INTO i_items INDEX tblcntrl-current_line.
  ENDIF.
ENDMODULE. 

MODULE user_command_0100 INPUT.

  save_ok = ok_code.
  CLEAR ok_code.
  CASE save_ok.
    WHEN 'BACK'.   LEAVE PROGRAM.
    WHEN 'EXIT'.   LEAVE PROGRAM.
    WHEN 'CANCEL'. LEAVE PROGRAM.
    WHEN 'CREATE'.
      SET SCREEN 200.
    WHEN OTHERS.   CALL SCREEN 100.
  ENDCASE.

ENDMODULE.   &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Sep 2007 13:17:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-28T13:17:20Z</dc:date>
    <item>
      <title>Screen Painter - Enter clears all fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-painter-enter-clears-all-fields/m-p/2865615#M672066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 2 input fields in a screen and a table control. When I press the enter key all fields are cleared except the table control values. How to retain the values &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.

  MODULE status_0100.

  MODULE tblcntrl_change_tc_attr.
  LOOP AT   i_items
       INTO wa_items
       WITH CONTROL tblcntrl
       CURSOR tblcntrl-current_line.
  ENDLOOP.

PROCESS AFTER INPUT.

  LOOP AT i_items.
    MODULE tblcntrl_modify.
  ENDLOOP.

  MODULE user_command_0100.

MODULE tblcntrl_change_tc_attr OUTPUT.
  DESCRIBE TABLE i_items LINES tblcntrl-lines.
  tblcntrl-lines = tblcntrl-lines + 10.
ENDMODULE.           

MODULE tblcntrl_modify INPUT.
  MODIFY i_items FROM wa_items INDEX tblcntrl-current_line.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    INSERT wa_items INTO i_items INDEX tblcntrl-current_line.
  ENDIF.
ENDMODULE. 

MODULE user_command_0100 INPUT.

  save_ok = ok_code.
  CLEAR ok_code.
  CASE save_ok.
    WHEN 'BACK'.   LEAVE PROGRAM.
    WHEN 'EXIT'.   LEAVE PROGRAM.
    WHEN 'CANCEL'. LEAVE PROGRAM.
    WHEN 'CREATE'.
      SET SCREEN 200.
    WHEN OTHERS.   CALL SCREEN 100.
  ENDCASE.

ENDMODULE.   &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 13:17:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-painter-enter-clears-all-fields/m-p/2865615#M672066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T13:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Screen Painter - Enter clears all fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-painter-enter-clears-all-fields/m-p/2865616#M672067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in event PROCESS AFTER INPUT you have to specify all the input fields so that the values are transferred from screen to your variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;currently you have fields of your table control (in the LOOP) but you don't have the two other fields. Just add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD w_field1.&lt;/P&gt;&lt;P&gt;FIELD w_field2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 13:25:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-painter-enter-clears-all-fields/m-p/2865616#M672067</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2007-09-28T13:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Screen Painter - Enter clears all fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-painter-enter-clears-all-fields/m-p/2865617#M672068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this .. but it does not work. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS AFTER INPUT.

  FIELD p_vorna.
  FIELD p_bednr.

  LOOP AT i_items.
    MODULE tblcntrl_modify.
  ENDLOOP.

  MODULE user_command_0100.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 13:34:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-painter-enter-clears-all-fields/m-p/2865617#M672068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T13:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Screen Painter - Enter clears all fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-painter-enter-clears-all-fields/m-p/2865618#M672069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way I solved it is .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* All the fields in screen
DATA:
  p_vorna  TYPE pa0002-vorna,
  p_bednr  TYPE ekpo-bednr,
  p_vstel  TYPE ekpv-vstel,
  p_notes  TYPE pa0002-cname,
  p_ekorg  TYPE ekko-ekorg,
  p_ekgrp  TYPE ekko-ekgrp,
  p_bukrs  TYPE ekko-bukrs,
  p_swerks TYPE ekpo-werks,
  p_rwerks TYPE ekpo-werks.

MODULE user_command_0100 INPUT.

  MOVE p_vorna  TO wa_header-vorna.
  MOVE p_bednr  TO wa_header-bednr.
  MOVE p_vstel  TO wa_header-vstel.
  MOVE p_notes  TO wa_header-notes.
  MOVE p_ekorg  TO wa_header-ekorg.
  MOVE p_ekgrp  TO wa_header-ekgrp.
  MOVE p_bukrs  TO wa_header-bukrs.
  MOVE p_swerks TO wa_header-swerks.
  MOVE p_rwerks TO wa_header-rwerks.

MODULE status_0100 OUTPUT.

  SET TITLEBAR 'TITLE_0100'.
  SET PF-STATUS 'SCREEN_100'.

  MOVE wa_header-vorna  TO p_vorna.
  MOVE wa_header-bednr  TO p_bednr.
  MOVE wa_header-vstel  TO p_vstel.
  MOVE wa_header-notes  TO p_notes.
  MOVE wa_header-ekorg  TO p_ekorg.
  MOVE wa_header-ekgrp  TO p_ekgrp.
  MOVE wa_header-bukrs  TO p_bukrs.
  MOVE wa_header-swerks TO p_swerks.
  MOVE wa_header-rwerks TO p_rwerks.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2007 14:24:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-painter-enter-clears-all-fields/m-p/2865618#M672069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-28T14:24:31Z</dc:date>
    </item>
  </channel>
</rss>

