<?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: Table control with both Editable and non Editable fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-with-both-editable-and-non-editable-fields/m-p/4973135#M1158954</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answer to my question is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*" screen flow PBO&lt;/P&gt;&lt;P&gt;loop at gt_data1 into gs_data1 with control gtc_9999.&lt;/P&gt;&lt;P&gt;  module d9999_modify_screen_tc.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PBO module&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;module d9999_modify_screen_tc output.&lt;/P&gt;&lt;P&gt;  check gs_data1-XYZ = 'demo'. "condition&lt;/P&gt;&lt;P&gt;  loop at screen.              "for current row of TC&lt;/P&gt;&lt;P&gt;    if screen-name = 'XYZ'.    "for one cell&lt;/P&gt;&lt;P&gt;      screen-active      = '0'.&lt;/P&gt;&lt;P&gt;      screen-intensified = '1'. "or whatever&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    modify screen.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Jan 2009 04:15:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-01T04:15:11Z</dc:date>
    <item>
      <title>Table control with both Editable and non Editable fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-with-both-editable-and-non-editable-fields/m-p/4973133#M1158952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Transaction is in change mode for Custom Development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement : Data is fetched from Database and needs to be shown in Table control with few columns as editable and few columns as non editable.Also when we press insert button a new blank row should be inserted with all its columns as editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please let me know how we can do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Sajid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jan 2009 03:48:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-with-both-editable-and-non-editable-fields/m-p/4973133#M1158952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-01T03:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Table control with both Editable and non Editable fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-with-both-editable-and-non-editable-fields/m-p/4973134#M1158953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;go for table control with wizard......here u will get all functionality(insert delete etc...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for enabling and disabling .....use loop at screen.&lt;/P&gt;&lt;P&gt;                                                    modify screen.&lt;/P&gt;&lt;P&gt;                                                 endloop.   &lt;/P&gt;&lt;P&gt;                    &lt;STRONG&gt;with in the loop in PBO of flow logic...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                               loop at itab.&lt;/P&gt;&lt;P&gt;                                                   module enable_disable.&lt;/P&gt;&lt;P&gt;                                                 endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in driver program &lt;/P&gt;&lt;P&gt;  module enable_disable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endmodule...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jan 2009 03:58:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-with-both-editable-and-non-editable-fields/m-p/4973134#M1158953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-01T03:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Table control with both Editable and non Editable fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-with-both-editable-and-non-editable-fields/m-p/4973135#M1158954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answer to my question is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*" screen flow PBO&lt;/P&gt;&lt;P&gt;loop at gt_data1 into gs_data1 with control gtc_9999.&lt;/P&gt;&lt;P&gt;  module d9999_modify_screen_tc.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PBO module&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;module d9999_modify_screen_tc output.&lt;/P&gt;&lt;P&gt;  check gs_data1-XYZ = 'demo'. "condition&lt;/P&gt;&lt;P&gt;  loop at screen.              "for current row of TC&lt;/P&gt;&lt;P&gt;    if screen-name = 'XYZ'.    "for one cell&lt;/P&gt;&lt;P&gt;      screen-active      = '0'.&lt;/P&gt;&lt;P&gt;      screen-intensified = '1'. "or whatever&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    modify screen.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jan 2009 04:15:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-with-both-editable-and-non-editable-fields/m-p/4973135#M1158954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-01T04:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Table control with both Editable and non Editable fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-with-both-editable-and-non-editable-fields/m-p/4973136#M1158955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sajid,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make certain fields as editable and some as non-editable, you can follow any one of the below two approaches:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; Either while designing the module pool screen keep those textbox fields as output only which need not be edited and rest textbox fields as input &amp;amp; output both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; If you want enable/disable input for textbox fields while execution, then while designing the screen, the textbox fields which need to be non-editable define the group1 as &lt;STRONG&gt;ABC&lt;/STRONG&gt; for those fields. Now, In PBO of the screen, write code:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at screen.
  if ( screen-group1 = 'ABC' ).
    screen-input = 0. "disable textbox for input
    screen-active = 0.
  endif.
  modify screen.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at screen.
  if ( screen-group1 = 'ABC' ).
    screen-input = 1. "enable textbox for input
    screen-active = 1.
  endif.
  modify screen.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of lines in table control depends on the size of table control on screen.&lt;/P&gt;&lt;P&gt;If number of lines in table control are same as the number of records in the internal table, then to insert a new row when user clicks INSERT button, then use code:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
case sy-ucomm.
  when 'INSERT'.
    tab_ctrl-lines = tab_ctrl-lines + 1. "to insert a new line into table control tab_ctrl
    loop at screen.
      if ( screen-group1 = 'ABC' ).
        screen-input = 1. "enable textbox for input
        screen-active = 1.
      endif.
      modify screen.
    endloop.
endcase.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not possible to enable only one row when you click INSERT button, rather it will enable the all fields for all lines in table control.&lt;/P&gt;&lt;P&gt;We can only enable/disable columns in a table control.&lt;/P&gt;&lt;P&gt;So, if you want not to show the existing records when you click INSERT button then use a new table control to insert new records.&lt;/P&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>Thu, 01 Jan 2009 04:16:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-with-both-editable-and-non-editable-fields/m-p/4973136#M1158955</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-01-01T04:16:53Z</dc:date>
    </item>
  </channel>
</rss>

