<?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 Problem with Table Control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109015#M1185271</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;My requirements goes like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am having a screen 100, which has a table control with NO data in it.&lt;/P&gt;&lt;P&gt;2. The screen has two push buttons in it (SAVE and EXIT).&lt;/P&gt;&lt;P&gt;3. I enter the data in the first row of the table control.&lt;/P&gt;&lt;P&gt;4. I select the row and click on Save button to save the data in to a Z table.&lt;/P&gt;&lt;P&gt;5. The problem I am facing is, the entire row gets vanished as soon as I click on Save button and &lt;/P&gt;&lt;P&gt;6. If I press Enter after entering the values in the first row, the entire data gets vanished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code that I have written to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM  Z84364BNCHPROG3                                             .&lt;/P&gt;&lt;P&gt;tables: z84364_bnch_empl.&lt;/P&gt;&lt;P&gt;types: begin of itab_tp,&lt;/P&gt;&lt;P&gt;       mandt type z84364_bnch_empl-mandt,&lt;/P&gt;&lt;P&gt;       empid type z84364_bnch_empl-empid,&lt;/P&gt;&lt;P&gt;       name1 type z84364_bnch_empl-name1,&lt;/P&gt;&lt;P&gt;       name2 type z84364_bnch_empl-name2,&lt;/P&gt;&lt;P&gt;       street1 type z84364_bnch_empl-street1,&lt;/P&gt;&lt;P&gt;       street2 type z84364_bnch_empl-street2,&lt;/P&gt;&lt;P&gt;       district type z84364_bnch_empl-district,&lt;/P&gt;&lt;P&gt;       state type z84364_bnch_empl-state,&lt;/P&gt;&lt;P&gt;       country type z84364_bnch_empl-country,&lt;/P&gt;&lt;P&gt;       end of itab_tp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab type standard table of itab_tp.&lt;/P&gt;&lt;P&gt;data: itab_wa type itab_tp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;controls: tbcntrl type tableview using screen '0100'.&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  STATUS_0100  OUTPUT&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;&lt;/P&gt;&lt;P&gt;module STATUS_0100 output.&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'TBCNTROLSTATUS'.&lt;/P&gt;&lt;P&gt;SET TITLEBAR 'TBS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE table itab lines tbcntrl-lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                 " STATUS_0100  OUTPUT&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;&lt;/P&gt;&lt;P&gt;if sy-ucomm eq 'EXIT' or sy-ucomm eq 'BACK' or Sy-ucomm eq 'CANCEL' or&lt;/P&gt;&lt;P&gt;  sy-ucomm eq 'EXIT'.&lt;/P&gt;&lt;P&gt;  Leave program.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-ucomm eq 'SAVE'.&lt;/P&gt;&lt;P&gt;  loop at itab into itab_wa.&lt;/P&gt;&lt;P&gt;     modify Z84364_BNCH_EMPL from itab_wa. &lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;   if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    message 'Updated the table Successfully' type 'S'. &lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&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;*&amp;amp;      Module  cursor_setting  OUTPUT&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 cursor_setting output.&lt;/P&gt;&lt;P&gt;loop at screen.&lt;/P&gt;&lt;P&gt;   screen-input = 1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET CURSOR FIELD Z84364_BNCH_EMPL-STREET1 LINE 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                 " cursor_setting  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SCREEN FLOW LOGIC IS SHOWN BELOW&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process before output.&lt;/P&gt;&lt;P&gt;module status_0100.&lt;/P&gt;&lt;P&gt;loop with control tbcntrl.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;module cursor_setting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process after input.&lt;/P&gt;&lt;P&gt;loop with control tbcntrl.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;module user_command_0100.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Feb 2009 12:34:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-06T12:34:47Z</dc:date>
    <item>
      <title>Problem with Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109015#M1185271</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;My requirements goes like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am having a screen 100, which has a table control with NO data in it.&lt;/P&gt;&lt;P&gt;2. The screen has two push buttons in it (SAVE and EXIT).&lt;/P&gt;&lt;P&gt;3. I enter the data in the first row of the table control.&lt;/P&gt;&lt;P&gt;4. I select the row and click on Save button to save the data in to a Z table.&lt;/P&gt;&lt;P&gt;5. The problem I am facing is, the entire row gets vanished as soon as I click on Save button and &lt;/P&gt;&lt;P&gt;6. If I press Enter after entering the values in the first row, the entire data gets vanished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code that I have written to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM  Z84364BNCHPROG3                                             .&lt;/P&gt;&lt;P&gt;tables: z84364_bnch_empl.&lt;/P&gt;&lt;P&gt;types: begin of itab_tp,&lt;/P&gt;&lt;P&gt;       mandt type z84364_bnch_empl-mandt,&lt;/P&gt;&lt;P&gt;       empid type z84364_bnch_empl-empid,&lt;/P&gt;&lt;P&gt;       name1 type z84364_bnch_empl-name1,&lt;/P&gt;&lt;P&gt;       name2 type z84364_bnch_empl-name2,&lt;/P&gt;&lt;P&gt;       street1 type z84364_bnch_empl-street1,&lt;/P&gt;&lt;P&gt;       street2 type z84364_bnch_empl-street2,&lt;/P&gt;&lt;P&gt;       district type z84364_bnch_empl-district,&lt;/P&gt;&lt;P&gt;       state type z84364_bnch_empl-state,&lt;/P&gt;&lt;P&gt;       country type z84364_bnch_empl-country,&lt;/P&gt;&lt;P&gt;       end of itab_tp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab type standard table of itab_tp.&lt;/P&gt;&lt;P&gt;data: itab_wa type itab_tp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;controls: tbcntrl type tableview using screen '0100'.&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  STATUS_0100  OUTPUT&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;&lt;/P&gt;&lt;P&gt;module STATUS_0100 output.&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'TBCNTROLSTATUS'.&lt;/P&gt;&lt;P&gt;SET TITLEBAR 'TBS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE table itab lines tbcntrl-lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                 " STATUS_0100  OUTPUT&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;&lt;/P&gt;&lt;P&gt;if sy-ucomm eq 'EXIT' or sy-ucomm eq 'BACK' or Sy-ucomm eq 'CANCEL' or&lt;/P&gt;&lt;P&gt;  sy-ucomm eq 'EXIT'.&lt;/P&gt;&lt;P&gt;  Leave program.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-ucomm eq 'SAVE'.&lt;/P&gt;&lt;P&gt;  loop at itab into itab_wa.&lt;/P&gt;&lt;P&gt;     modify Z84364_BNCH_EMPL from itab_wa. &lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;   if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;    message 'Updated the table Successfully' type 'S'. &lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&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;*&amp;amp;      Module  cursor_setting  OUTPUT&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 cursor_setting output.&lt;/P&gt;&lt;P&gt;loop at screen.&lt;/P&gt;&lt;P&gt;   screen-input = 1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET CURSOR FIELD Z84364_BNCH_EMPL-STREET1 LINE 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                 " cursor_setting  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SCREEN FLOW LOGIC IS SHOWN BELOW&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process before output.&lt;/P&gt;&lt;P&gt;module status_0100.&lt;/P&gt;&lt;P&gt;loop with control tbcntrl.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;module cursor_setting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process after input.&lt;/P&gt;&lt;P&gt;loop with control tbcntrl.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;module user_command_0100.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 12:34:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109015#M1185271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T12:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109016#M1185272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1. Add a vraible flag in the PBO module where you are reading the data from the table into a table control,set its value to 'X' after first read as done below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF ( FLAG1 EQ ' ' ).
* SELECT ALL THE RECORDS FROM THE TABLE TO THE INTERNAL TABLE 
SELECT QUERY
     ENDIF.
     FLAG1 = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This will lead to display the record in the table control ratehr than making them vanish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS your flow login for the sreen should be like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.

MODULE GET_DATA. "read the dat from table into internal table ,where above code needs to be add
LOOP WITH CONTROL TABLE1.

    MODULE PUT_DATA.  "Actually puts the data into the table control from internal table
"code in this can be READ TABLE &amp;lt;ITAB&amp;gt; INDEX &amp;lt;tablecontrolname&amp;gt;-CURRENT_LINE.
ENDLOOP.


PROCESS AFTER INPUT.

LOOP WITH CONTROL TABLE1.

     MODULE MODIFY_DATA.  
'that actually redisplay of the data from the internal table into table control
"code can be   MODIFY internal table INDEX &amp;lt;tablecontrolname&amp;gt;-CURRENT_LINE.

ENDLOOP.

MODULE INPUT_DATA. "that takes care of actual insert/modif or sy-ucomm functionality&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this might help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 13:02:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109016#M1185272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T13:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109017#M1185273</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;PRE&gt;&lt;CODE&gt;process before output.
module status_0100.
loop with control tbcntrl.
MODULE map_fields. "-----------------&amp;gt; to display records from the program.
endloop.
module cursor_setting.

process after input.
loop with control tbcntrl.
module insert_records "---------&amp;gt; to insert records from the screen
endloop.
module user_command_0100.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  map_fields  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE map_fields OUTPUT.

" screen names = program fields name
  ztrip-pernr =  ptp00-pernr.
  ztrip-place = wa_trip-place.
  ztrip-fdate = wa_trip-fdate.
  ENDMODULE

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  insert_records_502  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE insert_records INPUT.

 program names = screen names
      
      wa_trip-pernr    = ztrip-pernr.
      wa_trip-fdate    = ztrip-fdate.
      wa_trip-tdate    = ztrip-tdate.
      wa_trip-place    = ztrip-place.
      wa_trip-ctry     = ztrip-ctry.
      wa_trip-reson    = ztrip-reson.
      wa_trip-sno      = ztrip-sno.
        
      append wa_trip to  it_trip.
 
ENDMODULE.                 " insert_records  INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; REgards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always Learner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 13:03:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109017#M1185273</guid>
      <dc:creator>Mohamed_Mukhtar</dc:creator>
      <dc:date>2009-02-06T13:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109018#M1185274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process after input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop with control tab_ctrl.&lt;/P&gt;&lt;P&gt;    module mod_tbctrl.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; module user_command_0101.&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;module mod_tbctrl input.&lt;/P&gt;&lt;P&gt; modify it_xxxx from wa_xxxx index tab_ctrl-current_line.&lt;/P&gt;&lt;P&gt;endmodule.                 " mod_tbctrl  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module user_command_0101&lt;/P&gt;&lt;P&gt;when 'MODI'.&lt;/P&gt;&lt;P&gt;    modify Z84364_BNCH_EMPL from table it_xxxx.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 13:05:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109018#M1185274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T13:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109019#M1185275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I made the changes given by you.&lt;/P&gt;&lt;P&gt;The thing is as soon as I click on Save button, the values in the table control are getting updated and I get a message saying 'Table updated'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as I see the above message, the values are vanished.&lt;/P&gt;&lt;P&gt;What do I do. Please help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some other buttons with which I need to play on.&lt;/P&gt;&lt;P&gt;So, I need the data to stay back on the screen even after executing Save Button.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 13:43:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109019#M1185275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T13:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109020#M1185276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope the table control fields are mapped to the workarea of the internal table?&lt;/P&gt;&lt;P&gt;Is it?&lt;/P&gt;&lt;P&gt;Please check that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 14:59:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109020#M1185276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T14:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109021#M1185277</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;I did a mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intially as there will not be any entries in the table I skipped the step of assigning the internal table work area values to screen values. This made the problem as after executing the PAI module the control would go back to PBO again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you one and all for the help.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition to the above,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to add one more functionality to my program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scenario goes like this.&lt;/P&gt;&lt;P&gt;1) As soon as the screen 100 gets displayed. I do not want any of the screen elements to be in input mode. I want to disable it except the very first row&lt;/P&gt;&lt;P&gt;2) I will add a button 'ADD' to my screen.&lt;/P&gt;&lt;P&gt;3) Once I click on the ADD button, I would like to have one more row to be in input mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how to achieve this.&lt;/P&gt;&lt;P&gt;Points will be awarded for the best reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Babu Kilari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 15:14:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109021#M1185277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T15:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109022#M1185278</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;Use this code, its working:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it_zekpo is my internal table w/o header line,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo is work area.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name of input/output fields on screen are:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo-field1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo-field2, and so on...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At screen flow-logic&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
*  MODULE status_8003.
 
  LOOP WITH CONTROL po_tb.
    MODULE read_data.
  ENDLOOP.
 
PROCESS AFTER INPUT.
*  MODULE user_command_8003.
 
  LOOP WITH CONTROL po_tb.
    MODULE insert_data.
  ENDLOOP.
 
  MODULE save_data.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PBO&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  READ_DATA  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE read_data OUTPUT.
  READ TABLE it_zekpo INTO wa_zekpo INDEX po_tb-current_line. "po_tab is table control name
ENDMODULE.                 " READ_DATA  OUTPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PAI&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  INSERT_DATA  INPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE INSERT_DATA INPUT.
  APPEND WA_ZEKPO TO IT_ZEKPO.
ENDMODULE.                 " INSERT_DATA  INPUT
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  SAVE_DATA  INPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE SAVE_DATA INPUT.
  DATA : A LIKE SY-DBCNT.
  OK_CODE = SY-UCOMM.
  CASE OK_CODE.
    WHEN 'SAVE'.
      MODIFY ZEKPO FROM TABLE IT_ZEKPO. "update db table from internal table
      A = SY-DBCNT.
      IF SY-SUBRC = 0.
        MESSAGE S008 WITH A. "success message with no of records modified
      ENDIF.
  ENDCASE.
ENDMODULE.                 " SAVE_DATA  INPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 16:47:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109022#M1185278</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-02-06T16:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Table Control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109023#M1185279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it. Thanks a lot for your help guys!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2009 10:53:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/5109023#M1185279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-07T10:53:49Z</dc:date>
    </item>
  </channel>
</rss>

